www.national.com
92
Error Counters
The CR16CAN module contains two error counters to per-
form the error management. The receive error counter (REC)
and the transmit error counter (TEC) are 8-bits wide, located
in the 16-bit wide CANEC register. The counters are modified
by the CR16CAN according to the rules listed in Table 20 “Er-
ror Counter Handling”.
The Error counters can be read by the users software as de-
scribed under CAN Error Counter Register (CANEC) on page
114.
ERROR
ACTIVE
(TEC AND REC) < 128
BUS
OFF
TEC > 255
128 occurrences of
11 consecutive ‘recessive’ bits
Figure 51.
CR16CAN Bus States
PASSIVE
(TEC OR REC) > 127
ERROR
ERROR
WARNING
(TEC OR REC) > 95
(TEC AND REC) < 96
SYNC
11 consecutive ‘recessive’ bits
received
external RESET or
enable CR16CAN
Table 20
Error Counter Handling
Condition
a
Action
Receive Error Counter Conditions
b
A receiver detects a Bit Error during sending an active error flag.
increment by 8
A receiver detects a ‘dominant’ bit as the first bit after sending an error flag
increment by 8
After detecting the 14th consecutive ‘dominant’ bit following an active error flag or overload
flag, or after detecting the 8th consecutive ‘dominant’ bit following a passive error flag.
After each sequence of additional 8 consecutive ‘dominant’ bits.
increment by 8
Any other error condition (stuff, frame, CRC, ACK)
increment by 1
A valid reception or transmission
decrement by 1 unless
counter is already 0
Transmit Error Counter Conditions
A transmitter detects a Bit Error during sending an active error flag
increment by 8
After detecting the 14th consecutive ‘dominant’ bit following an active error flag or overload flag
or after detecting the 8th consecutive ‘dominant’ bit following a passive error flag.
After each sequence of additional 8 consecutive ‘dominant’ bits.
increment by 8
Any other error condition (stuff, frame, CRC, ACK)
increment by 8
A valid reception or transmission
decrement by 1 unless
counter is already 0
a. This table provides an overview of the CAN error conditions and the behavior of the CR16CAN; for a detailed description of the
error management and fault confinement rules, please refer to the CAN Specification 2.0B
b. If the MSB (bit 7) of the REC is set, the node is error passive and the REC will not increment any further.