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?
Solved! Go to Solution.
timesyssupport can you help with this case?
We are supporting the vf6xx platform, not the vf3xx. Does the Freescale team have any input on this query?
Thanks,
Timesys Support
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.
The VF6xx Linux driver for QSPI does not include eDMA support, so we can't be of assistance. The customer can work with us under services if they wish.
Thanks,
Timesys Support