Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET CAN Tx error counter

I try to send out frames over CAN, and no ECU acknowledges them. Logically, the Tx error frames will be sent out and the Tx error counter will be incremented by 8 at each frame. I read about this cunter, that after the value rises over 127, the bus' Comm State should go from ACTIVE to PASSIVE state. This part seems to work. But then, the error frames contain PASSIVE Comm State, but the Tx counter won't be incremented, and the Comm State never changes to 2 (Bus Off).

 

Why is the Tx coiunter not incremented in PASSIVE state, and why does the state not change to Bus Off state? Example trace:

 

Timestamp ID Payload Payload Length Type Name
0,000000 0 00  08  00  03  00 5 ERR 

0,008502 0 00  10  00  03  00 5 ERR 
0,014996 0 00  18  00  03  00 5 ERR 
0,018500 0 00  20  00  03  00 5 ERR 
0,021988 0 00  28  00  03  00 5 ERR 
0,028500 0 00  30  00  03  00 5 ERR 
0,029994 0 00  38  00  03  00 5 ERR 
0,035000 0 00  40  00  03  00 5 ERR 
0,038500 0 00  48  00  03  00 5 ERR 
0,044994 0 00  50  00  03  00 5 ERR 
0,048501 0 00  58  00  03  00 5 ERR 
0,051989 0 00  60  00  03  00 5 ERR 
0,058500 0 00  68  00  03  00 5 ERR 
0,059992 0 00  70  00  03  00 5 ERR 
0,061499 0 00  78  00  03  00 5 ERR 
0,068502 0 01  80  00  03  00 5 ERR --> comm state = Error Passive, but TX Error Counter stays at 0x80... 
0,074995 0 01  80  00  03  00 5 ERR 
0,078503 0 01  80  00  03  00 5 ERR 

 

 

0 Kudos
Message 1 of 2
(3,041 Views)

A CAN device cannot go bus off due to a no-ack error.

 

This is from the CAN 2.0 specification:

"When a TRANSMITTER sends an ERROR FLAG the TRANSMIT ERROR COUNT is increased by 8.

 

Exception 1:
If the TRANSMITTER is ’error passive’ and detects an ACKNOWLEDGMENT ERROR because of not detecting a ’dominant’ ACK and does not detect a 'dominant’ bit while sending its PASSIVE ERROR FLAG.

...

In exceptions 1 and 2 the TRANSMIT ERROR COUNT is not changed."

 

 

 

0 Kudos
Message 2 of 2
(3,019 Views)