Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Wolfgang Grandegger
Date: Monday, March 22, 2010 - 2:24 pm

Ira W. Snyder wrote:

Yes, below is some more theory from the AT91 CAN manual, in case you are
interested in technical details.

Wolfgang.

-----------------------------------------------------------------------
o REC: Receive Error Counter
  When a receiver detects an error, REC will be increased by one, except
  when the detected error is a BIT ERROR while sending an ACTIVE ERROR
  FLAG or an OVERLOAD FLAG. When a receiver detects a dominant bit as
  the first bit after sending an ERROR FLAG, REC is increased by 8.
  When a receiver detects a BIT ERROR while sending an ACTIVE ERROR
  FLAG, REC is increased by 8. Any node tolerates up to 7 consecutive
  dominant bits after sending an ACTIVE ERROR FLAG, PASSIVE ERROR FLAG
  or OVERLOAD FLAG. After detecting the 14th consecutive dominant bit
  (in case of an ACTIVE ERROR FLAG or an OVER-LOAD FLAG) or after
  detecting the 8th consecutive dominant bit following a PASSIVE ERROR
  FLAG, and after each sequence of additional eight consecutive dominant
  bits, each receiver increases its REC by 8. After successful reception
  of a message, REC is decreased by 1 if it was between 1 and 127. If
  REC was 0, it stays 0, and if it was greater than 127, then it is set
  to a value between 119 and 127.

o TEC: Transmit Error Counter
  When a transmitter sends an ERROR FLAG, TEC is increased by 8 except
  when:
  - 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.
  - the transmitter sends an ERROR FLAG because a STUFF ERROR occurred
    during arbitration and should have been recessive and has been sent
    as recessive but monitored as dominant.
  When a transmitter detects a BIT ERROR while sending an ACTIVE ERROR
  FLAG or an OVERLOAD FLAG, the TEC will be increased by 8.
  Any node tolerates up to 7 consecutive dominant bits after sending an
  ACTIVE ERROR FLAG, PASSIVE ERROR FLAG or OVERLOAD FLAG. After
  detecting the 14th consecutive dominant bit (in case of an ACTIVE
  ERROR FLAG or an OVERLOAD FLAG) or after detecting the 8th consecutive
  dominant bit following a PASSIVE ERROR FLAG, and after each
  sequence of additional eight consecutive dominant bits every
  transmitter increases its TEC by 8. After a successful transmission
  the TEC is decreased by 1 unless it was already 0.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Fri Mar 19, 2:01 am)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Fri Mar 19, 8:45 am)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Fri Mar 19, 1:13 pm)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Sat Mar 20, 12:55 am)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Mon Mar 22, 12:17 pm)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Mon Mar 22, 12:23 pm)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Mon Mar 22, 1:28 pm)
Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intel ..., Wolfgang Grandegger, (Mon Mar 22, 2:24 pm)