MPC5777C DMA transfers with multiple chips on the same SPI

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

MPC5777C DMA transfers with multiple chips on the same SPI

Jump to solution
1,200 Views
darq
Contributor III

Hello,

I am using DMA transfers to fill in SPI TX FIFO from an array of commands and also drain RX FIFO to an array of results. I use the same SPI interface to communicate with several chips that are identical by selecting different Chip Select in TX command. I am expecting for the results to be aligned with the commands but they are not. Is there any way to know from which Chips Select the received data came from?

0 Kudos
1 Solution
1,195 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, results should be aligned with commands. If they are not, you probably facing some misconfiguration. Or dont you see SPI overflow or underflow? Don't you select multiple chip selects (it is possible to configure it so, but in you case it would lead in bus contention issues)?

View solution in original post

0 Kudos
2 Replies
1,196 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, results should be aligned with commands. If they are not, you probably facing some misconfiguration. Or dont you see SPI overflow or underflow? Don't you select multiple chip selects (it is possible to configure it so, but in you case it would lead in bus contention issues)?

0 Kudos
1,176 Views
darq
Contributor III

The misalignment was caused by leftover data in RX FIFO from configuration of external chips. The data was not read/discarded before the DMA transfers were started.

0 Kudos