There seems to be a problem with flexcan_driver.c
when FIFO mode is used and an incoming packet is not dealt with in time by (for example) FLEXCAN_DRV_RxFifoBlocking()
causing an overrun. The interrupt handler FLEXCAN_IRQHandler()
at flexcan_driver.c gets called forever because the interrupt is never cleared from IFLAG1
(c.f. 50.4.2.11).
Basically, FLEXCAN_IRQHandler()
finds mb_idx == 6 (FEATURE_CAN_RXFIFO_WARNING
) but has no code that deals with that situation. Since (state->mbs[6].state == FLEXCAN_MB_IDLE
) the handler just drops down to FLEXCAN_ClearErrIntStatusFlag(base)
near the end. But FLEXCAN_ClearMsgBuffIntStatusFlag(base, mb_idx)
never gets called to clear the interrupt so it goes on forever.
For now I've hacked FLEXCAN_IRQHandler()
to clear the interrupt in this situation, but is there a better approach or will there be a fix?
Hello,
I am running S32K SDK RTM 3.0.0 and have just run into this bug as well.
What is the best way to contact support to get this fixed?
Thanks
Hello,
There will be a driver update in a future release which will handle CAN_RXFIFO_WARNING and CAN_RXFIFO_OVERFLOW events.
Regards,
Ana
Thank you Ana,
Any idea when the next SDK release is coming?