User Manual
635
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
UART1/UART2
19.7.6
LIN Baud Rate Detection
The baud rate detection for LIN is shown in
, the Header LIN frame consists of the:
• Sync Break (13 bit times low)
• Sync Byte (55
H
)
• Protected ID field
Figure 170 LIN Auto Baud Rate Detection
With the first falling edge:
• The Timer 2 External Start Enable bit (T2MOD.T2RHEN) is set. The falling edge at pin T2EX is selected by
default for Timer 2 External Start (bit T2MOD.T2REGS is 0).
With the second falling edge:
• Start Timer 2 by the hardware.
With the third falling edge:
• Timer 2 captures the timing of 2 bits of SYN byte.
• Check the Break Field Flag bit LINST.BRK.
If the sync break field flag LINST.BRK is set, software may continue to capture 4/6/8 bits of sync byte. Finally,
the end of sync byte flag (LINST.EOFSYN) is set, Timer 2 is stopped. T2 Reload/Capture register (RC) is the time
taken for 2/4/6/8 bits according to the implementation. Then the LIN routine calculates the actual baud rate,
sets the BCON1.BR1_PRE and BG1 values if the UART module uses the baud-rate generator for baud rate
generation.
After the third falling edge, the software may discard the current operation and continue to detect the next
header LIN frame if the following conditions were detected:
• The Sync Break Field Flag LINST.BRK is not set, or
• The Sync Byte Error Flag LINST.ERRSYN is set
Captured Value (8 bits)
SYN BREAK
SYN CHAR (55
H
)
Start
Bit
Stop
Bit
1st negative transition,
set T2RHEN bit
T2 automatically
starts
EOFSYN bit is set,
T2 is stopped
Last captured value of T2
upon negative transition
Check the break field
flag bit BRK is set or not