45.6.9.7 Header Reception (Client Node Configuration)
All the LIN frames start with a header which is sent by the Host node and consists of a Synch Break Field, Synch Field and Identifier Field.
In Client node configuration, the frame handling starts with the reception of the header.
The USART uses a break detection threshold of 11 nominal bit times at the actual baud rate. At any time, if 11 consecutive recessive bits are detected on the bus, the USART detects a Break Field. As long as a Break Field has not been detected, the USART stays idle and the received data are not taken in account.
When a Break Field has been detected, US_CSR.LINBK is set to ‘1’ and the USART expects the Synch Field character to be 0x55. This field is used to update the actual baud rate in order to stay synchronized (see “Client Node Synchronization”). If the received Synch character is not 0x55, an Inconsistent Synch Field error is generated (see “LIN Errors”).
After receiving the Synch Field, the USART expects to receive the Identifier Field.
When the Identifier Field has been received, US_CSR.LINID is set to ‘1’. At this moment, US_LINIR.IDCHR is updated with the received character. The Identifier parity bits can be automatically computed and checked (see “Identifier Parity”).
If the Header is not entirely received within the time given by the maximum length of the header tHeader_Maximum, the error flag US_CSR.LINHTE is set to ‘1’.
The flag bits LINID, LINBK and LINHTE are reset by writing a ‘1’ to US_CR.RSTSTA.