188
Atmel ATmega16/32/64/M1/C1 [DATASHEET]
7647K–AVR–12/13
17.5.11 Break-in-data
According to the LIN protocol, the LIN/UART controller can detect the BREAK/SYNC field sequence even if the break is partially
superimposed with a byte of the response. When a BREAK/SYNC field sequence happens, the transfer in progress is aborted
and the processing of the new frame starts.
●
On slave node(s), an error is generated (i.e. LBERR in case of Tx Response or LFERR in case of Rx Response).
●
On master node, the user (code) is responsible for this aborting of frame. To do this, the master task has first to abort the
on-going communication (clearing LCMD bits - LIN Abort command) and then to apply the Tx Header command. In this
case, the abort error flag - LABORT - is set.
On the slave node, the BREAK detection is processed with the synchronization setting available when the LIN/UART controller
processed the (aborted) response. But the re-synchronization restarts as usual. Due to a possible difference of timing reference
between the BREAK field and the rest of the frame, the time-out values can be slightly inaccurate.
17.5.12 Checksum
The last field of a frame is the checksum.
In LIN 2.1, the checksum contains the inverted eight bit sum with carry over all data bytes and the protected identifier. This
calculation is called enhanced checksum.
In LIN 1.3, the checksum contains the inverted eight bit sum with carry over all data bytes. This calculation is called classic
checksum.
Frame identifiers 60 (0x3C) to 61 (0x3D) shall always use classic checksum
17.5.13 Interrupts
interrupts. Each of these flags have their respective enable interrupt bit in LINENIR register.
Figure 17-13. LIN Interrupt Mapping
CHECKSUM
255
unsigned char
DATA n
0
n
PROTECTED ID.
+
unsigned char
DATA n
0
n
PROTECTED ID.
+
8
+
–
=
CHECKSUM
255
unsigned char
DATA n
0
n
unsigned char
DATA n
0
n
8
+
–
=
LABORT
LTOERR
LOVERR
LFERR
LSERR
LPERR
LCERR
LBERR
LERR
LIN ERR
LIN IT
LIDOK
LTXOK
LRXOK
LENERR
LINENIR.3
LINENIR.2
LINENIR.1
LINENIR.0
LENIDOK
LENTXOK
LENRXOK
LINSIR.3
LINSIR.2
LINERR.7
LINERR.6
LINERR.5
LINERR.4
LINERR.3
LINERR.2
LINERR.1
LINERR.0
LINSIR.1
LINSIR.0