
M0A21/M0A23 Series
May 06, 2022
Page
443
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
receive any data before address byte detected, the flow is disables RXOFF (UART_FIFO[8]) then enable
RS485NMM (UART_ALTCTL[8]) and the receiver will received any data.
If an address byte is detected (bit 9 = 1), it will generate an interrupt to CPU and RXOFF (UART_FIFO[8])
can decide whether accepting the following data bytes are stored in the RX FIFO. If software disables
receiver by setting RXOFF (UART_FIFO[8]) register, when a next address byte is detected, the
controller will clear the RXOFF (UART_FIFO[8]) bit and the address byte data will be stored in the RX
FIFO.
RS-485 Auto Address Detection Operation Mode (AAD)
In RS-485 Auto Address Detection Operation Mode (RS485AAD (UART_ALTCTL[9]) = 1), the receiver
will ignore any data until an address byte is detected (bit 9 = 1) and the address byte data matches the
ADDRMV (UART_ALTCTL[31:24]) value. The address byte data will be stored in the RX FIFO. The all
received byte data will be accepted and stored in the RX FIFO until an address byte data not match the
ADDRMV (UART_ALTCTL[31:24]) value.
RS-485 Auto Direction Function (AUD)
Another option function of RS-485 controllers is RS-485 auto direction control function (RS485AUD
(UART_ALTCTL[10) = 1). The RS-485 transceiver control is implemented by using the nRTS control
signal from an asynchronous serial port. The nRTS line is connected to the RS-485 transceiver enable
pin such that setting the nRTS line to high (logic 1) enables the RS-485 transceiver. Setting the nRTS
line to low (logic 0) puts the transceiver into the tri-state condition to disabled. User can set RTSACTLV
in UART_MODEM register to change the nRTS driving level.
Figure 6.11-24 demonstrates the RS-485 nRTS driving level in AUD mode. The nRTS pin will be
automatically driven during TX data transmission.
Setting RTSACTLV (UART_MODEM[9]) can control nRTS pin output driving level. User can read the
RTSSTS (UART_MODEM[13]) bit to get real nRTS pin output voltage logic status.
D0
D1
D2
D3
D4
D5
D6
D7
P
Start
bit
Stop
bit
TX pin output
(default)
Driver Enable
nRTS pin output status of RS-485 function mode (RS-485 AUD mode enabled)
RTSACTLV = 0
RTSACTLV = 1
RTSSTS
(UART_MODEM[13])
nRTS pin output
Note:
RS485AUD (UART_ALTCTL[10]) = 1, the nRTS pin output by hardware control only.
Figure 6.11-24 RS-485 nRTS Driving Level in Auto Direction Mode
Figure 6.11-25 demonstrates the RS-485 nRTS driving level in software control (RS485AUD
(UART_ALTCTL[10])=0). The nRTS driving level is controlled by programing the RTS
(UART_MODEM[1]) control bit.
Setting RTSACTLV (UART_MODEM[9]) can control the nRTS pin output is inverse or non-inverse from
RTS (UART_MODEM[1]) control bit. User can read the RTSSTS (UART_MODEM[13]) bit to get real
nRTS pin output voltage logic status. The structure of RS-485 frame is shown in Figure 6.11-26.