Dear Sir,
Recently, on our project, we encountered an issue related to FlexCAN interrupts. Here's a description of the phenomenon:
On CAN instance 2, we have configured 14 message buffers (MBs) for receiving messages. After a period of testing, it was discovered that the entire RTOS task scheduling had become unresponsive.
Through breakpoints, we found that the system was continuously processing the FLEXCAN_IRQHandler. Further debugging revealed that the corresponding message buffer interrupt was active, but the status of the message buffer was FLEXCAN_MB_IDLE. This resulted in the inability of FLEXCAN_IRQHandler to clear the interrupt flag for that specific message buffer, which potentially caused the continuous invocation of FLEXCAN_IRQHandler and prevented the system from handling other interrupts.
Here's an overview of how the message buffers were being used during the issue reproduction:

Could you please provide some debugging suggestions?
Thanks!