We are using the NXP S32K148 MCU with RTD version 1.0.1, and the CAN driver is configured using the S32 Design Studio (S2DS) configurator tool.
AutoRecovery Bus-Off is disabled (BOFFREC = 1).
When errors are intentionally introduced on the CAN bus to force the ECU into Bus-Off state, the CAN driver triggers Bus-Off interrupts.
The Bus-Off interrupt is observed only four times, even though the bus remains in Bus-Off state.
For each of these four interrupts, the driver reports Bus-Off indication to the upper layers, and recovery is attempted from the upper layer.
It is not expected for the CAN driver to perform recovery because the Bus-Off condition is intentional for testing purposes.
Expected Behavior
The Bus-Off interrupt should continue to trigger as long as the ECU remains in Bus-Off state, until the ECU transitions to sleep mode.
In Bus-Off state, Tx/Rx messages are disabled, which will cause the CAN Network Management (CanNM) timeout to expire and initiate the sleep sequence.
Therefore, until the ECU enters sleep mode, the Bus-Off condition will persist on the bus, and the Bus-Off interrupt should keep triggering.
Questions for NXP
Why does the CAN driver trigger the Bus-Off interrupt only four times while the ECU remains in Bus-Off state?
Is any additional handling required at the application level to maintain expected behavior?
Are there any considerations or best practices for manual Bus-Off recovery without polling, especially when AutoRecovery is disabled?