cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to handle UART IDLE line detection with the HAL library? If not, which is the nicest way to implement it?

TNaum
Associate III

I am using the HAL library to use my MCUs peripherals and I would like to use the IDLE line detection of the UART controllers. To me, it seems that the HAL library does not offer any callback for IDLE line detection so I think it is not possible to use this feature with the HAL library.

In https://community.st.com/s/question/0D50X00009XkW8rSAF/spurious-idle-link-indication-over-uart2, Nissan Aloni states that he had to change the HAL_UART_IRQHandler(...) function to handle the UART IDLE interrupts, which further confirms my guess.

So, is it possible to use the IDLE line detection with the HAL library? And if not, how do you recommend implementing it? I would not like to change the HAL library file(s) because these should stay an ST-supplied piece of software. On the other hand, I think that it will not be possible to use IDLE line detection without changing the stm32l0xx_hal_uart.c but I am curious to hear your proposals.

Best regards.

0 REPLIES 0