EMC FLEX BLOG A site dedicated to Automotive EMC Testing for Electronic Modules

CAN Bus Noise Tolerance

27. March 2016 09:49 by Christian in
The data is carried on the CAN bus as a voltage difference between the two signal lines. If both li

The data is carried on the CAN bus as a voltage difference between the two signal lines. If both lines are at the same voltage, the signal is a recessive bit. If the CAN_H line is higher than the CAN_L line by 0.9V, the signal line is a dominant bit.

Immunity to Ground Noise

The CAN bus does not use the ground as reference point for these two signal lines. Therefore the CAN bus transmissions lines are immune to any ground noise typically present in automotive applications.

Immunity to Electromagnetic Filed

The signals on the two CAN lines will both be subject to the same electromagnetic filed level. Therefore no differences in voltages between the two lines should become relevant under electromagnetic interference.

Using Twisted Pair Wires for Differential Signal Lines

Bad connectors are almost guaranteed to present an impedance discontinuity, and hence will cause reflections. Transmission line stubs of any length are also a source of reflections, longer the stub, the worse the impact of the reflections on lower data rate signals. Reflections are bad because they can cause destructive interference that can corrupt any transmitted data.

Christian Rosu

CAN Bus Tx/Rx Error Confinement Rules

25. March 2016 04:41 by Christian in
Normal 0 false false false EN-CA X-NONE X-NONE

TEC = Transmitter Error Counter
REC = Receiver Error Counter

  • When a receiver detects an error, the REC will be increased by 1, except when the detected error was a Bit Error during the sending of an Active error Flag or an Overload Flag.
  • When a receiver detects a dominant bit as the first bit after sending an Error Flag, the REC will be increased by 8.
  • When a transmitter sends an Error Flag, the TEC is increased by 8. Exception 1: If the transmitter is Error Passive and detects an ACK Error because of not detecting a dominant ACK and does not detect a dominant bit while sending its Passive Error Flag. Exception 2: If the transmitter sends an Error Flag because a Stuff Error occurred during arbitration, and should have been recessive, and has been sent as recessive but monitored as dominant.
  • If the transmitter detects a Bit Error while sending an Active Error Flag or an Overload Frame, the TEC is increased by 8.
  • If a receiver detects a Bit Error while sending an Active Error Flag or an Overload Flag, the REC is increased by 8.
  • Any node tolerates up to 7 consecutive dominant bits after sending an Active Error Flag, Passive Error Flag or Overload Flag. After detecting the fourteenth consecutive dominant bit (in case of an Active Error Flag or an Overload Flag) or after detecting the eighth consecutive dominant bit following a Passive Error Flag, and after each sequence of additional eight consecutive dominant bits, ever y transmitter increases its TEC by 8 and every receiver increases its REC by 8.
  • After successful transmission of a frame (getting ACK and no error until EOF is finished), the TEC is decreased by 1 unless it was already 0.
  • After the successful reception of a frame (reception without error up to the ACK Slot and the successful sending of the ACK bit), the REC is decreased by 1, if it was between 1 and 127. If the REC was 0, it stays 0, and if it was greater than 127, then it will be set to a value between 119 and 127.
  • A node is Error Passive when the TEC equals or exceeds 128, or when the REC equals or exceeds 128. An error condition letting a node become Error Passive causes the node to send an Active Error Flag.
  • A node is Bus Off when the TEC is greater than or equal to 256.
  • An Error Passive node becomes Error Active again when both the TEC and the REC are less than or equal to 127.
  • A node which is Bus Off is permitted to become Error Active (no longer Bus Off) with its error counters both set to 0 after 128 occurrence of 11 consecutive recessive bits have been monitored on the bus.

CAN BUS Off Error Handling

21. March 2016 00:40 by Christian in
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM

CAN Bus Error Handling

Error handling is built into in the CAN protocol. Each node maintains two error counters: the Transmit Error Counter and the Receive Error Counter. Using the error counters, a CAN node can not only detect faults but also perform Error Confinement.

 

CAN Bus Error Detection Mechanisms

1. Bit Monitoring.

2. Bit Stuffing.

3. Frame Check.

4. Acknowledgement Check.

5. Cyclic Redundancy Check.

 

CAN Bus Error Confinement

 

The CAN bus is capable to distinguish between temporary erratic errors and continual erratic errors.

A node starts out in Error Active mode. When any one of the two Error Counters raises above

127, the node will enter a state known as Error Passive and when the Transmit Error Counter raises above 255, the node will enter the Bus Off state.

 

Error Active              node will transmitActive Error Flags when it detects errors.

Error Passive            node will transmit Passive Error Flags when it detects errors.

Bus Off                      node is disabled from transmit/receive operations.

 

Transmit errors give 8 error points

Receive errors give 1 error point

 

Correctly transmitted and/or received messages causes the counter(s) to decrease.

 

Whenever a node tries to transmit a message, if for whatever reason fails it will increases its Transmit Error Counter by 8 and transmits an Active Error Flag. Then it will attempt to retransmit the message, and if it fails will increment by 8 points the Transmit counter. Above 127 (i.e. after 16 attempts), this node goes Error Passive and from this moment it will transmit Passive Error Flags on the bus. A Passive Error Flag will not affect other bus traffic, the other nodes won’t hear the faulty node complaining about bus errors. However, the faulty node continues to increase its Transmit Error Counter and once above 255 it will go into Bus Off.

 

Error state of a node unit

Transmit error counter (TEC)

Receive error counter (REC)

Error active state

0 – 127

AND

0 – 127

Error passive state

128255

OR

128255

Bus off state

Minimum 256

 






For every active error flag that transmitted by a faulty node, the other nodes will increase their Receive Error Counters by 1. By the time that a faulty node goes Bus Off, the other nodes will have their Receive Error Counters below Error Passive limit (127). This count will decrease by one for every correctly received message the faulty node being in Bus off state.

 

 

 

Transmit/receive error counter change conditions

Transmit error counter (TEC)

Receive error counter (REC)

1

When the receive unit has detected an error, except when the receiveunit detected a bit error while it was sending an active-error flag or overload flag.

 

 

+1

2

When the receive unit has detected a dominant level in the firstbit that it received after sending an error flag.

 

 

+8

3

When the transmit unit has transmitted an error flag 1)

+8

4