Reading from Quadspi using eDMA returns wrong data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reading from Quadspi using eDMA returns wrong data

Jump to solution
1,561 Views
katarzynabarano
Contributor I

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

expect to get {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}.
DMA settings in both DMA uses are the same:

{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?

Labels (1)
Tags (2)
0 Kudos
1 Solution
1,220 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
5 Replies
1,221 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!
0 Kudos
1,221 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you help with this case?

0 Kudos
1,221 Views
timesyssupport
Senior Contributor II

We are supporting the vf6xx platform, not the vf3xx. Does the Freescale team have any input on this query?

Thanks,

Timesys Support

0 Kudos
1,221 Views
naoumgitnik
Senior Contributor V

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.

0 Kudos
1,221 Views
timesyssupport
Senior Contributor II

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