Fault Confinement in CAN





Fault Confinment State:


In case of fault confinement, a CAN unit may be in the following state:

  • Error Active State -
       The unit which is Error Active state generally takes part in the bus communication and sends the 'ACTIVE ERROR FLAG ' when
    an error is encountered.
  • Error Passive State -
        A unit that is in Error Passive State also takes part in communication but in case of error detection it will send the
    'PASSIVE ERROR FLAG '. Also when one transaction is completed the error passive unit will go to the suspend state and will wait
    before starting the next transmission.
  • Bus Off State -
       When a CAN unit is in Bus Off state then it will not be allowed to take part in the bus communication.

Generally, two error counts are implemented in every CAN unit for fault confinement. These are:

  • TRANSMIT ERROR COUNT
  • RECEIVE ERROR COUNT

There are certain rules concerning which these counts are modified or implemented in the CAN unit. Let's check them in the below section.



Rules for error count implementations:


The rule for managing the error counts are as below:

  • When an error is detected by the Receiver then the RECEIVE ERROR COUNT will be increased by 1. But in case of an error like BIT ERROR occurring
    while sending an ACTIVE ERROR FLAG or OVERLOAD FLAG, the RECEIVE ERROR COUNT should not be changed.
  • When the RECEIVER sends an ERROR FLAG and detects a dominant bit as the first bit then the RECEIVE ERROR COUNT will be increased by 8.
  • When the ERROR FLAG is sent by a Transmitter then the TRANSMIT ERROR COUNT will be increased by 8.
    But also there are some exceptions when TRANSMIT ERROR COUNT doesn't changes:
    • If the Transmitter is in an error passive state and detects the ACKNOWLEDGEMENT ERROR and does not detect the dominant bit
      while sending a PASSIVE ERROR FLAG.
    • If Transmitter detects the STUFF ERROR during arbitration and sends the ERROR FLAG.
  • When a Receiver detects a BIT ERROR while sending the ACTIVE ERROR FLAG or OVERLOAD FLAG then the RECEIVE ERROR COUNT will be increased
    by 8.
  • Every node after sending an ACTIVE ERROR FLAG, PASSIVE ERROR FLAG, or OVERLOAD FLAG, can tolerate up to 7 consecutive dominant bits. After
    detecting the 14th consecutive dominant bit (in case of ACTIVE ERROR FLAG or OVERLOAD FLAG) or after detecting the 8th consecutive dominant bit
    following a PASSIVE ERROR FLAG, and after each sequence of additional eight consecutive dominant bits every Transmitter increases its
    TRANSMIT ERROR COUNT by 8 and Receiver increases its RECEIVE ERROR COUNT by 8.
  • In the case of a Transmitter, after the successful transmission of the message the TRANSMIT ERROR COUNT is decreased by 1 unless it was already zero.
  • In the case of a Receiver, after the successful reception of the message the RECEIVE ERROR COUNT is decreased by 1 if it was between 1 and 127. If it was
    0 then its value remains 0 and if it was greater than 127 then its value will be set to a value between 119 and 127.
  • When the value of TRANSMIT ERROR COUNT or RECEIVE ERROR COUNT equals or exceeds 128, then the node becomes error passive. This transition causes
    the node to send an ACTIVE ERROR FLAG.
  • When the TRANSMIT ERROR COUNT is greater than or equal to 256 then the node is in Bus Off State.
  • The state of the node changes from 'error passive ' to 'error active ' when both the TRANSMIT ERROR COUNT and RECEIVE ERROR COUNT are less than
    or equal to 127.
  • A node that is in Bus Off state can be changed to Error Active state if both error counters are set to 0 after 128 occurrences of 11 consecutive recessive bits
    have been monitored on the bus.