Civil Engineering Reference
In-Depth Information
Fig. 1.5
CAN error states
•
Bus Off
In this state, the CAN node is completely disconnected from the CAN bus. It there-
fore cannot send or receive messages or
Error Flags
. This state is reached when
there is a long disturbance on the CAN bus or a frequently repeated disturbance.
The transition from
Error Active
to
Error Passive
and vice versa is done automati-
cally by the CAN IC. The
Bus Off
state can be exited only by appropriate actions of
the host controller (software or hardware reset). The transitions between the states
are shown in Fig.
1.5
.
The error state transitions are controlled by so-called error counters. Each CAN
node has an error counter for receive errors (
Receive Error Counter—REC
) and an
error counter for transmit errors (
Transmit Error Counter—TEC
).
The states are characterized by the following count values:
•
Error Active
:
The counts of the
Receive Error Counter
and
Transmit Error Counter
are both less
than or equal to 127.
•
Error Passive
:
At least one of the two error counts is greater than 127 and the
Transmit Error
Counter
is less than 256.
•
Bus Off
:
The
Transmit Error Counter
is greater than 255.
The error counters are incremented on detected errors or decremented on successful
messages, according to the fault confinement rules. There are algorithms in the error
management that allow CAN nodes to distinguish between local and global errors.
Nodes seeing more local errors will reach the
Error Passive
state earlier than the
other CAN nodes.
The fault confinement rules are explained below (
Receive Error Counter
—
REC
;
Transmit Error Counter—TEC
):