Clarification on FlexCAN Bus Off Done interrupt (BOFFDONEINT) on S32K322 using SW32K3_S32M27x_RTD_4.

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

Clarification on FlexCAN Bus Off Done interrupt (BOFFDONEINT) on S32K322 using SW32K3_S32M27x_RTD_4.

157 Views
saishanfi
Contributor II

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

Tags (4)
0 Kudos
Reply
1 Reply

117 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @saishanfi,

1. Current RTD version does not support BOFFDONEINTFlexCAN_BusOff_IRQHandler only checks for BOFFINT:

Snag_1100004.png

2. For BOFFINT, in ASR context (EB Tresos):

Create 1 callback function for Bus off in main.c. User defines this function by themselves.

Julin_AragnM_0-1760386839690.png

Create 1 header file to extern this callback function and this file will be included in Can_Cfg.c:

Julin_AragnM_1-1760386839657.png

In this file, extern the function Bus Off Callback.

Julin_AragnM_2-1760386839614.png

Then, in CanIf configuration, fill header file and callback function name.

Snag_12ba5e6.png

Snag_12bbb52.png

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:

  • 128 occurrences of 11 consecutive recessive bits on the CAN bus have been monitored
  • BOFFREC has been cleared by the user

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

0 Kudos
Reply