Visitor II
April 14, 2026
Question
LPUART1 interrupt stuck in HAL_UART_IRQHandler on STM32MP2 (RS485 + ReceiveToIdle)
- April 14, 2026
- 0 replies
- 91 views
Hi everyone,
I am working on an STM32MP2 platform and facing a persistent issue with LPUART1 in interrupt mode.
Setup
- MCU: STM32MP2
- UART used: LPUART1 (RS485 communication via MAX485)
- Debug UART: UART5 (polling mode, printf works fine)
- Using:
- HAL_UARTEx_ReceiveToIdle_IT() for RX
- HAL_UART_Transmit() for TX
- Baudrate: 115200
Problem
When using interrupt mode, the system gets stuck in:
HAL_UART_IRQHandler()
The interrupt keeps triggering continuously and the system appears stuck (infinite IRQ loop).
Observations
- Polling mode (HAL_UART_Receive) works perfectly
- Sensor communication works fine in polling
- Issue only happens in interrupt mode
What I already checked
NVIC enabled correctly:
HAL_NVIC_SetPriority(LPUART1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
IRQ handler is correct:
void LPUART1_IRQHandler(void)
{
HAL_UART_IRQHandler(&hlpuart1);
}
{
HAL_UART_IRQHandler(&hlpuart1);
}
No wrong handle (huart1) is used anywhere
FIFO configuration added:
HAL_UARTEx_SetTxFifoThreshold(&hlpuart1, UART_TXFIFO_THRESHOLD_1_8);
HAL_UARTEx_SetRxFifoThreshold(&hlpuart1, UART_RXFIFO_THRESHOLD_1_8);
HAL_UARTEx_DisableFifoMode(&hlpuart1);
HAL_UARTEx_SetRxFifoThreshold(&hlpuart1, UART_RXFIFO_THRESHOLD_1_8);
HAL_UARTEx_DisableFifoMode(&hlpuart1);
