I use S32DS for ARM.2018.R1 and SDK EAR 0.8.6.
On FlexCAN, How to get CAN error state (CAN BUS OFF)?
I can't find the function to get CAN error state.
sure - there is interrupt specially for Bus Off - CAN0_ORed_IRQHandler and for other errors you can implement
You can install your handler by INT_SYS_InstallHandler();
More details about CAN interrupts you can find on Chapter 53.1.4 FlexCAN Interrupts (S32K1xx Series Reference Manual, Rev. 7, 04/2018 - page 1630). SDK example lpit_periodic_interrupt_s32k144 is good example how to add custom interrupt handler.
Hope it helps.
it looks like that this feature is not implemented in SDK. You can get this info from register directly:
CAN0->ESR1 & CAN_ESR1_FLTCONF_MASK
Thanks for your response.
Can I set a callback or interrupt when a CAN error occurs?If so, how do I set it up?
Thanks for your help.
I will try it.
Retrieving data ...