How do I detect there is no CAN bus connected?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I detect there is no CAN bus connected?

2,145 Views
lpcware
NXP Employee
NXP Employee

If there is no CAN bus then each attempt to transmit a frame will fail and the transmit error counter will increase. The error counter can be read before and after transmission. In addition CAN controllers typically provide a range of error flags in a register which gives a reason for the transmission failure which can usually be connected to an error interrupt. Note that in this situation the error counter will stop before reading 256 and therefore the bus off state will not be entered.

"FAQ contribution from Embedded Systems Academy, experts in CAN bus. For more information visit www.esacademy.com"

Labels (1)
Tags (1)
0 Kudos
Reply
0 Replies