Debugging Intermittent CAN Bus Communication Failures on AVR128DA48

Hey guys, During integration testing, I’ve noticed intermittent failures in CAN Bus communication between nodes. Some messages are dropped, and errors are logged on the AVR128DA48. I’ve already checked for electrical noise and verified the hardware setup. I also added the following debug code to catch errors:
if (can_receive(can_dev, &rx_frame, K_MSEC(100)) == -EIO) {
printk("CAN receive error\n");
}
if (can_receive(can_dev, &rx_frame, K_MSEC(100)) == -EIO) {
printk("CAN receive error\n");
}
Despite this, the communication still fails occasionally. What further steps can I take to debug and ensure reliable communication on the CAN Bus network, especially with intermittent errors?
1 Reply
Joseph Ogbonna
Joseph Ogbonna2mo ago
You can use an oscilloscope to monitor CAN_H and CAN_L signals for distortion, ringing, or voltage drops. Sometimes also if your power network is not properly grounded, you can receive some garbage message on the system. one last thing i world say is to use a CAN Bus analyzer. This helps in proper CAN debugging process.
Want results from more Discord servers?
Add your server