S32K312 CAN

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312 CAN

166 次查看
chenyh
Contributor II

366664f62a9a01cd8a8c0ad5daf0e11.png

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

标记 (1)
0 项奖励
回复
3 回复数

145 次查看
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 项奖励
回复

134 次查看
chenyh
Contributor II

Hi!@ Julián_AragónM

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

标记 (1)
0 项奖励
回复

54 次查看
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 项奖励
回复