MPC5748G autosar spi slave+dma

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

MPC5748G autosar spi slave+dma

1,064 Views
fujiainjun
Contributor I

hi guys

in my project, The SPI driver'code generated by EB tresos Studio With NXP AUTOSAR MCAL 4.2 HF18.0,Which configurated as Slave Node ,exchande data by DMA  to Master Node;

When the baud rate is 12Mbps or higher, it happens accidentally that the slave node(MPC5748G) cannot receive the 1024Bytes data of the master node completely,But a logic analyzer can capture 1024 bytes of data.

Has anyone ever had a problem like this?DMA has limits on the baud rate of the data SPI?

0 Kudos
3 Replies

1,051 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @fujiainjun,

I have never seen that problem before. As a quick check in my MPC574xG board, the SPI slave still can receive 1024 bytes with baudrate 12Mbps, in DMA mode.

Are you trying with Spi_SyncTransmit or Spi_AsyncTransmit? What would happen if you reduce the number of bytes (128, for instance) and reduce the baudrate also (100Kbps, for instance)?

Regards,

Nam

0 Kudos

1,041 Views
fujiainjun
Contributor I

with baudrate 12Mbps, in DMA mode.

I  try with Spi_AsyncTransmit,reduce the baudrate  to 8Mbps,the problem disappeared.

How about with baudrate 24Mbps,in your project?

0 Kudos

1,025 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @fujiainjun 

Please could you also describe a bit with your SPI signal. As an experience, the issue might be occurred ,  when timing between the last SCK edge of a transfer word and the first SCK edge of the next transfer word is pretty low. When this delay is increased, the issue is not occurred. I assumed that delay help to process the data by the DMA, so if the delay is enough for DMA processing the data, then we would see no frame loss.

A snapshot of the SPI signal would be fine.

Regards,

Nam

0 Kudos