25.3.2.4.3 Parity Checker

When enabled, the parity checker calculates the parity of the data bits in incoming frames and compares the result with the parity bit of the corresponding frame. If a parity error is detected, the Parity Error flag (PERR in USARTn.RXDATAH) is set.

If USART LIN mode is enabled (by writing RXMODE to '1' in USARTn.CTRLB), a parity check is only performed on the protected identifier field. A parity error is detected if one of the equations below is not true which sets PERR in USARTn.RXDATAH.

P 0 = I D 0 XOR I D 1 XOR I D 2 XOR I D 4 P 1 = NOT ( I D 1 XOR I D 3 XOR I D 4 XOR I D 5 )
Figure 25-6. Protected Identifier Field and Mapping of Identifier and Parity Bits