cancel
Showing results for 
Search instead for 
Did you mean: 

DMA2 breaks SPI3 communication when performing under Linux context.

JMein.1
Associate III

Hello,

we are working on the ST32MP1. The SPI3 works fine with the CubeMX software combining the DMA2 and FIFO when the board works in engineering mode. But if I perform the same software loaded by Linux (rproc start), the DMA2 SPI stream stops working, if I use the function HAL_SPI_Transmit_DMA() instead of using HAL_SPI_TransmitReceive_DMA(). If for example the amount of bytes to be tranferred is larger than 33, the DMA stops with this number of bytes in NDTR DMA register.

In engineering mode, this works fine with the same setting. I tested a lot (linker, stack, memory, FIFO on/off...) without any idea, why on M4 only mode, all is working fine. Furthermore, if I take 30 bytes, the first amount of data is transmitted by DMA and then the SPI_ISR is inoved around 15 times to send the rest of the data ... With 40 bytes, the DMA IRQ comes ones but after around 15 bytes and the SPI IRQ is not invoked.

Somehow curious but actually, I have no idea what is going wrong using tranmit only in production mode.

Any ideas?

Best regards,

Jan-Otto

10 REPLIES 10
JMein.1
Associate III

Hi Kevin,

thank you for your help and the patch. We integrated this and all is working well as expected :)

Best regards,

Jan-Otto