S12Z CAN Physical Layer interrupt mature time

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

S12Z CAN Physical Layer interrupt mature time

跳至解决方案
1,544 次查看
charles_wangw
Contributor III

Hello 

We use S12ZVCRMV1

Could you please help the mature time of CAN Physical lay interrupt in the case below:

1. Such as we connect CANH to Battery Low

2. Or Connect CANL to Battery High

We try to get this value in datasheet. Seems not easy to find.

Thanks

Charles

 

标记 (1)
0 项奖励
回复
1 解答
1,529 次查看
StanoA
NXP TechSupport
NXP TechSupport

Hello Charles,

Yes, you are right. The CANTXERR counter will increase of 8 for each sent message (because CANH is connected to GND) till the counter reach Bus-off value. When the failure disappear you can use BORM = 1 for Bus-off state recovery (valid for MSCAN_V3) or use standard way for SW compatibility with other MCUs.

Best Regards,

Stano.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,538 次查看
StanoA
NXP TechSupport
NXP TechSupport

Hello Charles,

I’m not sure I understand you well what you mean by “mature time”, but I will try to explain the behavior of CAN when those two events arrive.

In case the CAN is in the idle mode – not transmitting, nothing happens.

In case the CAN is in receive mode – the message will be not received correctly, thus ACK will not send and the opposite side (transmitter) will send message again till ACK received.

In case the CAN is in the transmit mode, the transmit error counter is increased by 8 and the interrupt flag is set. In case of longer time duration of the short circuit event the CANTXERR register will reach the full value and the Bus-off state occurs.

The MSCAN module is designed to meet Bosh CAN Specifications V2.0 and the whole behavior is described in detail in attached Spec file.

I think it could help you to solve your task.

Best Regards,

Stano.

0 项奖励
回复
1,532 次查看
charles_wangw
Contributor III

Hello Stano

Thank you for your detail information.

It seems we only have change to get CAN physical Failure when in transmit mode. 

Such as in our software we have only one send out frame which is 500ms period. So After I connect CANH to battery Low. MCU should period run into CAN physical Failure interrupt every 500ms.

Am I right?

Thank you again.

Charles

0 项奖励
回复
1,530 次查看
StanoA
NXP TechSupport
NXP TechSupport

Hello Charles,

Yes, you are right. The CANTXERR counter will increase of 8 for each sent message (because CANH is connected to GND) till the counter reach Bus-off value. When the failure disappear you can use BORM = 1 for Bus-off state recovery (valid for MSCAN_V3) or use standard way for SW compatibility with other MCUs.

Best Regards,

Stano.

0 项奖励
回复