25.3.4.3.3 Protected Identifier Field

The Protected Identifier (PID) Field consists of five data bits and two parity bits, in addition to the start bit and stop bit.

Figure 25-15. Protected Identifier Field

The parity bits are calculated using the following equations.

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 )

When the Frame Format (FORM) bit field in the Control C (USARTn.CTRLC) register is set to LIN Client mode (LINCLIENT), the USART will automatically performs a parity check on the PID field. If a parity error is detected, the Parity Error (PERR) flag in the Status (USARTn.STATUS) register is set. No parity check is performed on any subsequent data bytes received within the same LIN frame.

When the USART is configured as a LIN host (with the FORM bit field in the USARTn.CTRLC register set to LINHOST) and the LIN Command (LINCMD) bit field in the Command (USARTn.COMMAND) register is set to HEADER, the PID is automatically calculated from the identifier placed in the Transmit Data (USARTn.TXDATAL) register before transmission. If LINCMD is set to BREAK, the PID is not automatically calculated and must be calculated manually and placed in the Transmit Data (USARTn.TXDATAL) register together with the identifier.