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.

P0=ID0XORID1XORID2XORID4P1=NOT(ID1XORID3XORID4XORID5)
Figure 1. Protected Identifier Field and Mapping of Identifier and Parity Bits