CAN BusOff recovery indication issue

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

CAN BusOff recovery indication issue

311 Views
Shivanee
Contributor I

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?

0 Kudos
Reply
1 Reply

257 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Shivanee,

I've replied to your internal support ticket.

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2249558%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECAN%20BusOff%20recovery%20indication%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2249558%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EWe%20are%20using%20the%20NXP%20S32K148%20MCU%20with%20RTD%20version%201.0.1%2C%20and%20the%20CAN%20driver%20is%20configured%20using%20the%20S32%20Design%20Studio%20(S2DS)%20configurator%20tool.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EAutoRecovery%20Bus-Off%20is%20disabled%20(BOFFREC%20%3D%201).%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EWhen%20errors%20are%20intentionally%20introduced%20on%20the%20CAN%20bus%20to%20force%20the%20ECU%20into%20Bus-Off%20state%2C%20the%20CAN%20driver%20triggers%20Bus-Off%20interrupts.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EThe%20Bus-Off%20interrupt%20is%20observed%20only%20four%20times%2C%20even%20though%20the%20bus%20remains%20in%20Bus-Off%20state.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EFor%20each%20of%20these%20four%20interrupts%2C%20the%20driver%20reports%20Bus-Off%20indication%20to%20the%20upper%20layers%2C%20and%20recovery%20is%20attempted%20from%20the%20upper%20layer.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EIt%20is%20not%20expected%20for%20the%20CAN%20driver%20to%20perform%20recovery%20because%20the%20Bus-Off%20condition%20is%20intentional%20for%20testing%20purposes.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EExpected%20Behavior%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EThe%20Bus-Off%20interrupt%20should%20continue%20to%20trigger%20as%20long%20as%20the%20ECU%20remains%20in%20Bus-Off%20state%2C%20until%20the%20ECU%20transitions%20to%20sleep%20mode.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EIn%20Bus-Off%20state%2C%20Tx%2FRx%20messages%20are%20disabled%2C%20which%20will%20cause%20the%20CAN%20Network%20Management%20(CanNM)%20timeout%20to%20expire%20and%20initiate%20the%20sleep%20sequence.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ETherefore%2C%20until%20the%20ECU%20enters%20sleep%20mode%2C%20the%20Bus-Off%20condition%20will%20persist%20on%20the%20bus%2C%20and%20the%20Bus-Off%20interrupt%20should%20keep%20triggering.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EQuestions%20for%20NXP%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EWhy%20does%20the%20CAN%20driver%20trigger%20the%20Bus-Off%20interrupt%20only%20four%20times%20while%20the%20ECU%20remains%20in%20Bus-Off%20state%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EIs%20any%20additional%20handling%20required%20at%20the%20application%20level%20to%20maintain%20expected%20behavior%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EAre%20there%20any%20considerations%20or%20best%20practices%20for%20manual%20Bus-Off%20recovery%20without%20polling%2C%20especially%20when%20AutoRecovery%20is%20disabled%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2250598%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20CAN%20BusOff%20recovery%20indication%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250598%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F219991%22%20target%3D%22_blank%22%3E%40Shivanee%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI've%20replied%20to%20your%20internal%20support%20ticket.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E