SPI with DMA on MPC5744P.

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI with DMA on MPC5744P.

446 Views
gelumovileanu
Contributor II

My problem is that on MPC5744P microcontroller I cannot receive SPI data via DMA. I tried this on different peripherals (RTC, SBC, even wired direct loop between SOUT and SIN pads) - the result being always the same: no valid data in the input buffer. On the oscilloscope I can see that the DMA transmits data correctly, the peripheral responds also correctly but DMA does not tranfer incomming data into the receive buffer. The code is appended into the file SPI_DMA_OUT_DMA_IN.C.

 

If I only enable Tx and Rx FIFOs on SPI and  RFDF does not generate DMA requests everything goes fine and I can read valid data in the PIT ISR. The code is appended into the file SPI_DMA_OUT_NO_DMA_IN.C.
 
I also mention that on MPC5643L microcontroller the same code like in SPI_DMA_OUT_DMA_IN.C (with the necesary changes) works perfectly.

Original Attachment has been moved to: SPI_DMA_OUT_DMA_IN.c.zip

Original Attachment has been moved to: SPI_DMA_OUT_NO_DMA_IN.c.zip

0 Kudos
1 Reply

90 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to disable the Data cache. It could be enabled during the startup. If you are using S32DS go to startup.S file and comment section of code where data cache is enabled.

BR, Petr

0 Kudos