
M0A21/M0A23 Series
May 06, 2022
Page
439
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Receive the response.
Transmit the response.
Ignore the response and wait for next header.
In LIN Slave mode, user can enable the slave header detection function by setting the SLVHDEN
(UART_LINCTL[1]) to detect complete frame header (receive “break field”, “sync field” and “frame ID
field”). When a LIN header is received, the SLVHDETF (UART_LINSTS[0]) flag will be set. If the LINIEN
(UART_INTEN[8]) bit is set to 1, an interrupt will be generated. User can enable the frame ID parity
check function by setting IDPEN (UART_LINCTL[9]). If only received frame ID parity is not correct (break
and syn
c filed are correct), the SLVIDPEF (UART_LINSTS[2]) flag is set to ‘1’. If the LINIEN
(UART_INTEN[8]) is set to 1, an interrupt will be generated and SLVHDETF ( UART_LINSTS[0]) is set
to ‘1’. User can also put LIN in mute mode by setting MUTE (UART_LINCTL[4]) to ‘1’. This mode allows
detection of headers only (break + sync + frame ID) and prevents the reception of any other characters.
In order to avoid bit rate tolerance, the controller supports automatic resynchronization function to avoid
clock deviation error, user can enable this feature by setting SLVAREN (UART_LINCTL[2]).
LIN Response Transmission
The LIN slave node can transmit response and receive response. When slave node is the publisher of
the response, the slave node sends response by filling data to the UART_DAT register. If the slave node
is the subscriber of the response, the slave node receives data from LIN bus.
LIN Header Time-out Error
The LIN slave controller contains a header time-out counter. If the entire header is not received within
the maximum time limit of 57 bit times, the header error flag SLVHEF (UART_LINSTS[1]) and the header
time-out flag SLVHTOF (UART_LINSTS[4]) will be set. The time-out counter is enabled at each break
detect edge and stopped in the following conditions.
A LIN frame ID field has been received.
The header error flag asserts.
Writing 1 to the SLVSYNCF (UART_LINSTS[3]) to re-search a new frame header.
Mute Mode and LIN Exit from Mute Mode Condition
In Mute mode, a LIN slave node will not receive any data until specified condition occurred. It allows
header detection only and prevents the reception of any other characters. User can enable Mute mode
by setting the MUTE (UART_LINCTL[4]) and exiting from Mute mode condition can be selected by HSEL
(UART_LINCTL[23:22]).
Note:
It is recommended to set LIN slave node to Mute mode after checksum transmission.
The LIN slave controller exiting from Mute mode is described as follows: If HSEL (UART_LINCTL[23:22])
is set to “break field”, when LIN slave controller detects a valid LIN break and delimiter, the controller
will enable the receiver (exit from Mute mode) and subsequent data (sync data, frame ID data, response
data) are received in RX FIFO.
If HSEL (UART_LINCTL[23:22]) is set to “break field and sync field”, when the LIN slave controller
detects a valid LIN break and delimiter followed by a valid sync field without frame error, the controller
will enable the receiver (exit from mute mode) and subsequent data (ID data, response data) are
received in RX FIFO.
If HSEL (UART_LINCTL[23:22]) is set to “break field, sync field and ID field”, when
the LIN slave controller detects a valid LIN break and delimiter and valid sync field without frame error
followed by ID data without frame error and received ID data matched PID (UART_LINCTL[31:24])
value. The controller will enable the receiver (exit from mute mode) and subsequent data (response
data) are received in RX FIFO.
Slave Mode Non-automatic Resynchronization (NAR)
User can disable the automatic resynchronization function to fix the communication baud rate. When
operating in Non-Automatic Resynchronization mode, software needs some initial process, and the
initialization process flow of Non-Automatic Resynchronization mode is shown as follows: