1. I want to add CAN bus off interrupt callback function in EB. I found in CANIf module, there is CanIfDispatchCfg, and if I set callback function name in CanIfDispatchUserCtrlBusOffName, and set "CDD" in CanIfDispatchUserCtrlBusOffUL, then can I set a callback function for bus off interrupt?
2. If not, can I set CAN bus interrupt callback function in EB? Here I use S32K344 and RTD 4.0.0.0.
Actually, when I follow the point 1 to set the bus off interrupt callback function, then after I build the project, some error reported, "CAN bus off callback function is not declared here".
Hi PetrS,
Thank you for your reply.
But we can not modify function CanIf_ControllerBusOff() as it is provided by RTD. Actually I want to perform some action when bus off occured. So I want to know whether there is a bus off interrupt callback function that I can use.
Hi,
below is feedback from RTD team...
This way just applied in ASR context. Please follow steps:
1. Create 1 callback function for Bus off in main.c. User defines this function by themselves.
2. Create 1 header file to extern this callback function and this file will be included in Can_Cfg.c. In my case, I created CanIf_Header.h
In this file, extern the function Bus Off Callback.
3. In CanIf configuration, fill header file and Call back function name.
BR, Petr