Overtime detection system and method for CAN FD bus message sending

By introducing a timeout detection system in the CAN FD bus communication system, monitoring message configuration information, calculating the expected time, monitoring message sending commands, timing and determining faults, the data transmission interruption problem caused by the CAN FD node is solved, and fast and reliable fault detection and reporting are achieved.

CN119766626AActive Publication Date: 2025-04-04TIANJIN JINHANG COMP TECH RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411616309.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-04-04
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

Due to the failure of the CAN FD node itself, it is unable to send data frames to the bus, and it is impossible to obtain error recognition by sampling the bus. The host computer cannot receive the relevant error information and mistakenly thinks that the node is still working normally.

Method used

It provides a timeout detection system for sending CAN FD bus messages, including a message configuration information monitoring module, a desired time calculation module, a message sending command monitoring module, a timer module, a message receiving module, a fault determination module and an error reporting module. When no sent packet is sampled on the bus within the specified expected time, an error message is reported to the upper computer.

Benefits of technology

When the CAN FD node cannot respond to the data sending command of the host computer, it promptly informs the host computer of the node failure, which has the characteristics of fast response time and high reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766626A_ABST
    Figure CN119766626A_ABST
Patent Text Reader

Abstract

The invention discloses an overtime detection system for CAN FD bus message sending. The overtime detection system comprises a message configuration information monitoring module, an expected time calculation module, a message sending command monitoring module, a timer module, a message receiving module, a fault judgment module and an error reporting module. The upper computer is connected with the message configuration information monitoring module, the message sending command monitoring module and the error reporting module; the timer module is connected with the message sending command monitoring module and the fault judgment module; the fault judgment module is connected with the expected time calculation module, the message receiving module and the error reporting module; and the message receiving module is connected with the bus. When the CAN FD node cannot respond to the data sending command of the upper computer, the node fault is notified to the upper computer in time, and the method has the advantages of being short in response time, high in reliability and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer bus communication, and relates to a timeout detection system and method for sending a CAN FD bus message. Background Art

[0002] With the development of electronic technology, electronic equipment is becoming more and more integrated, and the number of nodes that need to exchange information between devices is also increasing. In a complex communication system, a failure in a node may cause the loss of some critical data or command information, causing serious consequences for the entire application system. In some systems such as autonomous driving, medical equipment, aerospace, etc. that require high real-time and reliability of communication, how to ensure the secure transmission of data is particularly important.

[0003] The CAN FD node will sample data when sending it to the bus to determine whether the data sent meets expectations, automatically complete the error identification of data transmission on the bus, and automatically handle the fault by retransmitting or leaving the bus. However, when the CAN FD node itself has a fault, it cannot send out data frames after receiving the command from the host computer, and cannot achieve error identification by sampling the data on the bus. The host computer cannot receive relevant error information and mistakenly believes that the node is still working normally. In response to this situation, the present invention proposes a timeout detection method for sending CAN FD bus messages. When the sent message is not sampled on the bus within the specified expected time, the error information is reported to the host computer. Summary of the invention

[0004] (I) Purpose of the invention

[0005] The purpose of the present invention is to provide a CAN FD bus message sending timeout detection system and method to address the problem that a CAN FD node cannot send data frames to the bus due to a fault in the CAN FD node itself, and error recognition cannot be achieved by sampling the bus. The host computer cannot receive relevant error information and mistakenly believes that the node is still working normally. When the sent message is not sampled on the bus within the specified expected time, error information is reported to the host computer.

[0006] (II) Technical solution

[0007] In order to solve the above technical problems, the present invention provides a timeout detection system for CAN FD bus message sending, which includes: a message configuration information monitoring module, an expected time calculation module, a message sending command monitoring module, a timer module, a message receiving module, a fault judgment module and an error reporting module; a host computer is connected to the message configuration information monitoring module, the message sending command monitoring module and the error reporting module; the timer module is connected to the message sending command monitoring module and the fault judgment module; the fault judgment module is connected to the expected time calculation module, the message receiving module and the error reporting module; and the message receiving module is connected to the bus.

[0008] Among them, the message configuration information monitoring module monitors the configuration of the CAN FD node by the upper computer, the expected time calculation module calculates the expected time Frame_time required for data frame sending through the configuration information monitored by the message configuration information monitoring module, the message sending command monitoring module monitors the message sending command of the upper computer, the timer module starts timing with can_clk as the cycle after receiving the message sending command, the message receiving module monitors whether there is message transmission on the bus, the fault judgment module determines whether the message on the bus is received within the expected time according to the value of the timer, and the error reporting module reports error information to the upper computer.

[0009] Among them, the fault judgment module implements the timeout judgment of CAN FD message sending. When the timer counts more than the expected time for data transmission, if the message on the bus is still not received, it is determined that the CAN FD node has a fault, and the error reporting module reports the error information.

[0010] Among them, the message configuration information monitoring module is responsible for monitoring the configuration including bit time, frame format, and data length.

[0011] The expected time Frame_time takes can_clk as the time unit.

[0012] The expected time Frame_time is expressed by formula (1):

[0013] Frame_time = preprocessing time + (18 + 19 * extended frame identifier) ​​* 1.2 * bit_time1

[0014] +(number of data bytes*8)*1.2*bit_time2

[0015] +(10+CRC check field length)*bit_time2.(1)

[0016] Preprocessing time: the time from when the node processes the data after receiving the send command until the first bit is sent, with can_clk as the time unit;

[0017] Extended frame flag: When the data frame is an extended frame, the extended frame flag is 1, otherwise it is 0;

[0018] Bit_time1: Normal domain bit time, that is, how many can_clk cycles each bit is;

[0019] Bit_time2: Data domain bit time, that is, how many can_clk cycles each bit is;

[0020] CRC check field length: When the data frame carries 0-16 bytes of data, the CRC check field length is 23, including the fill count bit and the delimiter; when it carries more than 16 bytes of data, the CRC check field length is 28, including the fill count bit and the delimiter.

[0021] In formula (1), 18: the length of the frame header, control field and ACK response field of the CAN FD standard frame; 19: the extended frame identifier and SRR bit; 1.2: according to the bit stuffing rule, a bit of the opposite polarity must be inserted after every five consecutive bits of the same polarity, and 1.2 is the maximum number of bit stuffing; number of data bytes * 8: each data frame carries 0-64 bytes of data, and each byte is 8 bits; 10: the length of the DLC, ESI bit and length stuffing count bit.

[0022] The present invention also provides a timeout detection method for sending a CAN FD bus message, comprising the following steps:

[0023] Step 1: Monitor the message configuration information sent by the host computer to the CAN FD node, including bit time, frame format and data length;

[0024] Step 2: Use the monitored message configuration information to calculate the expected time for sending the message;

[0025] Step 3: Monitor the message sending command;

[0026] Step 4: When the host computer gives a message sending command, the timer starts timing;

[0027] Step 5: According to the value of the timer, determine in the fault determination module whether a message on the bus is received before the expected time arrives;

[0028] Step 6: If the timer value exceeds the expected time and still has not received the message on the bus, it is determined that the node is faulty and reports the error information to the host computer; if the timer value receives the message on the bus within the expected time, it is determined that the node is working normally and re-enters step 1 to prepare for the next data transmission.

[0029] (III) Beneficial effects

[0030] The CAN FD bus message sending timeout detection system and method provided by the above technical solution can promptly notify the host computer of the node failure when the CAN FD node cannot respond to the data sending command of the host computer, and has the characteristics of fast response time and high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 4 is a schematic diagram of a timeout detection system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0033] Reference Figure 1 As shown, the timeout detection system for sending a CAN FD bus message in this embodiment includes a message configuration information monitoring module, an expected time calculation module, a message sending command monitoring module, a timer module, a message receiving module, a fault judgment module and an error reporting module; the host computer is connected to the message configuration information monitoring module, the message sending command monitoring module and the error reporting module; the timer module is connected to the message sending command monitoring module and the fault judgment module; the fault judgment module is connected to the expected time calculation module, the message receiving module and the error reporting module; and the message receiving module is connected to the bus.

[0034] The message configuration information monitoring module monitors the configuration of the CAN FD node by the host computer. The expected time calculation module calculates the expected time Frame_time required for data frame sending through the configuration information monitored by the message configuration information monitoring module. The message sending command monitoring module monitors the message sending command of the host computer. The timer module starts timing with can_clk as the cycle after receiving the message sending command. The message receiving module monitors whether there is message transmission on the bus. The fault judgment module determines whether the message on the bus is received within the expected time according to the value of the timer. The error reporting module reports error information to the host computer.

[0035] The fault judgment module implements the timeout judgment of CAN FD message sending. When the timer exceeds the expected time for data transmission, if the message on the bus is still not received, it is determined that the CAN FD node has a fault, and the error reporting module reports the error information.

[0036] Among them, the message configuration information monitoring module is responsible for monitoring the configuration including bit time, frame format, and data length.

[0037] The expected time Frame_time is expressed in can_clk as the time unit, using formula (1):

[0038] Frame_time = preprocessing time + (18 + 19 * extended frame identifier) ​​* 1.2 * bit_time1

[0039] +(number of data bytes*8)*1.2*bit_time2

[0040] +(10+CRC check field length)*bit_time2.(1)

[0041] Preprocessing time: the time from when the node processes the data after receiving the send command until the first bit is sent, with can_clk as the time unit;

[0042] 18: Length of the frame header, control field and ACK response field of the CAN FD standard frame;

[0043] 19: Extended frame identifier and SRR bit;

[0044] Extended frame flag: When the data frame is an extended frame, the extended frame flag is 1, otherwise it is 0;

[0045] 1.2: According to the bit filling rule, a bit of opposite polarity must be inserted after every five consecutive bits of the same polarity. 1.2 is the maximum number of bit fillings;

[0046] Bit_time1: Normal domain bit time, that is, how many can_clk cycles each bit is;

[0047] Number of data bytes*8: Each data frame can carry 0-64 bytes of data, with each byte being 8 bits;

[0048] Bit_time2: Data domain bit time, that is, how many can_clk cycles each bit is;

[0049] 10: DLC, ESI bit and length filling count bit length;

[0050] CRC check field length: When the data frame carries 0-16 bytes of data, the CRC check field length is 23 (including the fill count bit and the delimiter); when it carries more than 16 bytes of data, the CRC check field length is 28 (including the fill count bit and the delimiter).

[0051] Based on the above-mentioned CAN FD bus message sending timeout detection system, the CAN FD bus message sending timeout detection method of this embodiment includes the following steps:

[0052] Step 1: Monitor the message configuration information sent by the host computer to the CAN FD node, including bit time, frame format and data length;

[0053] Step 2: Use the monitored message configuration information to calculate the expected time for sending the message;

[0054] Step 3: Monitor the message sending command;

[0055] Step 4: When the host computer gives a message sending command, the timer starts timing;

[0056] Step 5: According to the value of the timer, determine in the fault determination module whether a message on the bus is received before the expected time arrives;

[0057] Step 6: If the timer value exceeds the expected time and still has not received the message on the bus, it is determined that the node is faulty and reports the error information to the host computer; if the timer value receives the message on the bus within the expected time, it is determined that the node is working normally and re-enters step 1 to prepare for the next data transmission.

[0058] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A CAN FD bus message sending timeout detection system, characterized in that: include: Message configuration information monitoring module, expected time calculation module, message sending command monitoring module, timer module, message receiving module, fault judgment module and error reporting module; the host computer is connected to the message configuration information monitoring module, the message sending command monitoring module and the error reporting module; The timer module is connected to the message sending command monitoring module and the fault determination module; the fault determination module is connected to the expected time calculation module, the message receiving module and the error reporting module; the message receiving module is connected to the bus.

2. The CAN FD bus message sending timeout detection system according to claim 1, characterized in that: The message configuration information monitoring module monitors the configuration of the CAN FD node by the host computer. The expected time calculation module calculates the expected time Frame_time required for data frame sending through the configuration information monitored by the message configuration information monitoring module. The message sending command monitoring module monitors the message sending command of the host computer. The timer module starts timing with can_clk as the cycle after receiving the message sending command. The message receiving module monitors whether there is message transmission on the bus. The fault judgment module determines whether the message on the bus is received within the expected time according to the value of the timer. The error reporting module reports error information to the host computer.

3. The CAN FD bus message sending timeout detection system according to claim 2, characterized in that: The fault judgment module implements the timeout judgment of CAN FD message sending. When the timer exceeds the expected time for data transmission, if the message on the bus is still not received, it is determined that the CAN FD node has a fault, and the error reporting module reports the error information.

4. The CAN FD bus message sending timeout detection system according to claim 3, characterized in that: The message configuration information monitoring module is responsible for monitoring the configuration including bit time, frame format, and data length.

5. The CAN FD bus message sending timeout detection system according to claim 4, characterized in that: The expected time Frame_time takes can_clk as the time unit.

6. The CAN FD bus message sending timeout detection system according to claim 5, characterized in that: The expected time Frame_time is expressed by formula (1): Frame_time = preprocessing time + (18 + 19 * extended frame identifier) ​​* 1.2 * bit_time1 +(number of data bytes*8)*1.2*bit_time2 +(10+CRC check field length)*bit_time2.(1) Preprocessing time: the time from when the node processes the data after receiving the send command until the first bit is sent, with can_clk as the time unit; Extended frame flag: When the data frame is an extended frame, the extended frame flag is 1, otherwise it is 0; Bit_time1: Normal domain bit time, that is, how many can_clk cycles each bit is; Bit_time2: Data domain bit time, that is, how many can_clk cycles each bit is; CRC check field length: When the data frame carries 0-16 bytes of data, the CRC check field length is 23, including the fill count bit and the delimiter; when it carries more than 16 bytes of data, the CRC check field length is 28, including the fill count bit and the delimiter.

7. The CAN FD bus message sending timeout detection system according to claim 6, characterized in that: In formula (1), 18: the length of the frame header, control field and ACK response field of the CAN FD standard frame; 19: the extended frame identifier and SRR bit; 1.2: according to the bit stuffing rule, a bit of the opposite polarity must be inserted after every five consecutive bits of the same polarity, and 1.2 is the maximum number of bit stuffing; number of data bytes * 8: each data frame carries 0-64 bytes of data, and each byte is 8 bits; 10: DLC, ESI bit and length fill count bit length.

8. A method for detecting timeout of CAN FD bus message transmission, characterized in that: The timeout detection method performs timeout detection based on the timeout detection system according to claim 7, and the timeout detection method comprises the following steps: Step 1: Monitor the message configuration information sent by the host computer to the CAN FD node, including bit time, frame format and data length; Step 2: Use the monitored message configuration information to calculate the expected time for sending the message; Step 3: Monitor the message sending command; Step 4: When the host computer gives a message sending command, the timer starts timing; Step 5: According to the value of the timer, determine in the fault determination module whether a message on the bus is received before the expected time arrives; Step 6: If the timer value exceeds the expected time and still has not received the message on the bus, it is determined that the node is faulty and reports the error information to the host computer; if the timer value receives the message on the bus within the expected time, it is determined that the node is working normally and re-enters step 1 to prepare for the next data transmission.

9. Application of a timeout detection system for sending a CAN FD bus message according to any one of claims 1 to 7 in the field of computer bus communication technology.

10. Application of a timeout detection method for sending a CAN FD bus message according to claim 8 in the field of computer bus communication technology.

Citation Information

Patent Citations

  • CAN bus intelligent data acquisition module

    CN104460396A

  • Method, device and system for collecting CAN (Controller Area Network) data

    CN114120481A

  • CAN bus communication reliability detection method and device

    CN118487890A

  • Method for managing user side device through NAT gateway

    EP2012502A1