STM32H7xx HAL_SPI_TransmitReceive_DMA() should abort RX DMA when TX DMA fails
HAL_SPI_TransmitReceive_DMA() can lead to non-functional DMA when the following happens:
- RX DMA state ready
- TX DMA state busy
- HAL_SPI_TransmitReceive_DMA() gets called
The result is that RX DMA will become busy and never recovers due to the logic in lines 2413 to 2470 in stm32h7xx_hal_spi.c.
A fix would be to insert a
HAL_DMA_Abort_IT(hspi->hdmarx);
into the the if-condition in lines 2458 to 2470 to abort the previously started RX DMA
Greetings
