I am trying to add eDMA support to my Quadspi using code on VybridVF3xx. I have a problem when receiving from flash more data than I want to copy with eDMA. I got wrong data.
For example I am receiving 21 bytes of data. And eDMA is receiving only 16 (Minor loop is 8 bytes, quadspi WMRK is 1).
The first receive operation is ok. When DMA finifhes Quadspi.RBSR is 0x40200, so 4 bytes from RX buffer are taken by the DMA. The rest (2 bytes) I take from the RX buffer by cpu. The received data is ok.
Then I set CLR_RXF bit in quadspi.MCR register and to be sure clean all the flags by writing 0XFFFFFFFF to quadspi.FR.
Then I repeat the receive function (sending new read command to flash). When DMA finishes Quadspi.RBSR is 0x20400 so only 2 bytes are taken from buffer (it should take 4). Moreover the data received by eDMA is {1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8} when I
{SADDR = 0x7c000000, SOFF = 0x4, ATTR = 0x1a02, NBYTES_MLNO = 0x8, SLAST = 0x0, DADDR = 0x3f071b00, DOFF = 0x4, {CITER_ELINKNO = 0x2, CITER_ELINKYES = 0x2}, DLAST_SGA = 0x0, CSR = 0x88, {BITER_ELINKNO = 0x2, BITER_ELINKYES = 0x2}}
What am I doing wrong?
已解决! 转到解答。
timesyssupport can you help with this case?
Dear Timesys Support,
And how would you reply if that were for VF6XX? :smileyhappy: - The point is that the QuadSPI piece is shared by the entire Vybrid family.
May you, please, either review the requester's code or refer to your VF6XX code implementing the function katarzynabaranowska is asking about?
Thanks in advance, Naoum Gitnik.