Ok, I got it. I have one more question,
in flexcan irq module,
default interrupt handler signatures; these; CAN0_ORed_Err_Wakeup_IRQHandler() and CAN0_ORed_0_31_MB_IRQHandler().
#if (CAN_INSTANCE_COUNT > 0U)
/* Implementation of CAN0 IRQ handler for OR'ed interrupts (Bus Off,
Transmit Warning, Receive Warning, Error, Wakeup). */
void CAN0_ORed_Err_Wakeup_IRQHandler(void)
{
FLEXCAN_IRQHandler(0U);
}
/* Implementation of CAN0 IRQ handler for interrupts indicating a successful
transmission or reception for Message Buffers 0-31. */
void CAN0_ORed_0_31_MB_IRQHandler(void)
{
FLEXCAN_IRQHandler(0U);
}
#endif /* (CAN_INSTANCE_COUNT > 0U) */
#elif (defined (CPU_S32K142) || defined (CPU_S32K144HFT0VLLT) || defined (CPU_S32K144LFT0MLLT) ||\
defined (CPU_S32K146) || defined (CPU_S32K148) || defined (CPU_S32MTV) || defined (CPU_S32K116)\
|| defined (CPU_S32K118) || defined (CPU_S32K144W) || defined (CPU_S32K142W))
/*******************************************************************************
* Code
******************************************************************************/
#if (CAN_INSTANCE_COUNT > 0U)
/* Implementation of CAN0 IRQ handler for OR'ed interrupts (Bus Off,
Transmit Warning, Receive Warning). */
void CAN0_ORed_IRQHandler(void)
{
FLEXCAN_BusOff_IRQHandler(0U);
}
but there is a CAN0_ORed_IRQHandler function within the scope of the #elif directive, this function calls FLEXCAN_BusOff_IRQHandler directly. The function description is the same as CAN0_ORed_Err_Wakeup_IRQHandler(). This part confused me. Do I need to do anything specifically for the busoff_irq handler or does it get triggered when the error counter exceeds 255?