cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7xx HAL_SPI_TransmitReceive_DMA() should abort RX DMA when TX DMA fails

FSAT
Associate II

HAL_SPI_TransmitReceive_DMA() can lead to non-functional DMA when the following happens:

  1. RX DMA state ready
  2. TX DMA state busy
  3. 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

1 ACCEPTED SOLUTION

Accepted Solutions
julien B
ST Employee

Hello @FSAT​ 

Thank you for bringing these issues to our attention.

I confirm and I reported internally.

Related issue tracked under the number 149580

These are internal tracking numbers and are not accessible or usable by customers.

When your question is answered, please close this topic by choosing Select as Best.

This will help other users find that answer faster.

Julien.

View solution in original post

1 REPLY 1
julien B
ST Employee

Hello @FSAT​ 

Thank you for bringing these issues to our attention.

I confirm and I reported internally.

Related issue tracked under the number 149580

These are internal tracking numbers and are not accessible or usable by customers.

When your question is answered, please close this topic by choosing Select as Best.

This will help other users find that answer faster.

Julien.