How do I detect there is no CAN bus connected?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How do I detect there is no CAN bus connected?

2,832 次查看
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"

标签 (1)
标记 (1)
0 项奖励
回复
0 回复数