Ping
RM69330屏幕驱动IC的QSPI时序要求具有两个特点:
(1) 一帧数据中间CS要保持低电平;
(2) 除了第一包,其它数据包前面不能带command;
解决方案(1.6.12及以上版本SDK才支持):
1. 数据帧开始拉低CS,数据帧结束拉高CS;
2. 第一个数据包用
app_qspi_command_transmit_async发送,
后面循环使用 app_qspi_transmit_in_qpi_async 接口发送剩下的数据,详情参考app_qspi.h文件定义。
/** **************************************************************************************** * @brief Transmit an amount of data in QPI mode (Async Mode). * @param[in] id: Which QSPI module want to Transmit. * @param[in] data_width: Just support @ref QSPI_DATASIZE_08_BITS @ref QSPI_DATASIZE_16_BITS
@ref QSPI_DATASIZE_32_BITS * @param[in] p_data: Pointer to data buffer * @param[in] length: Amount of data to be transmitted in bytes * * @return Result of operation. **************************************************************************************** */uint16_t app_qspi_transmit_in_qpi_async(app_qspi_id_t id, uint32_t data_width, uint8_t *p_data,
uint32_t length);
/** **************************************************************************************** * @brief Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking
mode with Interrupt. * @note This function is used only in Indirect Read Mode. * @param[in] id: which QSPI module want to transmit. * @param[in] p_cmd: Pointer to a app_qspi_command_t structure that contains the instruction and address
for data transfer. * @param[out] p_data: Pointer to data buffer * * @return Result of operation. **************************************************************************************** */uint16_t app_qspi_command_transmit_async(app_qspi_id_t id, app_qspi_command_t *p_cmd, uint8_t *p_data);
注意:如采用DMA 32bit QSPI传输模式,需要使能以下宏定义
/******************************************************************** * QUAD_WRITE_32b_PATCH : just exist in QUAD/DATASIZE_32BITS/DMA scene * if enable, MUST Control the CS By Software. */#define QSPI_QUAD_WRITE_32b_PATCH_EN 1u
Ping
打开微信,使用“扫一扫”即可关注