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
Solved! Go to Solution.
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.
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.
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
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.