
M0A21/M0A23 Series
May 06, 2022
Page
437
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Note1:
The default setting of break field is 12 dominant bits (break field) and 1 recessive bit break/sync
delimiter. Setting BRKFL (UART_LINCTL[19:16]) and BSL (UART_LINCTL[21:20]) to change the LIN
break field length and break/sync delimiter length.
Note2:
The default setting of break/sync delimiter length is 1-bit time and the inter-byte spaces default
setting is also 1-bit time. Setting BSL (UART_LINCTL[21:20]) and DLY (UART_TOUT[15:8]) can change
break/sync delimiter length and inter-byte spaces.
Note3:
If the header includes the “break field, sync field and frame ID field”, software must fill frame ID
to PID (UART_LINCTL[31:24]) before trigger header transmission (setting the SENDH
(UART_LINCTL[8])). The frame ID parity can be generated by software or hardware depending on
IDPEN (UART_LINCTL[9]) setting. If the parity generated by software with IDPEN (UART_LINCTL[9])
is set to ‘0’, software must fill 8 bit data (include 2 bit parity) in this field. If the parity generated by
hardware with IDPEN (UART_LINCTL[9]) is set to ‘1’, software fills ID0~ID5 and hardware calculates
P0 and P1.
Procedure with software error monitoring in Master mode:
1. Choose the hardware transmissio
n header field to only include “break field” by setting HSEL
(UART_LINCTL[
23:22])] to ‘00’.
2. Enable break detection function by setting BRKDETEN (UART_LINCTL[10]).
3. Request break + break/sync delimiter transmission by setting the SENDH (UART_LINCTL[8]).
4. Wait
until the BRKDETF (UART_LINSTS[8]) flag is set to “1” by hardware.
5. Request sync field transmission by writing 0x55 into UART_DAT register.
6.
Wait until the RDAIF (UART_INTSTS[0]) is set to “1” by hardware and then read back the
UART_DAT register.
7. Request header frame ID transmission by writing the protected identifier value to UART_DAT
register.
8.
Wait until the RDAIF (UART_INTSTS[0]) is set to “1” by hardware and then read back the
UART_DAT register.
LIN Break and Delimiter Detection
When software enables the break detection function by setting BRKDETEN (UART_LINCTL[10]), the
break detection circuit is activated. The break detection circuit is totally independent from the UART
receiver.
When the break detection function is enabled, the circuit looks at the input UART_RX pin for a start
signal. If UART LIN controller detects consecutive dominant is greater than 11 bits dominant followed
by a recessive bit (delimiter), the BRKDETF (UART_LINSTS[8]) flag is set at the end of break field. If
the LINIEN (UART_INTEN[8]) bit is set to 1, an interrupt LININT (UART_INTSTS[15]) will be generated.
The behavior of the break detection and break flag are shown in Figure 6.11-19.