cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling UART Idle line interrupt causes program to hang

Ash G
Associate II

I'm using STM32L062K08 MCU with HAL library. I found out setting idle line interrupt causes program to hang. It worked when I used for UART2.

__HAL_UART_ENABLE_IT(&huart1, UART_IT_IDLE);  // enable idle line interrupt

What could be the possible reason for this issue?

1 REPLY 1

Probably some pending status isn't getting properly cleared and it is re-entering the IRQ Handler repeatedly.

Look at framing, parity, overrun, noise, etc errors being flagged.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..