s32k EAR 0.8.4 not handling CAN FIFO overflow

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k EAR 0.8.4 not handling CAN FIFO overflow

1,120 Views
pontushedman
Contributor II

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?

Tags (2)
0 Kudos
3 Replies

852 Views
levi_danzer
Contributor I

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

0 Kudos

852 Views
AnaAldescu
NXP Employee
NXP Employee

Hello,

There will be a driver update in a future release which will handle CAN_RXFIFO_WARNING and CAN_RXFIFO_OVERFLOW events.

Regards,

Ana

0 Kudos

852 Views
pontushedman
Contributor II

Thank you Ana,

Any idea when the next SDK release is coming?

0 Kudos