2023-05-02 11:54 PM
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?
2023-05-03 01:22 AM
> 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