A method and system for recovery strategy after CANoe test bus shutdown

By detecting the bus shutdown state through the CANoe device, controlling the CAN controller to stop message transmission, and sending a recovery request, the bus recovery strategy is tested. This solves the problem of testing the recovery strategy after a bus failure, and effectively detects the fast and slow recovery cycle and number of times of the bus, ensuring communication recovery.

CN118981197BActive Publication Date: 2025-10-31CHERY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411039472.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-10-31
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

How to test the recovery strategy of automotive components after the bus is shut down using CANoe devices, especially the cycle and number of fast and slow recovery cycles, has not yet been effectively solved.

Method used

A CANoe-based testing method and system are provided. By detecting whether the bus of the sample under test is in a closed state, the CAN controller is controlled to stop sending and receiving messages and send a bus recovery request. The recovery strategy after the bus is closed is tested, including obtaining the number of fast recovery cycles and the cycle, determining whether a slow recovery cycle has been entered, and resuming communication when a target number of consecutive recessive bits are detected.

Benefits of technology

The fast and slow recovery mechanism of the BUSOFF component of the CANoe 12.0SP5 host computer was tested to ensure that the bus can effectively restore communication after a failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981197B_ABST
    Figure CN118981197B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of bus shutdown recovery testing, and discloses a method and system for testing bus shutdown recovery strategies based on CANoe. The method includes: detecting whether the bus of the sample under test is in a shutdown state; when the sample under test is in a shutdown state, controlling the CAN controller to stop sending and receiving messages; sending a bus shutdown recovery request and testing the recovery strategy after the sample under test is shut down. Using exemplary embodiments of this disclosure, the testing of the fast and slow recovery mechanism of component BUSOFF based on a CANoe 12.0SP5 host computer is implemented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of bus shutdown recovery testing technology, specifically to a method and system for testing bus recovery strategies based on CANoe. Background Technology

[0002] A car has many ECU nodes. When one of these nodes malfunctions and enters a bus shutdown state, it significantly impacts the communication of the entire vehicle's CAN network. The CAN controller can determine whether the error is a temporary data error on the bus (such as external interference) or a persistent data error. When a persistent data error occurs on the bus, the error counter inside the CAN controller accumulates to a bus shutdown threshold, isolating the faulty unit and preventing it from participating in network communication with other nodes on the bus. How to test the recovery strategy of automotive components after bus shutdown using CANoe devices, especially the cycle and number of fast and slow recovery cycles, is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This disclosure provides a method and system based on a CANoe test bus shutdown recovery strategy to solve or alleviate one or more of the above-mentioned technical problems in the prior art.

[0004] According to one aspect of this disclosure, a method is provided based on a recovery strategy after a CANoe test bus shutdown, comprising:

[0005] Check if the bus of the sample under test is in the off state;

[0006] When the bus of the sample under test is in the off state, the CAN controller is controlled to stop sending and receiving messages;

[0007] Send a bus recovery request to the test sample and test the recovery strategy after the bus of the test sample is shut down.

[0008] In one possible implementation, the recovery strategy for the test device after its bus is shut down includes:

[0009] During the bus recovery request process of the sample under test, the number of fast recovery attempts and the fast recovery cycle are obtained.

[0010] Determine whether the number of fast recovery cycles has reached the set number within the fast recovery period;

[0011] Once the set number of fast recovery cycles is reached, determine whether the tested sample has transitioned from the fast recovery cycle to the slow recovery cycle.

[0012] Communication resumes when the tested sample enters a slow recovery cycle and detects the target number of consecutive recessive bits.

[0013] In one possible implementation, detecting whether the bus of the sample under test is in a closed state includes:

[0014] The sample to be tested is connected to the test bench and the sample to be tested is initialized;

[0015] Start the CAN software and load the interference project;

[0016] Configure the CANoe communication channel;

[0017] Select the main control panel;

[0018] Configure triggers;

[0019] Configure sequences;

[0020] Configure the trigger mode in the main control panel.

[0021] In one possible implementation, when the bus of the device under test is in a closed state, after controlling the CAN controller to stop sending and receiving messages, the following steps are taken:

[0022] The device under test (DUT) is woken up, interference engineering is enabled, and the periodic messages sent by the DUT are interfered with. The accumulated frames of error frames are monitored. When the accumulated frames of error frames reach the target frame, the DUT requests recovery from the bus.

[0023] In one possible implementation, initializing the sample under test includes:

[0024] Connect the sample to be tested to a DC power supply and adjust the voltage to the set value;

[0025] Turn on the BAT&IGN switch to activate the power and ignition system of the test sample.

[0026] In one possible implementation, starting the CAN software and loading the interference test project includes:

[0027] Open the host computer;

[0028] Select the file module from the initial panel;

[0029] Select the example configuration in the file module;

[0030] Select the CAN-Additional Configuration in the example configuration;

[0031] Select the CAN interference project in the CAN-Additional Configuration.

[0032] In one possible implementation, configuring the CANoe communication channel includes:

[0033] Select the hardware options in the initial panel;

[0034] Select channel mapping in the hardware options;

[0035] Select an interference channel from the channel mapping table and confirm the configuration.

[0036] In one possible implementation, the selection of the main control panel includes:

[0037] Select the Control Panel option in the main window;

[0038] In the pop-up window, select the main control panel and confirm the selection.

[0039] In one possible implementation, configuring the trigger mode in the main control panel includes:

[0040] Set the number of repeated triggers, the number of fast recovery attempts, the fast recovery cycle, and the slow recovery cycle.

[0041] According to one aspect of this disclosure, a system based on a CANoe test bus shutdown recovery strategy is provided, comprising:

[0042] The detection unit is used to detect whether the bus of the sample under test is in the off state.

[0043] The control unit is used to control the CAN controller to stop sending and receiving messages when the bus of the sample under test is in the off state;

[0044] The test unit is used to send bus recovery requests to the test sample and to test the recovery strategy after the bus of the test sample is shut down.

[0045] The exemplary embodiments of this disclosure have the following beneficial effects: First, the exemplary embodiments of this disclosure detect whether the bus of the sample under test is in a closed state; when the bus of the sample under test is in a closed state, the CAN controller is controlled to stop sending and receiving messages; then, a bus recovery request is sent, and the recovery strategy after the bus of the sample under test is closed is tested. Specifically, during the bus recovery request process, the number of fast recovery attempts and the fast recovery cycle are obtained; and when the number of fast recovery attempts reaches a set number, it is determined whether the sample under test has entered a slow recovery cycle from the fast recovery cycle; when the sample under test enters the slow recovery cycle and a target number of consecutive recessive bits are detected, communication is restored, thus realizing the testing of the component BUSOFF fast and slow recovery mechanism based on the CANoe 12.0SP5 host computer.

[0046] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the accompanying drawings. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit this disclosure. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0048] Figure 1 This is a flowchart illustrating a method for a recovery strategy based on a CANoe test bus shutdown in this exemplary embodiment;

[0049] Figure 2 This is a schematic diagram of the basic logic transformation of BUSOFF in this exemplary embodiment;

[0050] Figure 3 This is a flowchart of the BUSOFF test process in this exemplary embodiment;

[0051] Figure 4 This is a block diagram of a system based on a CANoe test bus shutdown recovery strategy, as described in this exemplary embodiment. Detailed Implementation

[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0053] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware units or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0054] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0055] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein.

[0056] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or device that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules that are explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to such process, method, product, or device.

[0057] Figure 1 This is a flowchart illustrating a method for a recovery strategy based on a CANoe test bus shutdown in this exemplary embodiment, as shown below. Figure 1 As shown, an exemplary embodiment of this disclosure provides a method for a recovery strategy based on a CANoe test bus shutdown, including:

[0058] S1 detects whether the bus of the sample under test is in a closed state;

[0059] S2 controls the CAN controller to stop sending and receiving messages when the bus of the sample under test is in the off state;

[0060] S3 sends a bus recovery request to the test sample and tests the recovery strategy after the bus of the test sample is shut down.

[0061] Specifically, such as Figure 3 As shown, the recovery strategy for the test device after the bus is turned off includes:

[0062] During the bus recovery request process of the sample under test, the number of fast recovery attempts and the fast recovery cycle are obtained.

[0063] Determine whether the number of fast recovery cycles has reached the set number within the fast recovery period;

[0064] Once the set number of fast recovery cycles is reached, determine whether the tested sample has transitioned from the fast recovery cycle to the slow recovery cycle.

[0065] Communication resumes when the tested sample enters a slow recovery cycle and detects the target number of consecutive recessive bits.

[0066] Specifically, the process of checking whether the bus of the sample under test is in a closed state includes:

[0067] Connect the test sample to the test bench and initialize the test sample; for example, connect the test sample to the test bench, turn on the DC power supply, adjust the voltage to 13.5V, and turn on the BAT&IGN (power and ignition) switch.

[0068] Start the CAN software and load the interference project; for example, open the CANoe 12.0SP5 host computer, click the File module in the initial panel, select Sample Configurations in the file, and find the Disturbance (CAN) interference project in CAN-Additional.

[0069] Configure the CANoe communication channel; for example, configuring the CANoe communication channel includes: clicking Hardware in the initial panel, selecting Channel Mapping; selecting VH6501 Channel 1 in the channel, and clicking OK to confirm the configuration.

[0070] Select the main control panel; for example, selecting the main control panel includes: clicking Panel in the Home window, selecting MainConfigPanel in the pop-up window, and finally clicking OK to confirm the selection.

[0071] Configure the trigger; for example, configuring the trigger includes: clicking TriggerConfigurations in the control panel, entering 1 in the CRC Delimiter box, entering 0 in the ACKSlot box, and selecting ACKSlot in the CurrtriggerField box, which can be used as the triggering condition for generating error frames, thereby affecting the error counter.

[0072] Configure the sequence; for example, configuring the sequence includes: clicking Sequence Configuration, which will bring up the SequencePanel, selecting Arbitration Bit Timing Information, and then clicking the Add Segment button to add the sequence.

[0073] In the main control panel, configure the trigger mode, for example, by returning to MainConfigPanel and in the Trigger mode, in the Repetition box, change the parameter to ≥192 times, where fast recovery is defined 5 times with a period of 100ms±10% and slow recovery period of 1000ms±10%.

[0074] Specifically, when the bus of the device under test is in the off state, after controlling the CAN controller to stop sending and receiving messages, the following steps are taken:

[0075] like Figure 2 As shown ( Figure 2 In this code, REC stands for Receive error counter; TEC stands for Transmit error counter; and init stands for Normal mode request. The "normal mode request and 128 occurrences of 11 consecutive recessive bits" (meaning 11 consecutive recessive bits appearing 128 times) wakes up the device under test (DUT), enables interference engineering, interferes with the periodic messages emitted by the DUT, and monitors the accumulation of error frames. When the accumulated error frames reach the target frame, the DUT requests recovery from the bus. For example, after waking up the DUT, quickly clicking "Enable On Device" initiates interference with the periodic messages emitted by the DUT. The interference device (VH6501) adds Diff Time to the Trace message list, counting from the first interfered frame. When the accumulated error frames reach 32, the DUT requests recovery from the bus. The recovery period is 100ms ± 10%, and the fast recovery count is incremented by 1. When the number of fast recovery attempts accumulates to 5, the test sample will change the recovery request period from 100ms±10% to 1000ms±10%. The sample will listen for bus messages at 1000ms±10%, and communication can be restored when 128 consecutive recessive bit frequencies are detected.

[0076] Specifically, initializing the sample under test includes:

[0077] Connect the sample to be tested to a DC power supply and adjust the voltage to the set value;

[0078] Turn on the BAT&IGN switch to activate the power and ignition system of the test sample.

[0079] Specifically, starting the CAN software and loading the interference test project includes:

[0080] Open the host computer;

[0081] Select the file module from the initial panel;

[0082] Select the example configuration in the file module;

[0083] Select the CAN-Additional Configuration in the example configuration;

[0084] Select the CAN interference project in the CAN-Additional Configuration.

[0085] Specifically, configuring the CANoe communication channel includes:

[0086] Select the hardware options in the initial panel;

[0087] Select channel mapping in the hardware options;

[0088] Select an interference channel from the channel mapping table and confirm the configuration.

[0089] Specifically, the selection of the main control panel includes:

[0090] Select the Control Panel option in the main window;

[0091] In the pop-up window, select the main control panel and confirm the selection.

[0092] Specifically, in the main control panel, configuring the trigger mode includes:

[0093] Configure the number of repeated triggers, the number of fast recovery attempts, the fast recovery period, and the slow recovery period. The definitions of the fast and slow recovery periods are shown in Table 1.

[0094] Table 1

[0095]

[0096] Figure 4 This is a block diagram of a system based on a CANoe test bus shutdown recovery strategy, as illustrated in this exemplary embodiment. Figure 4 As shown, an exemplary embodiment of this disclosure provides a system based on a recovery strategy after a CANoe test bus shutdown, comprising:

[0097] Detection unit 10 is used to detect whether the bus of the sample under test is in the off state;

[0098] Control unit 20 is used to control the CAN controller to stop sending and receiving messages when the bus of the sample under test is in the off state;

[0099] Test unit 30 is used to send a bus recovery request for the sample under test and to test the recovery strategy after the bus of the sample under test is shut down.

[0100] The above are merely preferred embodiments of this disclosure. The scope of protection of this disclosure is not limited to the above embodiments. All technical solutions falling within the scope of this disclosure are protected. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of this disclosure should be considered within the scope of protection of this disclosure.

Claims

1. A method for recovering from a CANoe test bus shutdown, characterized in that, include: Check if the bus of the sample under test is in the off state; When the bus of the sample under test is in the off state, the CAN controller is controlled to stop sending and receiving messages; Send a bus recovery request to the test sample and test the recovery strategy after the bus of the test sample is turned off; The recovery strategy after the bus of the test device is turned off includes: During the bus recovery request process of the sample under test, the number of fast recovery attempts and the fast recovery cycle are obtained. Determine whether the number of fast recovery cycles has reached the set number within the fast recovery period; Once the set number of fast recovery cycles is reached, determine whether the tested sample has transitioned from the fast recovery cycle to the slow recovery cycle. Communication resumes when the tested sample enters a slow recovery cycle and detects the target number of consecutive recessive bits.

2. The method for recovering after the CANoe test bus is shut down according to claim 1, characterized in that, Before checking whether the bus of the test sample is in the off state, the following should be included: The sample to be tested is connected to the test bench and the sample to be tested is initialized; Start the CAN software and load the interference project; Configure the CANoe communication channel; Select the main control panel; Configure triggers; Configure sequences; Configure the trigger mode in the main control panel.

3. The method for recovering after the CANoe test bus is shut down according to claim 2, characterized in that, When the bus of the sample under test is in the off state, the control of the CAN controller to stop sending and receiving messages includes: The device under test (DUT) is woken up, interference engineering is enabled, and the periodic messages sent by the DUT are interfered with. The accumulated frames of error frames are monitored. When the accumulated frames of error frames reach the target frame, the DUT requests recovery from the bus.

4. The method for recovering after the CANoe test bus is shut down according to claim 2, characterized in that, The initialization of the sample under test includes: Connect the sample to be tested to a DC power supply and adjust the voltage to the set value; Turn on the BAT&IGN switch to activate the power and ignition system of the test sample.

5. The method for recovering after the CANoe test bus is shut down according to claim 2, characterized in that, The process of starting the CAN software and loading the interference test project includes: Open the host computer; Select the file module in the initial panel; Select the example configuration in the file module; Select the CAN-Additional Configuration in the example configuration; Select the CAN interference project in the CAN-Additional Configuration.

6. The method for recovering after the CANoe test bus is shut down according to claim 2, characterized in that, The configuration of the CANoe communication channel includes: Select the hardware options in the initial panel; Select channel mapping in the hardware options; Select an interference channel in the channel mapping and confirm the configuration.

7. The method for recovering after the CANoe test bus is shut down according to claim 2, characterized in that, The selection of the main control panel includes: Select the Control Panel option in the main window; In the pop-up window, select the main control panel and confirm the selection.

8. The method for recovering after the CANoe test bus is shut down according to claim 7, characterized in that, In the main control panel, the trigger modes can be configured as follows: Set the number of repeated triggers, the number of fast recovery attempts, the fast recovery cycle, and the slow recovery cycle.

9. A system based on a recovery strategy after the CANoe test bus is shut down, characterized in that, include: The detection unit is used to detect whether the bus of the sample under test is in the off state. The control unit is used to control the CAN controller to stop sending and receiving messages when the bus of the sample under test is in the off state; The test unit is used to send bus recovery requests to the test sample and to test the recovery strategy after the bus of the test sample is shut down. The recovery strategy after the bus of the test device is turned off includes: During the bus recovery request process of the sample under test, the number of fast recovery attempts and the fast recovery cycle are obtained. Determine whether the number of fast recovery cycles has reached the set number within the fast recovery period; Once the set number of fast recovery cycles is reached, determine whether the tested sample has transitioned from the fast recovery cycle to the slow recovery cycle. Communication resumes when the tested sample enters a slow recovery cycle and detects the target number of consecutive recessive bits.

Citation Information

Patent Citations

  • CAN Bus off fast and slow recovery time test method and device, equipment and storage medium

    CN111130935A

  • Method and device for adjusting CAN bus node recovery duration and electronic equipment

    CN118101368A