Skip to main content
Visitor II
December 15, 2025
Question

STM32L4 updated HAL drivers breaks HAL_UARTEx_ReceiveToIdle_DMA

  • December 15, 2025
  • 4 replies
  • 75 views

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?

    This topic has been closed for replies.

    4 replies

    Super User
    December 15, 2025

    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.

    SThom.7Author
    Visitor II
    December 15, 2025

    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.7Author
    Visitor II
    December 17, 2025

    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;

    Technical Moderator
    December 24, 2025

    Hello @SThom.7 

    Could you share your code please?

    SThom.7Author
    Visitor II
    January 8, 2026