Using Vybrid (VF65GS10) eDMA to automatically handle endianness conversion

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

Using Vybrid (VF65GS10) eDMA to automatically handle endianness conversion

Jump to solution
913 Views
riz1231
Contributor I

Hello,

We are adding eDMA support in QuadSPI. But there is an issue of incompatible endianness. This target is little-endian but data is store in QuadSPI’s RX buffer in big-endian format. Is there any way by which DMA can automatically handle big-to-little endian conversion along with moving the data.  We have tried moving data byte-by-byte and adjusting Destination Address Signed Offset (DOFF) and MLOFF correspondingly to handle endianness conversion automatically via eDMA but it doesn’t seem to work with QuadSPI. Is there any way in eDMA to accomplish this?

Thanks,

Rizwan

0 Kudos
1 Solution
718 Views
ioseph_martinez
NXP Employee
NXP Employee

Rizwan,

First I would recommend to arrange your data in the same endianess, it will save some struggling, but I am guessing is something  you already looked at... What is this data you are reading? is general data or Graphics? Is there something you could let me know to understand more about the target application?

Did you looked at the QSPI_MCR[END_CFG] I understand from the manual you can change the endianess of what you are reading.

My initial guess is that you can't have byte read access to the RX buffers, have you tried this using the CPU? to see how it affects byte accesses on the RX buffers?

If QSPI_MCR[END_CFG] does not work on your specific case, maybe is better if you use the mode: AHB Buffer data read via memory mapped access. That mode is exactly as if you were reading OCRAM or DDR, can have byte/word read accesses because the controller maps the memory to certain memory address range. If your eDMA configuration re arranges bytes correctly from RAM to RAM it will work from QuadSPI to RAM.

Regards,

Ioseph

View solution in original post

0 Kudos
1 Reply
719 Views
ioseph_martinez
NXP Employee
NXP Employee

Rizwan,

First I would recommend to arrange your data in the same endianess, it will save some struggling, but I am guessing is something  you already looked at... What is this data you are reading? is general data or Graphics? Is there something you could let me know to understand more about the target application?

Did you looked at the QSPI_MCR[END_CFG] I understand from the manual you can change the endianess of what you are reading.

My initial guess is that you can't have byte read access to the RX buffers, have you tried this using the CPU? to see how it affects byte accesses on the RX buffers?

If QSPI_MCR[END_CFG] does not work on your specific case, maybe is better if you use the mode: AHB Buffer data read via memory mapped access. That mode is exactly as if you were reading OCRAM or DDR, can have byte/word read accesses because the controller maps the memory to certain memory address range. If your eDMA configuration re arranges bytes correctly from RAM to RAM it will work from QuadSPI to RAM.

Regards,

Ioseph

0 Kudos