3281 views|0 replies

1663

Posts

0

Resources
The OP
 

Why does the CAN message fail to send? [Copy link]

During the debugging of the CAN bus, the message failed to be sent. Many engineers only know one side of the story. Today, we will discuss the problem of CAN message sending failure.
Before understanding why the CAN message fails to be sent, let's first look at what a correct CAN message should look like. Table 1 is the composition of a normal standard data frame message. Table 1 Composition of
standard data frame message format Figure 1 Standard data frame format The CAN bus is a broadcast-based communication method. In order to ensure that every normal node on the bus can correctly receive the message, the sender of the message requires each receiving node to respond before the message is sent. This is also the reason why ACK exists in the message.
The ACK segment length in a frame of CAN message is 2 bits, including the ACK Slot and the ACK Delimiter. In the response field, the sending station sends two recessive bits. When the receiver correctly receives a valid message, the receiver will send a "dominant" bit to the sender during the ACK Slot (sending an ACK signal) to indicate the response.
ACK Slot: All stations that receive a matching CRC sequence (CRC SEQUENCE) will respond by writing a dominant bit to the transmitter's recessive bit during the ACK Slot.
ACK Delimiter: The ACK Delimiter is the second bit of the ACK field and is a bit that must be recessive. Therefore, the ACK Slot is surrounded by two recessive bits, namely the CRC Delimiter and the ACK Delimiter.
Figure 2 Normal ACK segment message If there is no ACK response on the bus (that is, the ACK Slot is recessive), the transmitter will send an error flag and increase the send error counter value by 8. The node will automatically resend the message. If the automatic resend still cannot receive an ACK, then after the send error counter counts to 128 (that is, 16 error frames appear), the error active state will be changed to the error passive state, as shown in Figure 3.
What are the reasons for the ACK segment error? I have summarized some below.

  • There is only one valid node on the bus: the node sending the message will detect the state of the response gap on the bus after sending a frame of message. If the response gap is detected as a recessive bit, it means that the frame message has not received ACK, the transmission fails, and needs to be retransmitted. Since the transmission error counter will accumulate after the transmission fails until the node is shut down, when there is only one valid node on the bus, this node cannot send data, because the ACK Slot in the data frame it sends has no other node to fill it, and it will always be a recessive bit. This node will keep retransmitting data until the transmission is successful or the transmission is canceled.
  • The baud rate does not match or the node is not initialized, resulting in no ACK;
  • The bus cable is short-circuited, disconnected, or connected in reverse;
  • The nodes connected to the high-speed CAN bus are not high-speed CAN, but fault-tolerant low-speed CAN, resulting in a mismatch.

Figure 3 Response delimiter error frame Figure 4 Message without ACK When you are debugging the CAN bus and a node fails to send a message, be sure to check whether the above omissions have caused the abnormal ACK on your bus. With the help of appropriate instruments, you can get twice the result with half the effort when finding CAN bus errors. Figure 4 uses ZHIYUAN Electronics' CANScope to mark the error frame and find the waveform corresponding to the error frame to find the error. CANScope can also perform a series of tests on the CAN bus physical layer, data link layer, and application layer to solve testing problems for CAN engineers.
Figure 5 CANScope test items

This post is from Wireless Connectivity
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list