Associate
December 10, 2021
Question
STM32H7 SPI DMA is not working, HAL_SPI_STATE_BUSY_TX_RX state. Cache and MPU are disabled.
- December 10, 2021
- 3 replies
- 2571 views
I am trying to use SPI and DMA in a STM32H7, but it is not worling. The spi handler goes to "HAL_SPI_STATE_BUSY_TX_RX" state as soon as i call the function "HAL_SPI_TransmitReceive_DMA" and it does not do anything, it does not even generate the clock signal. The CPU IChache and DCache are disabled and MPU is not used. Besides, i have placed all the memory sections in "RAM_D1" as you can see in the linker attached.
I have tried placing the DMA buffers in another memory section and place this in "RAM_D2". Besides, i have also tried aligning these buffers with "ALIGN_32BYTES", and using different DMA streams but the result is always the same.

I would really appreciate any help, i am really stuck into this.