SSP Byte ordering with DMA

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

SSP Byte ordering with DMA

639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ianholmes on Thu Mar 14 07:37:12 MST 2013
I can't seem to spot this in the manual for the 1788...

If I set one of the SSP to be a SPI engine and to transmit 16 bits, what order do you think the value 0x0102 would come out in?

Reading between the lines I think that as the bit pattern is 0b00000001 00000010 and its received right justified and transmits msbit first then the output order would be:

01000000 10000000, with the left hand bit sent first (i.e. what you would see on a scope).

If I do this and use DMA to copy the data from memory I find that the bytes get swapped. ie I see 00000001 01000000 (0x01 0x02). The only way I get the bytes in the expected order is to make the SSP device 8 bits wide.

This suggests to me that the DMA "thinks" the source or the destination is only 8 bits and is lane swapping.

Am I missing something? Anyone got any experience of this (with DMA)?
0 Kudos
Reply
1 Reply

619 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Fri Mar 15 17:53:52 MST 2013
I want to know also. Good DMA is a powerful CPU mechanism.
0 Kudos
Reply