CAN stop sending data

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

CAN stop sending data

2,163件の閲覧回数
tamiritzhaki
Contributor I

I am using S32K144EVB boards based on S32K144_CAN_MASTER/SLAVE example. I modify the code so the slaves will send periodic data (every ~20mS) on the bus. The problem I have is that every couple of hours one of the slaves stop sending data and it recovers only after reset. The bus configuration set to CAN (not FD) at 100kbps.

I am aware of the Bus Off Recovery bit (BOFFREC) but it already enabled (not sure if its relevant to non FD setup).

Whats the possible options I have to recover the data transmission?

0 件の賞賛
返信
4 返答(返信)

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

Hi Tamir,

If the issue appears, do you see any error detected, look at ECR, ESR1 registers?

The CTRL1[BOFFREC] defines how the FlexCAN recovers from Bus Off State. If the bit is set, then automatic recovering is disabled. Bus off state is indicated by setting ESR1[BOFFINT], ESR1[FLTCONF] becomes 0b1x. The user have to clear BOFFREC manually so the module can leave Bus Off state.  

BR, Petr

0 件の賞賛
返信

1,957件の閲覧回数
tamiritzhaki
Contributor I

Hi Petr,

The registers value in the time when the issue occurs:

CNTR1 =  0x04610007

ESR1 =    0x00040080

ECR =      0

Can you see reason for this phenomenon?

BR,

Tamir

0 件の賞賛
返信

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

Hi Tamir,

Those values do not indicate any issue. It says the module is synchronized to the bus and is error active.

If there is any active MB set for the TX or RX operation it should work.  

 

I can recommend to enable the error interrupt and read ESR/ECR once it is called. This way you can find the reason of the errors, if there are any.

 

If you will have a doubts still, please share your modified SLAVE example so I can test it on the EVB.

BR, Petr

0 件の賞賛
返信

1,958件の閲覧回数
tamiritzhaki
Contributor I

Thank you Petr, I will check the ESR/ECR once it is called and if needed will share my project.

BR, Tamir

0 件の賞賛
返信