سؤال

It is known fact that short circuiting CAN_High and CAN_Low on a CAN bus leads to a bus off condition.

With respect to the physical layer, how does this condition lead to bus off condition?

هل كانت مفيدة؟

المحلول

CAN is a differential protocol. That means 0 or 1 (to be specific, dominant and recessive) is decided on the basis of the difference between voltages on the CANH and CANL lines.

When you short these two lines, there will not be any voltage difference and that falls under the voltage range of recessive bits. In other words, shorting two lines will be considered as a continuous transmission of recessive bits.

When you transmit 6 or more consecutive recessive bits, it is considered as an error!

And when this error count goes more than 255, the CAN controller goes into the BUS_OFF state.

As lines are shorted, there will be way more recessive bits and the error count will reach 255 in no time which will lead to BUS_OFF.

The CAN protocol does have a "bus recovery mechanism" in which it will wait for 11 consecutive recessive bits for 128 times (which it will as the bus is shorted), but again, the same error frame thing will happen, and it will be back in BUS_OFF.

This cycle will continue!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top