当前位置:网站首页>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
边栏推荐
猜你喜欢

5、 Wireless communication network

5G服务化接口和参考点

6、 Network interconnection and Internet

Hongke case | PAC: an integrated control solution integrating SoftPLC control logic, HMI and other service functions

day02_基本语法

day03_ 1_ Process control

软件测试职业发展:软件测试人员该何去何从

Thinking about MySQL taking shell through OS shell

Floating point addition and subtraction method of vivado IP core floating point

华为交换机CE12808导入导出配置文件
随机推荐
Conversion of fixed-point number to floating-point number of vivado IP core
如何判断业务被DDoS攻击?又会造成哪些危害?
Hongke white paper | how to use TSN time sensitive network technology to build a digital factory in industry 4.0?
day13_多线程下
Traffic characteristics of webshell management tools
Annotation
ping 原理
Online multiplayer chat room based on UDP communication
软件测试的优势有哪些?看看你了解多少.....
Hongke shares | why EtherCAT is the best solution to improve the performance of the control system?
day04_数组
Scanbasepackages scanning range configuration
用神经网络实现手写数字识别
基于FPGA的IIR型滤波器设计
【面试题】2022年最新软件测试面试题(400道)【附带答案】持续更新...
VMware虚拟机在物理机win10系统下如何连接外网
网络工具中的“瑞士军刀”-nc
What is the lifecycle of automated testing?
DDoS details
IPv6 representation and configuration cases