Hi Team,
The Reference Manual shows ESR1[BOFFDONEINT] and CTRL2[BOFFDONEMSK] bits for the FlexCAN module, indicating the Bus-Off recovery completion interrupt.
However, RTD (SW32K3_S32M27x_RTD_4.4_4.0.0_P24) and EB Tresos do not expose any configuration or API to enable this feature.
Could you please confirm:
1.Whether BOFFDONEINT is supported in the current RTD version? If yes, please share procedure
2.Is possible to configure BOFFDONEINT in EB tresos tool
3.In manual recovery method how to read bus is back to normal mode. Which status bit should be monitored in the ESR1 or other registers to detect recovery completion?
Thank you for your support.
Thanks & Regards,
Saishanfi
Hi @saishanfi,
1. Current RTD version does not support BOFFDONEINT, FlexCAN_BusOff_IRQHandler only checks for BOFFINT:
2. For BOFFINT, in ASR context (EB Tresos):
Create 1 callback function for Bus off in main.c. User defines this function by themselves.
Create 1 header file to extern this callback function and this file will be included in Can_Cfg.c:
In this file, extern the function Bus Off Callback.
Then, in CanIf configuration, fill header file and callback function name.
3. In manual recovery the module remains in bus off state until the BOFFREC bit is negated by the user
In case the automatic recovery mode is disabled, BOFFREC = 1, the recovery from bus-off starts after both independent events have become true:
If negation happens:
- before 128 sequences of 11 recessive bits are detected on the CAN bus, then Bus Off recovery happens in similar way as in automatic recovery mode.
- after 128 sequences of 11 recessive bits occurred, then FlexCAN will resynchronize to the bus by waiting for 11 recessive bits before joining the bus.
Wait for 11 recessive bits, when ECR[TXRRCNT]=x01, communication starts (recovery from bus off).
Best regards,
Julián