Why are no messages being received?

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

Why are no messages being received?

1,817 次查看
lpcware
NXP Employee
NXP Employee

Use a scope to confirm messages are appearing at the CAN transceivers and the CAN_RX pin. If not then the bus connection is possibly broken.
Check to make sure the CAN pins have been configured for CAN peripheral operation and the CAN peripheral has been connected to the pin using the pinmux.
Some CAN controllers have a special test mode where the state of the pins can be controlled and monitored through bits in CAN controller registers. This is a useful way to confirm that the peripheral has access to the pins and is correctly reading and controlling them.
Monitor the value of the receive error counter. If this is increasing then the CAN controller is detecting something and possibly the bitrate configuration is incorrect. Try transmitting a message and measure the bitrate to confirm it is the expected value. To measure the bitrate, look for and measure the length of the shortest low or high pulse (1-0-1 or 0-1-0 transition) at the CAN_TX pin. The CAN bitrate will be the reciprocal of that value.
If the receive interrupt is not triggering, monitor the receive data buffer (i.e. polling) to see if messages are being received. If they are then the interrupt configuration is likely incorrect. Perhaps the interrupt has not been enabled in the NVIC, which is typically a separate step required.

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

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