2026-02-24 6:13 PM
Hi everyone,
I am experiencing a strange discrepancy in the behavior of HAL_UARTEx_ReceiveToIdle_DMA between LPUART2 and LPUART3 on an STM32U083RCT6.
Environment:
MCU: STM32U083RCT6
IDE: STM32CubeIDE v1.17.0
Library: STM32CubeU0 Firmware Package V1.3.0 (Released 04-June-2025)
The Issue: I am using HAL_UARTEx_ReceiveToIdle_DMA to handle asynchronous reception of variable-length packets.
LPUART2: Works perfectly. When an IDLE line is detected, the DMA transfer stops as expected, and HAL_UARTEx_RxEventCallback is triggered.
LPUART3: When an IDLE line is detected, the interrupt is generated and HAL_UARTEx_RxEventCallback is triggered correctly. I am able to handle and process the variable-length packets without any issues. However, the DMA transfer itself does not stop (it remains in an active state), unlike the behavior observed on LPUART2.
Configuration: Both instances are configured in STM32CubeMX as follows:
Baud Rate: * LPUART2: 230400 bps
LPUART3: 115200 bps
DMA: DMA1 [Channel configuration]
Mode: Circular
Interrupts: UART Global Interrupt and DMA interrupts are enabled.
Both LPUARTs are using the same code logic and configuration, yet only LPUART3 shows this "DMA not stopping" behavior despite the callback being fired correctly.
Is there any known hardware errata or specific internal bus/DMA request mapping difference between LPUART2 and LPUART3 on the STM32U0 series that could cause this difference in DMA state management?
Any insights would be greatly appreciated.
Best regards,
Solved! Go to Solution.
2026-02-24 6:44 PM
If they are configured the same, they will behave the same. Recheck your assumptions. It sounds like one is in DMA Normal mode and the other is in circular mode.
2026-02-24 6:44 PM
If they are configured the same, they will behave the same. Recheck your assumptions. It sounds like one is in DMA Normal mode and the other is in circular mode.
2026-02-24 8:16 PM
Hi TDK,
Thank you very much! You were absolutely right.
I re-checked my stm32u0xx_hal_msp.c and found that LPUART2 was still configured in Normal mode there, despite my intention to set it to Circular. After correctly changing it to Circular mode, LPUART2 now behaves exactly like LPUART3—the DMA does not stop upon an IDLE event and continues to receive data.
It seems that on the STM32U0 series, the HAL implementation for HAL_UARTEx_ReceiveToIdle_DMA is designed to keep the DMA active in Circular mode, which is actually very convenient for my application.
I really appreciate your help in pointing out my oversight regarding the mode configuration.
Best regards,
kuma_hati_labo