Error Detection And Error Handling - Infineon Technologies TC1728 User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

20.1.4

Error Detection and Error Handling

The CAN protocol has sophisticated error detection mechanisms. The following errors
can be detected:
Cyclic Redundancy Check (CRC) Error
With the Cyclic Redundancy Check, the transmitter calculates special check bits for
the bit sequence from the start of a frame until the end of the Data Field. This CRC
sequence is transmitted in the CRC Field. The receiving node also calculates the
CRC sequence using the same formula, and performs a comparison to the received
sequence. If a mismatch is detected, a CRC error has occurred and an Error Frame
is generated. The message is repeated.
Acknowledge Error
In the Acknowledge Field of a message, the transmitter checks whether a dominant
bit is read during the Acknowledge Slot (that is sent out as a recessive bit). If not, no
other node has received the frame correctly, an Acknowledge Error has occurred,
and the message must be repeated. No Error Frame is generated.
Form Error
If a transmitter detects a dominant bit in one of the four segments End of Frame,
Interframe Space, Acknowledge Delimiter, or CRC Delimiter, a Form Error has
occurred, and an Error Frame is generated. The message is repeated.
Bit Error
A Bit Error occurs if a) a transmitter sends a dominant bit and detects a recessive bit
or b) if the transmitter sends a recessive bit and detects a dominant bit when
monitoring the actual bus level and comparing it to the just transmitted bit. In case b),
no error occurs during the Arbitration Field (ID, RTR, IDE) and the Acknowledge Slot.
Stuff Error
If between Start of Frame and CRC Delimiter, six consecutive bits with the same
polarity are detected, the bit-stuffing rule has been violated. A stuff error occurs and
an Error Frame is generated. The message is repeated.
Detected errors are made public to all other nodes via Error Frames (except
Acknowledge Errors). The transmission of the erroneous message is aborted and the
frame is repeated as soon as possible. Furthermore, each CAN node is in one of the
three error states (error-active, error-passive or bus-off) according to the value of the
internal error counters. The error-active state is the usual state where the bus node can
transmit messages and active-error frames (made of dominant bits) without any
restrictions. In the error-passive state, messages and passive-error frames (made of
recessive bits) may be transmitted. The bus-off state makes it temporarily impossible for
the node to participate in the bus communication. During this state, messages can be
neither received nor transmitted.
User's Manual
MultiCAN, V2.24
Controller Area Network Controller (MultiCAN)
20-9
TC1728
V1.0, 2011-12

Advertisement

Table of Contents
loading

Table of Contents