Tool/software:
Hello,
There is a strange behavior that happens at my side regarding some bus faults which are:
- Shorting CANH with CANL
- Shorting CANL with VBAT
- Shorting CANH with GND
Fault is applied physically on bus and I can read the bus fault source error through INT_CANBUS register for almost only 1 second. Then the bit corresponding to the source of bus fault is flipped to 0 again as if the fault is not applied anymore although it is still physically applied on bus.
For example: Shorting CANH with CANL
I can read value 0b00100000 (0x20) from INT_CANBUS register where the bit #5 is set to 1 correctly after applying the fault indicating the related bus fault. However, checking this bit again after 1 second, I read 0x0 from INT_CANBUS, which means that transceiver is not detecting the fault anymore although it is still applied on bus.
Scenario in points:
- Apply bus fault
- Fault value is latched for 1 second in INT_CANBUS register
- Fault value is not latched anymore after 1 second (However, it is still physically applied)
- Then, communication is down
Insights about the code:
- Checking for bus faults is done periodically through polling the INT_CANBUS register in a function which is scheduled every 500ms.
- I can read the correct value from the INT_CANBUS for 2 times only (500ms * 2 = 1 second), then the value is not latched anymore.
- Every time after I read the INT_CANBUS register, code manually clears the bit which is flipped to 1 i.e. source of bus fault, because the register is R/W1C not a self-clear one.
On the other side, this behavior doesn't occur with the following errors:
- Shorting CANL with GND
- Shorting CANH with VBAT
Where the fault is always latched in the INT_CANBUS register as long as it is physically applied. However, the communication will be always up in that case.
Thanks.