CAN stop sending data

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

CAN stop sending data

1,371 Views
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 Kudos
Reply
4 Replies

1,165 Views
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 Kudos
Reply

1,165 Views
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 Kudos
Reply

1,166 Views
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 Kudos
Reply

1,166 Views
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 Kudos
Reply