当前位置:网站首页>Hongke share | let you have a comprehensive understanding of "can bus error" (III) -- can node status and error counter
Hongke share | let you have a comprehensive understanding of "can bus error" (III) -- can node status and error counter
2022-07-29 06:44:00 【Hongke Industrial Communication Division】
In this series of articles , We will give you a detailed introduction to CAN Knowledge about bus errors , Include CAN The basic concept of bus error 、CAN Type of bus error 、CAN Error frame and CAN Node error status , And generate and record through the actual application test CAN error .
Previous review :
1. CAN Bus errors and error frames
2. CAN Wrong type
obviously ,CAN Error handling helps remove error messages , And make CAN The node can retransmit the error message . This ensures short-term local interference ( For example, from noise ) Will not result in invalidity / Lost data . contrary , The sender will try to resend the message . If it wins the arbitration ( And there are no mistakes ), The message is sent successfully .
however , What if the error is caused by a system failure in the transmission node ? This may trigger sending / Remove the infinite loop of the same message —— interfere CAN Bus . This is it. CAN Where node status and error counters work .
In short ,CAN The purpose of error tracking is to reduce the problem CAN Node permissions to limit errors . say concretely , Let's look at three possible states :
- Error activity : This is every CAN The default state of the node , In this state, it can transmit data and cause “ Active error flag ”
- Passive error : In this state ,CAN Nodes can still transmit data , But now when an error is detected “ Passive error flag ”. Besides ,CAN Nodes now have to wait 3 Bit interrupt time out , You have to wait for additional 8 position ( Also known as pause transmission time ) To resume data transmission ( To allow others to CAN Node control bus )
- Bus off : In this state ,CAN The node associates itself with CAN The bus is disconnected , No more data can be transmitted or an error flag is raised

Every CAN The controller will track its status and take corresponding actions .CAN The node transitions state according to the value of its error counter . say concretely , Every CAN The node will track the send error counter (TEC) And receive error counter (REC): - If REC or TEC exceed 127, be CAN Nodes enter ErrorPassive state
- If TEC exceed 255, be CAN The node enters the bus off state
So how does the error counter change ? Before we learn how to increase / Before reducing the logic of the error counter , Let's re-examine CAN Error frames and main / Minor error flags .
from CAN The error frame diagram can be clearly seen , stay CAN Wrong frame 6 Dominant sequences were followed by CAN The node will know that it raises the main error flag . under these circumstances , We can put this CAN Nodes are called wrong “ Discoverer ”.
At first , To make a CAN Nodes repeatedly find errors and react quickly by sending error flags in front of other nodes , This may sound positive . However , In practice , Discoverers are often the culprits of mistakes .
in application , It is usually possible to use CAN The recorder is right CAN Errors are recorded , And through the CAN Analyze the data to find the cause of the failure , For example, use Hongke CAN The recorder can easily transfer data from 2xCAN/LIN The bus records 8-32GB Of SD In the card , Or through WiFi Automatically transfer data to the server , So just connect it to a car or truck to start recording , And through free software /API Decode data .
For more information, please send a private message / Comment on / contact 400-999-3848
边栏推荐
- MQTT服务器搭建以及使用MQTT.fx测试
- 8、 Network security
- day03_1_流程控制
- 5、 Wireless communication network
- Tcp/ip 五层参考模型以及对应的典型设备以及ipv6
- Huawei switch ce12808 import and export configuration file
- Hongke education you want to enter the field of TSN? Hongke teaches you how to build TSN test system
- 解决文件大导致磁盘满的问题
- DDoS攻击与CC攻击的区别
- CNAME记录和A记录的区别
猜你喜欢

On defect description style

注解(Annotation)

day14_ Unit test & Date common class & String common class

day14_单元测试&日期常用类&字符串常用类

Day16 set

Ram block memory generator of vivado IP core

After the EtherCAT master station is disconnected, how to ensure that the target system is not affected by the fault?

Hongke white paper | how to use TSN time sensitive network technology to build a digital factory in industry 4.0?

Hongke share | bring you a comprehensive understanding of "can bus error" (I) -- can bus error and error frame

FIR filter design (2) -- vivado calls IP core to design FIR filter
随机推荐
vmstat 内存消耗查询
FIR filter design (2) -- vivado calls IP core to design FIR filter
pairs和ipairs的区别
Common server faults and their solutions
自动化测试的生命周期是什么?
软件测试的优势有哪些?看看你了解多少.....
ping 原理
IPv6 representation and configuration cases
Circular linked list and bidirectional linked list
Online multiplayer chat room based on UDP communication
Ansible(自动化软件)
将源码包转换为rpm包
10种常见的软件架构模式
greenplum企业部署
Floating point multiplication and division of vivado IP core floating point
软件测试职业发展:软件测试人员该何去何从
IPv6表示方法与配置案例
day04_数组
如何判断业务被DDoS攻击?又会造成哪些危害?
8、 Network security