MPC5748G CAN Bus Off

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,009件の閲覧回数
skseofh
Contributor II

Hi. I'm using MPC5748G.
In FlexCAN register, there is a CAN_CTRL1.BOFFREC bit.

I want to disable the automatic recovering from Bus Off state, so I asserted CAN_CTRL1.BOFFREC bit.
And I caused the bus off state.

As I know, the Bus Off state will be recovered after 128 sequences of 11 recessive bit occurred, but nothing happen when I wait.
The reference manual say 'If the negation occurs after 128 sequences of 11 recessive bits occurred, the FlexCAN will re-synchronize to the bus by waiting for 11 recessive bits before joining the bus.'.

Do I clear the bit to get out of the bus off state?

0 件の賞賛
1 解決策
997件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi

Yes the module remains in bus off state until the bit is negated by the user

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.

 

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
990件の閲覧回数
skseofh
Contributor II

Thanks, it really helps!!!

 

Here is one more question.

CAN_ESR1.BOFFDONEINT is set after counting 128 occurrences of 11 consecutive recessive bits on the CAN bus.

And if CAN_ERS2.BOFFDONEMSK is set, an interrupt is generated to the CPU.

 

How is this related with CAN_CTRL1.BOFFREC bit?

I asserted CAN_CTRL1.BOFFREC and asserted CAN_ERS2.BOFFDONEMSK, but didn't get out of the Bus-off state.

Is CAN_CTRL1.BOFFREC bit only related to get out of the Bus-Off state?

0 件の賞賛
998件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi

Yes the module remains in bus off state until the bit is negated by the user

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.

 

BR, Petr

0 件の賞賛
988件の閲覧回数
skseofh
Contributor II

Thanks, it really helps!!!

 

Here is one more question.

CAN_ESR1.BOFFDONEINT is set after counting 128 occurrences of 11 consecutive recessive bits on the CAN bus.

And if CAN_ERS2.BOFFDONEMSK is set, an interrupt is generated to the CPU.

 

How is this related with CAN_CTRL1.BOFFREC bit?

I asserted CAN_CTRL1.BOFFREC and asserted CAN_ERS2.BOFFDONEMSK, but didn't get out of the Bus-off state.

Is CAN_CTRL1.BOFFREC bit only related to get out of the Bus-Off state?

0 件の賞賛