Hi,
I'm using FlexCAN on the S32G platform. Currently, when FlexCAN receives an error frame interrupt, it creates a CAN frame and fills the CAN ID and payload with values from the error register. However, I'm unable to determine which specific CAN frame caused the bus error.
In CANoe, we can see the error frame with the correct CAN ID and payload in the trace window. Is there a way to retrieve the error frame's CAN ID and payload programmatically, similar to CANoe?
I’d appreciate any guidance on this. Thanks in advance!
hi,ventury
Thank you for contacting us.
are you using M or A core for FlexCAN? Which version of RTD are you using?
Do you have an ID filter for CAN frame?
BR
Joey
hi,ventury
Thank you for your reply.
Do you mean that when you are using the Flexcan of S32G, you can detect CAN error frames, but you cannot know the ID and payload of this error frame?
BR
Joey
hi,ventury
Thank you for your reply.
Why do you want to get the error frame? The error frame will be abandoned in the normal usage scenarios.
If the protocol level frame occurs error, the S32G can get the frame and operate it. For flexcan, the relevant states register will be changed when S32G receive the error frame.
I think you should consider the kind of error frame. such as, it is the error of CRC on one frame, you can try to check the memory for the frame ID and payload.
Hope it can help you.
BR
Joey