Hi,
I am working with the i.MX RT1170 board FlexCAN FD module. My setup is:
Board: i.MX RT1170
Clock: 24 MHz
Arbitration phase: 500 kbps, sample point ~82.5 %
Data phase: 2 Mbps, sample point ~80 %
RX message buffers: 8
Payload: 64 bytes
Frame interval: 20 ms
Sending frames from: PEAK CAN interface (using same rates in PCAN-View)
Implementation details:
Using non-blocking RX (FLEXCAN_TransferFDReceiveNonBlocking) and immediately rearming RX MB in the callback
Observed results:
Sometimes fewer frames received than expected (e.g., 900–1243 frames for 64B, ~2000 frames for 8B)
Callback status mostly kStatus_FLEXCAN_UnHandled
Occasionally overflow occurs; once overflow happens, I cannot receive even a single frame afterward
What I tried:
Increasing RX MBs from 5 → 8
Removing all printf or heavy operations from callback
Verifying ISR priority (highest for CAN, no other tasks running)
Testing smaller payloads
Reducing data baud rate (2 Mbps → 1 Mbps)
also i checked for more 100ms and 50 ms and 30ms also its working fine.
Despite all this, I still lose frames and see unhandled or overflow statuses.
my target is to receive frames at 15ms cycle time .
Could someone suggest the exact recommended configuration or best practices to reliably receive all frames without losing data?