BUSOFF

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

BUSOFF

51件の閲覧回数
LY_K
Fresh Out Contributor

S32K144怎么实现BUSOFF的快慢恢复

0 件の賞賛
返信
1 返信

11件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

FlexCAN implements 2 ways of bus off recovery, depending of CTRL1[BOFFREC] setting:
0b - Automatic recovering from Bus Off state enabled.
1b - Automatic recovering from Bus Off state disabled.

In case the automatic recovery mode is disabled, BOFF_REC = 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
  • BOFF_REC  has been cleared by the user

So 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.

In automatic Bus-off recovery mode the behavior is the same, you just do not clear BOFF_REC, soo… 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.

You can also refer to this FlexCAN error test example: Example S32K144 FlexCAN TX/RX/Error ISR test S32DS2.2 - NXP Community. Simply short CANH with GND and send message using either SW1 or SW2, FlexCAN enters bus off (error event)

BR, Petr

0 件の賞賛
返信