s32k144 Can recover normal staus from bus off

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

s32k144 Can recover normal staus from bus off

2,417件の閲覧回数
shingozhou
Contributor III

Hi,

In order to satisfy CAN OSEK network management, I have to recover the CAN normal status from bus-off status in a certain amount of time. And how to configure the CAN registers to meet this requirement?

Obviously, set CAN_CTRL1[BOFFREC] = 1 to disable automatic recovering, because I have to control the time for recovering normal status from bus-off.

I could recall CAN initialzation function to achieve this requirement using other types of MCU, such as STM32. How about S32K144? 

BR

shingo

2 返答(返信)

1,733件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

In case of 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 way.
  • 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.

The CAN init function can be called, depends what is done within it. Obviously SW reset and /or Freeze mode entering is performed together with register setting and MB initialization. So the CAN init could be used for bus-off recover too.

BR, Petr

1,733件の閲覧回数
shingozhou
Contributor III

Petr:

How to identify the CAN bus status as bus off or normal state without receiving data ?  Through reading register CAN_ESR1[BOFFINT]?

BR,

shingo

0 件の賞賛
返信