本帖最后由 hpdell 于 2016-11-9 09:48 编辑
大神们好,
请教下 stm32f7xx 开发板上的 qspi 读写功能,我在测试时 一次写入 8192 个字节数据,但是出现后面的4096字节的数据不对,前面的4096字节数据完全正常,
请问这是什么情况啊 ??
另外还有个 什么4字节地址,到底是个什么意思啊 ??
读写函数如下:
u32 cc, QspiAddr_RW ;
{
static uint8_t i = 0;
for(cc=0;cc<8192;cc++)
{
uart_tx_buff[cc] = i * 2;
i ++;
}
}
if(QSPI_EraseSector( 4 * 4096 ) != QSPI_OK)
printf("QSPI Erase Sector Error ... ... = %d
", cc);
else
printf("QSPI Erase Sector OK ** ... ... = %d
", cc);
if(QSPI_EraseSector( 5 * 4096 ) != QSPI_OK)
printf("QSPI Erase Sector Error ... ... = %d
", cc);
else
printf("QSPI Erase Sector OK ** ... ... = %d
", cc);
QspiAddr_RW = (uint32_t)((uint32_t)(4)*4096UL + 0);
printf("QSPI Write 8192 Begin ... ...
");
QSPI_WriteBuff((uint8_t*) &uart_tx_buff[0], (uint32_t)(QspiAddr_RW ), 8192);
QspiAddr_RW = (uint32_t)((uint32_t)(4)*4096UL + 0);
printf("QSPI Read 8192 Begin ... ...
");
QSPI_ReadBuff((uint8_t*) &uart_rx_buff[0], (uint32_t)(QspiAddr_RW ), 8192);
printf("QSPI Read 8192 End ... ...
");
if( Buffercmp_8(&uart_tx_buff[0], &uart_rx_buff[0], 8192) == 0)
printf("QSPI Data Read Write Auto Erase Sector OK ...! *** 1
");
else
printf("QSPI Data Read Write Auto Erase Sector Er ...? *** 1
");
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
那我再捣鼓捣鼓看看
一周热门 更多>