Hi all,
if the CRC bits of sending signal and calculated receive CRC bits are different, it indicates error condition.
How it indicates the error condition?
How I can find that there are CRC error?
When it can be re-activated?
Thank you
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
if the CRC bits of sending signal and calculated receive CRC bits are different, it indicates error condition.
How it indicates the error condition?
How I can find that there are CRC error?
When it can be re-activated?
Thank you
Gary,
During the CRC check of the CAN frame, if it detected as incorrect by a receiver, that receiver sends an error frame after the ACK delimiter. The error frame in CAN protocol is represented as 6 dominant bits in a row followed by 8 recessive bits as the error delimiter. In a real system, the error posting will happen at different times from node to node, so the error signal can last from 6 to 12 dominant bits.
In controllers defined by the Bosch MCAN specification, there are bits to indicate frame errors. These bits are called the last error code (LEC) bits, and different values indicate a different failure. In the TCAN4550-Q1, a CRC error is represented by a value of 6 in these register bits.
The CAN controller can also be configured to either continue re-transmitting when a frame error is detected, or to stop transmitting immediately if the error is detected. If re-transmitting is used, which is typical, the CAN protocol has a built-in error counter that has 3 phases: error active, error passive, and bus off. The figure below illustrates how this function works.
The device starts in error active, generating an error frame of 6 dominant bits every time an error is detected, and incrementing the transmit error counter by 8 if it is the node transmitting the error. Once the counter hits 128, the node goes into error passive where it will then transmit error frames as 6 recessive bits as to not disrupt the bus. If the error is still persisting, then the device goes into bus off, where it no longer interacts with the CAN bus at all.
In order to decrement the error counters, correct messages must be transmitted on the CAN bus. You can read more about CAN errors in this FAQ.
Regards,