Not applicable
Feb 02, 2015
09:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 02, 2015
09:00 PM
Hello Developers,
I am trying to test CAN bus-off in TC277. For CAN bus-off to happen any of the error counters TEC or REC should reach to 256 value. For testing I am transmitting Random frames while shorting Tx and Rx. That should Increment TEC counter.
Problem is that TEC is incremented till 0x80 means 128 decimal. After that I found no change in it even though transmitting frames are still going. In this case I am unable to have CAN bus-off.
What might not possibly increment TEC counter after 128 is my question ?
Regards,
Dharmik
I am trying to test CAN bus-off in TC277. For CAN bus-off to happen any of the error counters TEC or REC should reach to 256 value. For testing I am transmitting Random frames while shorting Tx and Rx. That should Increment TEC counter.
Problem is that TEC is incremented till 0x80 means 128 decimal. After that I found no change in it even though transmitting frames are still going. In this case I am unable to have CAN bus-off.
What might not possibly increment TEC counter after 128 is my question ?
Regards,
Dharmik
1 Reply
Feb 11, 2015
09:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 11, 2015
09:51 AM
If you've shorted Tx and Rx together, then there won't be an ACK, and the TEC will not increment past the passive error limit of 128, per this part of the CAN spec:
[quote="Bosch CAN spec"]
3. 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.
Exception 2:
If the TRANSMITTER sends an ERROR FLAG because a STUFF ERROR occurred during ARBITRATION whereby the STUFFBIT is located before the RTR bit, and should have been ’recessive’, and has been sent as ’recessive’ but monitored as ’dominant’.
In exceptions 1 and 2 the TRANSMIT ERROR COUNT is not changed.
[quote="Bosch CAN spec"]
3. 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.
Exception 2:
If the TRANSMITTER sends an ERROR FLAG because a STUFF ERROR occurred during ARBITRATION whereby the STUFFBIT is located before the RTR bit, and should have been ’recessive’, and has been sent as ’recessive’ but monitored as ’dominant’.
In exceptions 1 and 2 the TRANSMIT ERROR COUNT is not changed.