cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt triggered DMA transfer (full duplex) over SPI fails (STM32U585)

EDrou
Associate

When doing triggered (EXTI2 line) DMA transfer with SPI in circular mode I often don't get the expected result.

If I do the DMA transfer (non-circular) from the EXTI2 interrupt everything is fine.

Code transmit 10 bytes, receives 10 bytes each transfer.

Calling HAL_SPI_TransmitReceive_DMA(), HAL_SPI_TxRxCpltCallback() when testing result in both cases.

DMA/SPI setup in CubeMX.

Any ideas?

1 REPLY 1

> I often don't get the expected result.

What is the expected result and what do you get?

Read out and check GPDMA and SPI registers content. I am not familiar with GPDMA so can't give any particular advice, but generally, the mcu components do not work out of C source and/or any libraries such as Cube/HAL, they work out of their register settings.

JW