17.5.7.3 Data Length in Rx Response
Figure 17-9. LIN2.1 - Rx Response - No Error
LIDOK
LRXOK
1st Byte
2nd Byte
DATA-1
3rd Byte
DATA-2
4th Byte
DATA-3
DATA-0
LIN bus
CHECKSUM
4
?
LRXDL (*)
LTXDL (*)
LBUSY
0
1
2
3
4
LCMD = Rx Response
LCMD2..0 = 000b
LINDLR = 0x?4
(*): LRXDL and LTXDL updated by user
●
●
●
●
●
The user initializes LRXDL field before setting the Rx response command,
After setting the Rx response command, LTXDL is reset by hardware,
LRXDL field will remain unchanged during Rx (during busy signal),
LTXDL field will count the number of received bytes (during busy signal),
If an error occurs, Rx stops, the corresponding error flag is set and LTXDL will give the number of received bytes
without error,
●
If no error occurs, LRXOK is set after the reception of the CHECKSUM, LRXDL will be unchanged (and
LTXDL = LRXDL).
17.5.7.4 Data Length in Tx Response
Figure 17-10. LIN1.3 - Tx Response - No Error
LIDOK
LTXOK
1st Byte
DATA-0
2nd Byte
3rd Byte
DATA-2
4th Byte
DATA-3
DATA-1
CHECKSUM
4
LIN bus
LRXDL (*)
LTXDL (*)
LBUSY
4
4
0
1
2
3
LCMD2..0 = 000b
LCMD = Tx Response
(*): LRXDL and LTXDL updated by Rx Response or Tx Response task
●
●
●
●
●
The user initializes LTXDL field before setting the Tx response command,
After setting the Tx response command, LRXDL is reset by hardware,
LTXDL will remain unchanged during Tx (during busy signal),
LRXDL will count the number of transmitted bytes (during busy signal),
If an error occurs, Tx stops, the corresponding error flag is set and LRXDL will give the number of transmitted bytes
without error,
●
If no error occurs, LTXOK is set after the transmission of the CHECKSUM, LTXDL will be unchanged (and
LRXDL = LTXDL).
ATmega16/32/64/M1/C1 [DATASHEET]
185
7647O–AVR–01/15