9 xxerr flags, 10 frame time out – Rainbow Electronics ATmega64M1 User Manual
Page 214
214
8209A–AVR–08/09
ATmega16M1/32M1/64M1
21.5.9
xxERR Flags
LERR bit of the LINSIR register is an logical ‘OR’ of all the bits of LINERR register (see
21.5.13 “Interrupts” on page 216
). 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.
• LPERR = LIN Parity ERRor (identifier).
A LIN parity error in the IDENTIFIER field will be flagged if the value of the parity bits does
not match with the identifier value. (See LP[1:0] bits in
Section 21.6.8 “LINIDR – LIN Identifier
). A LIN slave application does not distinguish between corrupted
parity bits and a corrupted identifier. The hardware does not undertake any correction.
However, the LIN slave application has to solve this as:
- known identifier (parity bits corrupted),
- or corrupted identifier to be ignored,
- or new identifier.
• LSERR = LIN Synchronization ERRor.
A LIN synchronization error will be flagged if a slave detects the edges of the SYNCH field
outside the given tolerance.
• LFERR = LIN Framing ERRor.
A framing error will be flagged if dominant STOP bit is sampled.
Same function in UART mode.
• LTOERR = LIN Time Out ERRor.
A time-out error will be flagged if the MESSAGE frame is not fully completed within the
maximum length T
Frame_Maximum
by any slave task upon transmission of the SYNCH and
Section 21.5.10 “Frame Time Out” on page 214
).
• LOVERR = LIN OVerrun ERRor.
Overrun error will be flagged if a new command (other than LIN Abort) is entered while ‘Busy
signal’ is present.
In UART mode, an overrun error will be flagged if a received byte overwrites the byte stored
in the serial input buffer.
• LABORT
LIN abort transfer reflects a previous LIN Abort command (LCMD[2..0] = 000) while ‘Busy
signal’ is present.
After each LIN error, the LIN controller stops its previous activity and returns to its withdrawal
mode (LCMD[2..0] = 000
b
) as illustrated in
Writing 1 in LERR of LINSIR register resets LERR bit and all the bits of the LINERR register.
21.5.10
Frame Time Out
According to the LIN protocol, a frame time-out error is flagged if: T
Frame
> T
Frame_Maximum
. This
feature is implemented in the LIN/UART controller.