cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 updated HAL drivers breaks HAL_UARTEx_ReceiveToIdle_DMA

SThom.7
Associate III

I have updated the STM32L4 HAL drivers to V1.13.6 / 14-November-2025 (1.18.2), which has broken my implementation of HAL_UARTEx_ReceiveToIdle_DMA.

Is this a fault in the new HAL drivers or does user code need to be updated inside the HAL_UARTEx_RxEventCallback?

5 REPLIES 5
TDK
Super User

Code within HAL_UARTEx_ReceiveToIdle_DMA hasn't changed for several years. Probably not the problem.

https://github.com/STMicroelectronics/stm32l4xx-hal-driver/blame/047a8610c7dc0dcfdb4cd63b86cd3a2cbd3e5899/Src/stm32l4xx_hal_uart_ex.c#L945

 

Debug your code. Hit pause, understand what is breaking and then try to fix that. Don't look for a magic solution.

Do a diff on your code before/after the update to understand the differences. CMSIS and header files need to be in sync with HAL files.

If you feel a post has answered your question, please click "Accept as Solution".
SThom.7
Associate III

Diff shows the code around this feature has definitely been updated in hal_uart.c

Release notes:

  • Provide accurate position in RxEventCallback when ReceptionToIdle mode is used with DMA, when UART and DMA interrupts process is delayed."
SThom.7
Associate III

I have found the fault in stm32l4xx_hal_uart.c

Inside the function UART_DMAReceiveCplt, inside the check for HAL_UART_RECEPTION_TOIDLE line 3902, this line of code is missing.

huart->RxXferCount = 0;

Saket_Om
ST Employee

Hello @SThom.7 

Could you share your code please?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om