Saturday, November 14, 2009

CAN BUS MESSAGE FRAMES - Error Frame




An error frame is generated by any node that detects a
bus error. An error frame, shown in Figure 2-4, consists
of two fields: an error flag field followed by an error
delimiter field. There are two types of error flag fields.
The type of error flag field sent depends upon the error
status of the node that detects and generates the error
flag field.


2.4.1 ACTIVE ERRORS
If an error-active node detects a bus error, the node
interrupts transmission of the current message by
generating an active error flag. The active error flag is
composed of six consecutive dominant bits. This bit
sequence actively violates the bit-stuffing rule. All other
stations recognize the resulting bit-stuffing error and, in
turn, generate error frames themselves, called error
echo flags.

The error flag field, therefore, consists of between six
and twelve consecutive dominant bits (generated by
one or more nodes). The error delimiter field (eight
recessive bits) completes the error frame. Upon
completion of the error frame, bus activity returns to
normal and the interrupted node attempts to resend the
aborted message.

2.4.2 PASSIVE ERRORS
If an error-passive node detects a bus error, the node
transmits an error-passive flag followed by the error
delimiter field. The error-passive flag consists of six
consecutive recessive bits. The error frame for an errorpassive
node consists of 14 recessive bits. From this it
follows that, unless the bus error is detected by an erroractive
node or the transmitting node, the message will
continue transmission because the error-passive flag
does not interfere with the bus.

If the transmitting node generates an error-passive flag,
it will cause other nodes to generate error frames due
to the resulting bit-stuffing violation. After transmission
of an error frame, an error-passive node must wait for
six consecutive recessive bits on the bus before
attempting to rejoin bus communications.
The error delimiter consists of eight recessive bits and
allows the bus nodes to restart bus communications
cleanly after an error has occurred.

http://ww1.microchip.com/downloads/en/DeviceDoc/21801d.pdf

Relate Posts