25.3.4.3.2 LIN Host
LIN Host mode is enabled by configuring the Frame Format (FORM) bit field to LIN Host (LINHOST) mode. In this mode, the USART can transmit LIN headers with a BREAK, SYNC and Protected Identifier (PID) field. The header can be controlled by software, or fully automated by hardware.
- Set the LIN Command (LINCMD) bit
field in the Command (USARTn.COMMAND) register to BREAK
(
0x01). - Write any value to the Transmit Data (USARTn.TXDATAL) register to trigger the transmission of the BREAK field.
- Write
0x55to the Transmit Data (USARTn.TXDATAL) register to transmit the SYNC field. - Write the PID value (including parity bits) to the Transmit Data (USARTn.TXDATAL) register.
- Set the LIN Command (LINCMD) bit
field in the Command (USARTn.COMMAND) register to HEADER
(
0x02). - Write the identifier value to the Transmit Data (USARTn.TXDATAL) register.
In LIN Host mode, the length of the BREAK field is programmable using the Break Length (BRKLEN) bit field in the Control F (USARTn.CTRLF) register. When the automatic header command is used, the delay between the BREAK and SYNC fields is fixed to two bit times. When software controlled transmission is used, software controls the delay between the BREAK and SYNC fields.
