SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
Multi-drop mode is enabled in the UART_EFR2 register.
Address matching mode is only available with 8 bit character length setting. UART_LCR[1-0] CHAR_LENGTH bit fields should always be set to 0x11 (8 bits) prior to enabling the feature.
This mode allows the transmitter to send data on a line where multiple receivers are connected, when supported. In this mode, a set parity bit is used to mark an address, and a parity of 0 denotes data.
This setting affects how the parity is generated. Writing a 0x1 into the UART_ECR[0] A_MULTIDROP bit will set the parity bit for the next byte to be sent, which will then be considered an address, for sending a data frame, the UART_ECR[0] A_MULTIDROP bit has to be cleared.
On reception if the feature is enabled by setting the UART_EFR2[2] MULTIDROP bit to 0x1 incoming frames with parity set to 0x1 are treated as address frames and with parity set to 0x0 as data frames. The receiver will drop all data frames until a matching address frame was found.
The matching address is determined by the values set in UART_MAR, UART_MMR and UART_MBR registers and the value set in UART_EFR2[7] BROADCAST bit.
Table 12-474 summarizes the operation of address matching based on the mentioned values.
Received frame | Received parity | Frame type | UART_MAR | UART_MMR | UART_MBR | UART_EFR2[7] BROADCAST | Operation of receiver | Address matching |
---|---|---|---|---|---|---|---|---|
0xXX(2) | 0 | DATA | X(1) | X(1) | 0xXX(2) | X(1) | Drops data until matching address found | N/A |
0xXX(2) | 1 | ADDRESS | 0xXX(2) | 0x00 | 0xXX(2) | 0 | Matches any address | Yes |
0xEF | 1 | ADDRESS | 0xXX(2) | 0xXX(2) | 0xEF | 1 | Matches broadcast address | Yes |
0x1A | 1 | ADDRESS | 0x1A | 0xFF | 0xXX(2) | 0 | Single address match | Yes |
0xF5 | 1 | ADDRESS | 0xF3 | 0xF9 | 0xXX(2) | 0 | Group address match | Yes |
The possible values for matching address can be calculated in the following way:
If an address match occurred the matching address value can be obtained from the UART_RHR register in the following way:
For received data, the parity error bit in the UART_LSR_UART register is set when a bit with a parity of 0x1 is received indicating an address frame and the received address matches based on the values of UART_MAR, UART_MMR, UART_MBR and UART_EFR2[2] MULTIDROP bit.
In Multi-drop mode no parity is used, as the parity bit is used to differentiate address and data frames. The parity error bit is used for indicating an address match.
For enabling the interrupt generation for address matching UART_IER_UART[2] LINE_STS_IT bit has to be set to 0x1.
An interrupt for the matching address can be identified by reading the UART_IIR_UART[5-1] IT_TYPE bit fields, a value of 0x00011 indicates a receiver line status error. After the UART_LSR_UART[2] RX_PE bit has to be read, a value of 0x1 indicates that an address match occurred. The reception of a frame is indicated with a value of 0x1 in the UART_LSR_UART[0] RX_FIFO_E bit as the matching value is written into the FIFO regardless of the frame type (data or address). UART_LSR_UART[7] RX_FIFO_STS bit will also be set to 0x1 as the parity error bit is used to indicate a matching address.
Note that the operation of the UART_LSR_UART[2] RX_PE bit depends on the value set in UART_EFR2[2] MULTIDROP bit. If UART_EFR2[2] MULTIDROP bit is set to 0x0, UART_LSR_UART[2] RX_PE bit is used to indicate a received parity error. If UART_EFR2[2] MULTIDROP bit is set to 0x1, the receiver is in Multi-drop Address Match mode, thus the value in UART_LSR_UART[2] RX_PE bit is used to indicate an address match.
The interrupt is cleared the same way in both operation modes: reading the UART_LSR_UART register updates the values.