Search code examples
stm32uart

How to detect break signal in LIN?


I am going to implement LIN protocol using STM32 UART peripheral. I want to detect break signal of LIN header message. How can I detect break signal?


Solution

  • Since you gave no information about your microcontroller, I will use STM32F103 (Blue pill/Nucleo MCU) as an example. Other STM32 should have something similar.

    enter image description here

    There is a dedicated line break flag in the status register. As you can see, it also mentions a dedicated line break interrupt, if you need it.