At a CAN-bus there are several possible types of errors:
-> bit-errors
-> Form errors
-> Stuff errors
-> CRC errors
-> Acknowledge errors
For detailled infos about this errors please take a look at http://www.wikipedia.com (keyword: CAN-bus)
All these errors will be counted by the error-counters (a receive error counter and a transmit error counter) from the CAN-controller. There´s no time intervall for the count. For each transmitted or received message the error counters will be increased respectively decreased.
After a reset both counters are 0. In a range between 0 to 127 the CAN-controller are "error activ". This means that a CAN-node which detect as first node a receive error sends a flag (error active flag) to the CAN-bus. Through this flag the message will be unvalid for all CAN-nodes and the error receive counter of each receiver will be increased by 1. The node which detect as first node the error increase his counter with 8 points. After a succesfull transmission of a CAN-message the transmit error counter from the sender decrease by 1. After a succesfull reception of a CAN-message the receive error counter decrease also by 1.
At 128 error points the CAN-controller works in a "error passive" mode. The CAN-node is fully functional working in this state, but if the node detect an error he signalize this with a passive error flag. This flag don´t destroy the CAN-message and the CAN-node must wait some time before he can send a CAN-message. This prevented that a CAN-node with a high error-rate blocked the bus.
The "bus-off" state is reached when the error counter is higher than 255 error points. In this state the CAN-controller is disconnected from the bus.
Note: If an "error passive" CAN-node detect an acknowledge error he don´t increase his transmit error counter furthermore. This avoid that a transmitting CAN-node without any (other) acknowledging CAN-node in the system go into the "bus-off" state.
Buslight: appears by more than 96 error points, the CAN-node work in the "error active" state
Busheavy: appears by more than 127 error points, the CAN-node work in the "error passive" state
Busoff: appears by more than 255 error points, the CAN-node is disconnected from the bus

