17.5.7.1
Data Length in LIN 2.1
17.5.7.2
Data Length in LIN 1.3
17.5.7.3
Data Length in Rx Response
LRXDL (*)
Atmel ATmega16/32/64/M1/C1
216
• If LTXDL[3..0]=0 only the CHECKSUM will be sent,
• If LRXDL[3..0]=0 the first byte received will be interpreted as the CHECKSUM,
• If LTXDL[3..0] or LRXDL[3..0] >8, values will be forced to 8 after the command setting and
before sending or receiving of the first byte.
• LRXDL and LTXDL fields are both hardware updated before setting LIDOK by decoding the
data length code contained in the received PROTECTED IDENTIFIER (LRXDL = LTXDL).
• Via the above mechanism, a length of 0 or >8 is not possible.
Figure 17-9. LIN2.1 - Rx Response - No error
LIDOK
1
DATA-0
LIN bus
4
?
LTXDL (*)
LBUSY
LINDLR=0x?4
(*) : LRXDL & 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).
st
nd
Byte
2
Byte
DATA-1
0
1
LCMD=Rx Response
rd
th
3
Byte
4
Byte
DATA-2
DATA-3
2
3
LRXOK
CHECKSUM
4
LCMD2..0=000
b
7647H–AVR–03/12
Need help?
Do you have a question about the ATmega32M1 and is the answer not in the manual?
Questions and answers