-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/samd5x: handle CAN errors #20667
cpu/samd5x: handle CAN errors #20667
Conversation
code looks good to me, |
Maybe it would be useful to include the Tx/Rx errors counter into the debug output when an error is triggered |
if there is a common interface (across all of our can drivers) 👍 else please not |
I mean adding to the _isr interface of the SAMD5x CAN, not in the application level |
if you think that will help and shorten debug sessions 👍 you are thinking of a
in the isr ? |
Yes that's what I'm proposing, just showcasing the errors counter directly from the CAN register |
waiting for this and will approve the PR then |
08a8881
to
1a76669
Compare
1a76669
to
31003bf
Compare
@kfessel have your change requests been addressed? |
Contribution description
This PR adds the handling of the CAN errors related interrupts.
The CAN errors are coded in this way:
Testing procedure
You can generate a CAN error by trying to send a CAN frame from the CAN controller (Board used is same54-xpro) without terminating the bus (i.e not connecting the CANH and CANL pins of the same54-xpro). An ACK error will be generated then and handled.