I am working on the TWR-POS-K81, with a on board N25q256A, when trying to program the NOR flash, QuadSPI block in the K82F doesn't transmit anything more than 0x10 words
the TBDR register seems to accepts only 0x10 words (64bytes) of data and freezes and loops waiting for QuadSPI_SR:TXFULL is always '1'to clear, The QuapSPI_BSR:TRCTR shows 0x20 and QuadSPI_TBSR:TRBFL - 0x10, the QuadSPI_SR:TXFULL is always '1'.
Trying to clear and check QuadSPI_FR:TBFF as per the document doesn't seem to help.
The LUT instruction programmed is
[16] = 0x08180432, (0x32 is QUAD INPUT FAST PROGRAM) I am running Extended-SPI mode
[17] = 0x22FF,
Any insights and help is most welcome
Thanks
Krishna
解決済! 解決策の投稿を見る。
I could solve the issue, by putting in some delay at each read of the QuadSPI_SR::TXFULL
Here is code snippet
while(QuadSPI_BRD_SR_TXFULL(base)) | {for (volatile uint32_t i=0; i < 100; i++) | __ASM("nop");} |
Earlier the driver would just loop if the TXFULL flag was set, while writing into TBDR register, just putting the delay seemed to have solved the issue.
I could solve the issue, by putting in some delay at each read of the QuadSPI_SR::TXFULL
Here is code snippet
while(QuadSPI_BRD_SR_TXFULL(base)) | {for (volatile uint32_t i=0; i < 100; i++) | __ASM("nop");} |
Earlier the driver would just loop if the TXFULL flag was set, while writing into TBDR register, just putting the delay seemed to have solved the issue.
Hi Krishna,
Thank you for the share info.
Hope your answer could help other customers.
best regards,
Ma Hui