
M0A21/M0A23 Series
May 06, 2022
Page
442
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
(UART_LINSTS[1]) may either set or not.
Check2: Based on measurement of time between each falling edge of the sync field.
If the difference is more than 18.75%, the header error flag SLVHEF (UART_LINSTS[1])
will be set.
If the difference is less than 15.62%, the header error flag SLVHEF (UART_LINSTS[1])
will not be set.
If the difference is between 18.75% and 15.62%, the header error flag SLVHEF
(UART_LINSTS[1]) may either set or not.
Note:
The deviation check is based on the current baud rate clock. Therefore, in order to guarantee
correct deviation checking, the baud rate must reload the nominal value before each new break
reception by setting SLVDUEN (UART_LINCTL[3]) register (It is recommend setting the SLVDUEN
(UART_LINCTL[3]) bit before every checksum reception).
LIN Header Error Detection
In LIN Slave function mode, when user enables the header detection function by setting the SLVHDEN
(UART_LINCTL[1]), hardware will handle the header detect flow. If the header has an error, the LIN
header error flag SLVHEF (UART_LINSTS[1]) will be set and an interrupt is generated if the LINIEN
(UART_INTEN[8]) bit is set. When header error is detected, user must reset the detect circuit to re-
search a new frame header by writing 1 to SLVSYNCF (UART_LINSTS[3]) to re-search a new frame
header.
The LIN header error flag SLVHEF (UART_LINSTS[1]) is set if one of the following conditions occurs:
Break Delimiter is too short (less than 0.5-bit time).
Frame error in sync field or Identifier field.
The sync field data is not 0x55 (Non-Automatic Resynchronization mode).
The sync field deviation error (With Automatic Resynchronization mode).
The sync field measure time-out (With Automatic Resynchronization mode).
LIN header reception time-out.
6.11.5.11 RS-485 Function Mode
Another alternate function of UART controller is RS-485 function (user must set UART_FUNCSEL[2:0]
to
‘011’ to enable RS-485 function), and direction control provided by nRTS pin from an asynchronous
serial port. The RS-485 transceiver control is implemented by using the nRTS control signal to enable
the RS-485 driver. Many characteristics of the RX and TX are same as UART in RS-485 mode.
The UART controller can be configured as an RS-485 addressable slave and the RS-485 master
transmitter will identify an address character by setting the parity (9-th bit) to 1. For data characters, the
parity is set to 0. Software can use UART_LINE register to control the 9-th bit (When the PBE, EPE and
SPE are set, the 9-th bit is transmitted 0 and when PBE and SPE are set and EPE is cleared, the 9-th
bit is transmitted 1).
The controller supports three operation modes: RS-485 Normal Multidrop Operation Mode (NMM), RS-
485 Auto Address Detection Operation Mode (AAD) and RS-485 Auto Direction Control Operation Mode
(AUD). Software can choose any operation mode by programming the UART_ALTCTL register, and
drive the transfer delay time between the last stop bit leaving the TX FIFO and the de-assertion of by
setting DLY (UART_TOUT[15:8]) register.
RS-485 Normal Multidrop Operation Mode (NMM)
In RS-485 Normal Multidrop Operation Mode (RS485NMM (UART_ALTCTL[8]) = 1), in first, software
must decide the data which before the address byte be detected will be stored in RX FIFO or not. If
software wants to ignore any data before address byte detected, the flow is set RXOFF (UART_FIFO[8])
then enable RS485NMM (UART_ALTCTL[8]) and the receiver will ignore any data until an address byte
is detected (bit 9 = 1) and the address byte data will be stored in the RX FIFO. If software wants to