Random SPI communication timeout with STM32H7 when reading sensor data continuously
I am working on an STM32H7-based project where I continuously poll sensor data over SPI in DMA mode. Everything works as expected for the first few hours, but occasionally the SPI bus freezes and triggers a timeout error (HAL_SPI_ERROR_TIMEOUT).
Resetting the SPI peripheral manually recovers the communication, but I want to identify the root cause instead of using a soft-reset workaround.
Has anyone encountered similar bus lockup issues with STM32H7 SPI DMA implementation? Any tips on proper flag clearing or clearing the FIFO buffer safely would be greatly appreciated!
