S32K312 CAN

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

S32K312 CAN

127 Views
chenyh
Contributor II

366664f62a9a01cd8a8c0ad5daf0e11.png

怎么能让can不自动恢复? 无论我勾选与否,CAN出现故障后都会自动恢复,因为我需要检测到故障后,手动去恢复can通信,有人能提供解决办法吗?

Tags (1)
0 Kudos
Reply
3 Replies

106 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @chenyh

You can try reading bit BOFFREC from the CTRL1 register to confirm if bus off recovery is disabled.

Julin_AragnM_0-1743180977022.png

You can also monitor FlexCAN_Ip_MainFunctionBusOff_Privileged function, since it is in charge of clearing the BusOff Status Flag.

Julin_AragnM_1-1743181053875.png

Best regards,
Julián

 

0 Kudos
Reply

95 Views
chenyh
Contributor II

Hi!@ Julián_AragónM

我看 Base->CTRL1的数值,确实在我未勾选的时候bit=1,勾选的时候bit=0,但是出现busoff后,仍然会自动恢复。我不知道该怎么解释

Tags (1)
0 Kudos
Reply

15 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @chenyh

Please try to manually write 1 to BOFFREC. The module should remain in BusOff until you write 1. Keep in mind that if a CAN node does not send any messages, it will not enter a "bus-off" state.

Aa node only enters bus-off when its error counter exceeds a certain threshold, usually due to detecting transmission errors on the bus while attempting to send or receive messages, not just by not sending any data at all.

Best regards,
Julián

0 Kudos
Reply