17.5.7.5 Data Length after Error
Figure 17-11. Tx Response - Error
LERR
st
nd
rd
1
Byte
2
Byte
3
Byte
DATA-2
ERROR
DATA-0
DATA-1
LIN bus
4
4
0
1
2
LRXDL
LTXDL
LBUSY
LCMD2..0 = 000b
LCMD = Tx Response
Note:
Information on response (ex: error on byte) is only available at the end of the serialization/de-serialization of
the byte.
17.5.7.6 Data Length in UART Mode
●
●
The UART mode forces LRXDL and LTXDL to 0 and disables the writing in LINDLR register,
Note that after reset, LRXDL and LTXDL are also forced to 0.
17.5.8 xxOK Flags
There are three xxOK flags in LINSIR register:
●
LIDOK: LIN IDentifier OK
It is set at the end of the header, either by the Tx header function or by the Rx header. In LIN 1.3, before generating
LIDOK, the controller updates the LRXDL and LTXDL fields in LINDLR register.
It is not driven in UART mode.
●
●
LRXOK: LIN RX response complete
It is set at the end of the response by the Rx response function in LIN mode and once a character is received in UART
mode.
LTXOK: LIN TX response complete
It is set at the end of the response by the Tx Response function in LIN mode and once a character has been sent in
UART mode.
These flags can generate interrupts if the corresponding enable interrupt bit is set in the LINENIR register (see Section
17.5.13 “Interrupts” on page 188).
17.5.9 xxERR Flags
LERR bit of the LINSIR register is an logical ‘OR’ of all the bits of LINERR register (see Section 17.5.13 “Interrupts” on page
188). There are eight flags:
●
LBERR = LIN Bit ERRor.
A unit that is sending a bit on the bus also monitors the bus. A LIN bit error will be flagged when the bit value that is
monitored is different from the bit value that is sent. After detection of a LIN bit error the transmission is aborted.
●
LCERR = LIN Checksum ERRor.
A LIN checksum error will be flagged if the inverted modulo-256 sum of all received data bytes (and the protected
identifier in LIN 2.1) added to the checksum does not result in 0xFF.
186
ATmega16/32/64/M1/C1 [DATASHEET]
7647O–AVR–01/15