附录:
ERROR HANDLING
Error Detectio n:
There are 5 different error types (which are not mutually exclusive):
BIT ERROR:
A unit that is sending a bit on the bus also monitors the bus. A BIT ERROR has to be detected at that bit time,when the bit value that is monitored is different from the bit value that is sent. An exception is the sending of a “recessive” bit during the stuffed bit stream of the ARBITRATION FIELD or during the ACK SLOT. Then no BIT ERROR occurs when a “dominant” b it is monitored. A TRANSMITTER sending a PASSIVE ERROR FLAG and detecting a “dominant” bit does not interpret this as a BIT ERROR.
STUFF ERROR:
A STUFF ERROR has to be detected at the bit time of the 6th consecutive equal bit level in a message field that should be coded by the method of bit stuffing.
CRC ERROR:
The CRC sequence consists of the result of the CRC calculation by the transmitter. The receivers calculate the CRC in the same way as the transmitter. A CRC ERROR has to be detected,if the calculated result is not the same as that received in the CRC sequence.
FORM ERROR:
A FORM ERROR has to be detected when a fixed-form bit field contains one or more illegal bits. (Note,that for a Receiver a dominant bit during the last bit of END OR FRAME is not treated as FORM ERROR).
ACKNOWLEDGMENT ERROR
An ACKNOWLEDGMENT ERROR has to be detected by a transmitter whenever it
does not monitor a “dominant” bit during the ACK SLOT.
Error Signaling:
A station detecting an error condition signals this by transmitting an ERROR FLAG. For an “error active” node it is an ACTIVE ERROR FLAG,for an “error passive” node it is a PASSIVE ERROR FLAG. Whenever a BIT ERROR,a STUFF ERROR,a FORM ERROR or an ACKNOWLEDGMENT ERROR is detected by
any station,transmission of an ERROR FLAG is started at the respective station at
the next bit. Whenever a CRC ERROR is detected,transmission of an ERROR FLAG starts at the bit following the ACK DELIMITER,unless an ERROR FLAG
for another condition has already been started.
FAULT CONFINEMENT OF CAN:
With respect to fault confinement a unit may be in one of three states:
“error active”
“error passive”
“bus off”
An “error active” unit can normally take part in bus communication and sends an ACTIVE ERROR FLAG when an error has been detected.
An “error passive” unit must not send an ACTIVE ERROR FLAG. It takes part in bus communication,but when an error has been detected onl y a PASSIVE ERROR FLAG is sent. Also after a transmission,an “error passive” unit
will wait before initiating a further transmission.
A “bus off” unit is not allowed to have any influence on the bus. (E.g. output drivers switched off).
For fault confinement two counts are implemented in every bus unit:
TRANSMIT ERROR COUNT:
RECEIVE ERROR COUNT:
These counts are modified according to the following rules (note that more than
one rule may apply during a given message transfer):
When a RECEIVER detects an error,the RECEIVE ERROR COUN T will be increased by 1,except when the detected error was a BIT ERROR during the sending of an ACTIVE ERROR FLAG or an OVERLOAD FLAG.
When a RECEIVER detects a “dominant” bit as the first bit after sending an ERROR FLAG the RECEIVE ERROR COUNT will be increased by 8.
When a TRANSMITTER sends an ERROR FLAG the TRANSMIT ERROR COUNT is increased by 8.
Exception 1:
If the TRANSMITTER is “error active” and detects an ACKNOWLEDG- MENT ERROR because of not detecting a “dominant” ACK and does not detect a “dominant” bit while sending its PASSI VE ERROR FLAG.
Exception 2:
If the TRANSMITTER sends an ERROR FLAG because STUFF ERROR occurred during ARBITRATION,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.
If a TRANSMITTER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the TRANSMIT ERROR COUNT is increased by 8.
If a RECEIVER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the RECEIVE ERROR COUNT 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 OVERLO AD 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 TRANSMIT ERROR COUNT by 8 and every RECEIVER increases its RECEIVE ERROR COUNT by 8.
After the successful transmission of a message (getting ACK and no error until END OF FRAME is finished) the TRANSMIT ERROR COUNT is decreased by 1 unless it was already 0.
After the successful reception of a message (reception without error up to the ACK SLOT and the succ
essful sending of the ACK bit),the RECEIVE ERROR COUNT is decreased by 1,if it was between 1 and 127. If the RECEIVE ERROR COUNT was 0,it stays 0,and if it was greater than 127,then it will be set to a value between 119 and 127.
A node is “error passive” when the TRANSMIT ERROR COUNT equals or exceeds 128,or when the RECEIVE ERROR COUNT equals or exceeds 128. An error condition letting a node become “error passive” causes the n ode to send an ACTIVE ERROR FLAG.
A node is “bus off” when the TRANSMIT ERROR COUNT is greater than or equal to 256.
An “error passive” node becomes “error active” again when both the TRANSMIT ERROR COUNT and the RECEIVE ERROR COUNT are less than or equal to 127.
An node which is “bus off” is permitted to become “error active” (no longer “bus off”) with its error counters both set to 0 after 128 occurrence of 11 consecutive “recessive” bits have been monitored on the bus.
Note:
An error count value greater than about 96 indicates a heavily disturbed bus. It may be of advantage to
provide means to test for this condition.
Note:
Start-up / Wake-up:
If during start-up only 1 node is online,and if this node transmits some message,it will get no acknowledgment,detect an error and repeat the message. It can become “error passive” but not “bus off” due to this reason.
错误处理
错误检测:
有以下5 种不同的错误类型(这5 种错误不会相互排斥)
位错误(Bit Error)
单元在发送位的同时也对总线进行监视。如果所发送的位值与所监视的位值不相符合,则在此位时间里检测到一个位错误。但是在仲裁场(ARBITRATION FIELD)的填充位流期间或应答间隙(ACK SLOT)
发送一“隐性”位的情况是例外的。此时,当监视到一“显性”位时,不会发出位错误。当发送器发送一个被动错误标志但检测到
“显性”位时,也不视为位错误。
填充错误(Stuff Error):server error翻译
如果在使用位填充法进行编码的信息中,出现了第6 个连续相同的位电平时,检测到一个填充错误。
CRC 错误(CRC Error):
CRC 序列包括发送器的CRC 计算结果。接收器计算CRC 的方法与发送器相同。如果计算结果与接收到CRC 序列的结果不相符,则检测到一个CRC 错误。形式错误(Form Error):
当一个固定形式的位场含有1 个或多个非法位,则检测到一个形式错误。(备注:接收器的帧末尾最后一位期间的显性位不被当作帧错误)
应答错误(Acknowledgment Error):
只要在应答间隙(ACK SLOT)期间所监视的位不为“显性”,则发送器会检测到一个应答错误。
错误标定:
检测到错误条件的站通过发送错误标志指示错误。对于“错误主动”的节点,错误信息为“主动错误标志”,对于“错误被动”的节点,错误信息为“被动错误标志”。站检测到无论是位错误、填充错误、形式错误,还是应答错误,这个站会在下一位时发出错误标志信息。只要检测到的错误的条件是CRC 错误,错误标志的发送开始于ACK 界定符之后的位(其他的错误条件除外)。
CAN的故障界定:
至于故障界定,单元的状态可能为以下三种之一:
“错误主动”
“错误被动”
“总线关闭”

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。