How can I implement a recovery mechanism for CAN Bus errors on the AVR128DA48 to avoid manual resets
I’m encountering error frames on the CAN Bus when two nodes try to send data simultaneously. I’m using the AVR128DA48 microcontroller. Below is my CAN Bus error handling code:
The system occasionally enters Bus Off mode, and I need to manually reset the CAN controller. How can I implement a proper recovery mechanism to handle CAN errors and automatically recover from Bus Off mode without manual intervention?
Solution:Jump to solution
hey guys, I fixed the issue with the system entering Bus Off mode by enabling automatic recovery on the AVR128DA48 microcontroller. Now, the controller automatically recovers after detecting 128 consecutive error-free frames. To make sure it works smoothly, I also added a backup that manually resets the CAN controller if the automatic recovery doesn’t kick in.
Here’s the updated error handling code:...
1 Reply
Solution
hey guys, I fixed the issue with the system entering Bus Off mode by enabling automatic recovery on the AVR128DA48 microcontroller. Now, the controller automatically recovers after detecting 128 consecutive error-free frames. To make sure it works smoothly, I also added a backup that manually resets the CAN controller if the automatic recovery doesn’t kick in.
Here’s the updated error handling code: