Method and system for recovering strategy after bus closing based on CANoe test

Through the CANoe device to detect and control the bus status, test the recovery strategy after the car bus is closed, solving the problem of difficult testing of the bus recovery strategy in the existing technology, and achieving effective fast and slow recovery cycle and number detection, ensuring the recovery of CAN network communication .

CN118981197AActive Publication Date: 2024-11-19CHERY AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to effectively test the recovery strategy after the car bus is shut down, especially the fast and slow recovery cycles and times, which affects the entire vehicle's CAN network communication.

Method used

The CANoe device detects whether the sample bus is in the off state, controls the CAN controller to stop sending and receiving messages, and sends a recovery request, obtains the number of fast recovery times and periods, determines whether it has entered a slow recovery period, and detects continuous hidden bits. Recover communication when

Benefits of technology

The test of the fast and slow recovery mechanism of components based on CANoe 12.0SP5 host computer is implemented, ensuring the effectiveness of the recovery strategy of bus communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981197A_ABST
    Figure CN118981197A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of bus shutdown recovery testing, and discloses a method and system for testing a recovery strategy after bus shutdown based on CANoe, and the method comprises the steps: detecting whether a tested sample piece bus is in a shutdown state or not; when the tested sample piece bus is in a closed state, the CAN controller is controlled to stop receiving and transmitting messages; and sending a tested sample piece bus recovery request, and testing a recovery strategy after the tested sample piece bus is closed. According to the embodiment of the invention, the test of the BUSOFF fast and slow recovery mechanism of the part based on the CANoe 12.0 SP5 upper computer is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the technical field of bus shutdown recovery testing, and in particular to a method and system for testing a bus shutdown recovery strategy based on CANoe. Background Art

[0002] There are many ECU nodes inside the car. When one of the nodes fails and enters the bus-off state, it will greatly affect the communication of the entire vehicle's CAN network. The CAN controller can determine whether the type of error is a temporary data error on the bus (such as external interference) or a continuous data error. When a continuous data error occurs on the bus, the error counter inside the CAN controller accumulates to the bus-off threshold, and the unit that caused the fault can be isolated and not participate in the network communication with other nodes on the bus. How to test the recovery strategy of automotive parts after the bus is shut down through CANoe equipment, especially the cycle and number of fast and slow recovery, is a problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present disclosure provide a method and system based on a CANoe test bus shutdown recovery strategy to solve or alleviate one or more of the above technical problems in the prior art.

[0004] According to one aspect of the present disclosure, a method for recovering a CANoe test bus after shutdown is provided, comprising:

[0005] Detect whether the bus of the sample under test is in a closed 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 device under test and test the recovery strategy of the device under test after the bus is shut down.

[0008] In a possible implementation, the recovery strategy after the bus of the DUT is shut down includes:

[0009] Obtain the number of fast recovery times and fast recovery cycles during the bus recovery request process of the sample under test;

[0010] Determine whether the number of fast recovery times reaches the set number within the fast recovery cycle;

[0011] When the number of fast recovery times reaches the set number, it is determined whether the sample under test enters the slow recovery cycle from the fast recovery cycle;

[0012] When the device under test enters the slow recovery cycle and detects the target number of consecutive recessive bits, communication is restored.

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

[0014] Connecting the sample to be tested to the test stand and initializing the sample to be tested;

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

[0016] Configure CANoe communication channel;

[0017] Select the main control panel;

[0018] Configure triggers;

[0019] Configuration sequence;

[0020] In the Main Control Panel, configure the Trigger Mode.

[0021] In a possible implementation, when the bus of the sample device under test is in a closed state, controlling the CAN controller to stop sending and receiving messages includes:

[0022] Wake up the device under test, enable the interference project, interfere with the periodic messages sent by the device under test, and monitor the accumulated frames of error frames; when the accumulated frames of error frames reach the target frame, the device under test requests recovery from the bus.

[0023] In a possible implementation manner, 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 a possible implementation, starting the CAN software and loading the interference test project includes:

[0027] Open the host computer;

[0028] Select the File module in the initial panel;

[0029] Selecting an example configuration in the file module;

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

[0031] In the CAN-Additional Configuration, select CAN Interference Engineering.

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

[0033] Select the Hardware option in the initial panel;

[0034] Select channel mapping in the hardware options;

[0035] Select an interferometer channel in the channel mapping table and confirm the configuration.

[0036] In a possible implementation, selecting the main control panel includes:

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

[0038] In the pop-up window, select Main Control Panel and confirm your selection.

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

[0040] Set the number of repetitive triggers, the number of fast recovery times, the fast recovery period, and the slow recovery period.

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

[0042] A detection unit, used to detect whether the bus of the sample under test is in a closed state;

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

[0044] The test unit is used to send a bus recovery request to the tested sample device and test the recovery strategy of the tested sample device after the bus is closed.

[0045] The exemplary embodiments of the present disclosure have the following beneficial effects: the exemplary embodiments of the present disclosure first detect whether the bus of the sample device under test is in a closed state; when the bus of the sample device under test is in a closed state, control the CAN controller to stop sending and receiving messages; then send a bus recovery request for the sample device under test, and test the recovery strategy of the bus of the sample device under test after the bus is closed. Specifically, in the bus recovery request process of the sample device under test, obtain the number of fast recovery times and the fast recovery cycle; and when the number of fast recovery times reaches the set number, determine whether the sample device under test enters the slow recovery cycle from the fast recovery cycle; when the sample device under test enters the slow recovery cycle and detects the target number of consecutive recessive bits, restore communication, thereby realizing the test of the fast and slow recovery mechanism of the BUSOFF of components based on the CANoe 12.0SP5 host computer.

[0046] The details of one or more embodiments of the present application are presented in the following drawings and descriptions. Other features and advantages of the present application will become apparent from the accompanying drawings. It should be understood that the above general description and the detailed descriptions below are only exemplary and explanatory and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0048] Figure 1 is a flow chart of a method for recovering a bus after shutdown based on CANoe test bus of this exemplary embodiment;

[0049] Figure 2 is a BUSOFF basic logic conversion diagram of this exemplary embodiment;

[0050] Figure 3 is a flow chart of the BUSOFF test of the present exemplary embodiment;

[0051] Figure 4 It is a block diagram of a system for testing a bus shutdown recovery strategy based on CANoe according to the exemplary embodiment. DETAILED DESCRIPTION

[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0053] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware units or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0054] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.

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

[0056] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0057] Figure 1 4 is a flow chart of a method for recovering a CANoe test bus after shutdown based on the exemplary embodiment of the present invention. Figure 1 As shown, an exemplary embodiment of the present disclosure provides a method for testing a bus shutdown recovery strategy based on CANoe, including:

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

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

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

[0061] Specifically, Figure 3 As shown in the figure, the recovery strategy after the bus of the DUT is shut down includes:

[0062] Obtain the number of fast recovery times and fast recovery cycles during the bus recovery request process of the sample under test;

[0063] Determine whether the number of fast recovery times reaches the set number within the fast recovery cycle;

[0064] When the number of fast recovery times reaches the set number, it is determined whether the sample under test enters the slow recovery cycle from the fast recovery cycle;

[0065] When the device under test enters the slow recovery cycle and detects the target number of consecutive recessive bits, communication is restored.

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

[0067] Connect the test sample to the test bench and initialize the test sample; illustratively, 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 the configuration CAN-Additional.

[0069] Configure the CANoe communication channel; illustratively, 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; illustratively, 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; illustratively, configuring the trigger includes: clicking Trigger Configurations in the control panel, writing 1 in the CRC Delimiter box, writing 0 in the ACK Slot box, and selecting ACK Slot in the Current Trigger Field box, which can be used to generate a trigger condition for an error frame, thereby affecting the error counter.

[0072] Configure the sequence; illustratively, configuring the sequence includes: clicking Sequence Configuration, a Sequence Panel pops up, selecting Arbitration Bit Timing Information, and then clicking the Add Segment button to add a sequence.

[0073] In the main control panel, configure the trigger mode, exemplarily including: return to MainConfigPanel, in the Repetition box in Trigger, change the parameters to ≥192 times, where fast recovery is defined 5 times, the period is 100ms±10%, and the slow recovery period is 1000ms±10%.

[0074] Specifically, when the bus of the sample device under test is in a closed state, controlling the CAN controller to stop sending and receiving messages includes:

[0075] like Figure 2 As shown ( Figure 2 In the example, REC stands for Receive error counter, TEC stands for Transmit error counter, init stands for Normal mode request, and Normal mode request and 128occurrence of 11consecutive recessive bits means 128 consecutive occurrences of 11 recessive bits), wake up the DUT, enable the interference project, interfere with the periodic messages sent by the DUT, and monitor the accumulated frames of error frames; when the accumulated frames of error frames reach the target frame, the DUT requests recovery from the bus. Exemplarily, after waking up the DUT, quickly click Enable On Device, the jammer (VH6501) starts to interfere with the periodic messages sent by the DUT, adds Diff Time to the Trace message list, and starts counting from the first interfered frame. When the error frames accumulate to 32 frames, the DUT requests recovery from the bus, and the recovery cycle is 100ms±10%, and the number of fast recovery times is increased by 1. When the number of fast recoveries accumulates to 5 times, the sample under test will change the recovery request cycle from 100ms±10% to 1000ms±10%. The sample will monitor the bus message at 1000ms±10%. When 128 consecutive recessive bits are detected, communication can be restored.

[0076] Specifically, the initializing the tested sample comprises:

[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 in the initial panel;

[0082] Selecting an example configuration in the file module;

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

[0084] In the CAN-Additional Configuration, select CAN Interference Engineering.

[0085] Specifically, the configuration of the CANoe communication channel includes:

[0086] Select the Hardware option in the initial panel;

[0087] Select channel mapping in the hardware options;

[0088] Select an interferometer channel in 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 Home window;

[0091] In the pop-up window, select Main Control Panel and confirm your selection.

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

[0093] Set the number of repeated triggers, the number of fast recovery times, the fast recovery cycle and the slow recovery cycle. The definitions of the fast and slow recovery cycles are shown in Table 1:

[0094] Table 1

[0095]

[0096] Figure 4 is a block diagram of a system based on a CANoe test bus shutdown recovery strategy of this exemplary embodiment, such as Figure 4 As shown, an exemplary embodiment of the present disclosure provides a system based on a CANoe test bus shutdown recovery strategy, comprising:

[0097] The detection unit 10 is used to detect whether the bus of the sample under test is in a closed state;

[0098] The 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 a closed state;

[0099] The test unit 30 is used to send a bus recovery request to the tested sample device and test the recovery strategy of the tested sample device after the bus is shut down.

[0100] The above are only preferred implementations of the present disclosure, and the protection scope of the present disclosure is not limited to the above embodiments. All technical solutions under the concept of the present disclosure belong to the protection scope of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present disclosure should be regarded as the protection scope of the present disclosure.

Claims

1. A method for testing the recovery strategy after the bus is shut down based on CANoe, It is characterized in that include: Detect whether the bus of the sample under test is in a closed 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 device under test and test the recovery strategy of the device under test after the bus is shut down.

2. The method according to claim 1 based on the CANoe test bus shutdown recovery strategy, It is characterized in that The recovery strategy after the bus of the DUT is shut down includes: Obtain the number of fast recovery times and fast recovery cycles during the bus recovery request process of the sample under test; Determine whether the number of fast recovery times reaches the set number within the fast recovery cycle; When the number of fast recovery times reaches the set number, it is determined whether the tested sample enters the slow recovery cycle from the fast recovery cycle; When the device under test enters the slow recovery cycle and detects the target number of consecutive recessive bits, communication is restored.

3. The method according to claim 1 or 2 based on the CANoe test bus shutdown recovery strategy, It is characterized in that Before detecting whether the bus of the sample under test is in a closed state, the following steps are included: Connecting the sample to be tested to the test stand and initializing the sample to be tested; Start the CAN software and load the interference project; Configure CANoe communication channel; Select the main control panel; Configure triggers; Configuration sequence; In the Main Control Panel, configure the Trigger Mode.

4. The method according to claim 3 based on the CANoe test bus shutdown recovery strategy, It is characterized in that When the bus of the sample under test is in the off state, the following steps are performed to control the CAN controller to stop sending and receiving messages: Wake up the device under test, enable the interference project, interfere with the periodic messages sent by the device under test, and monitor the accumulated frames of error frames; when the accumulated frames of error frames reach the target frame, the device under test requests recovery from the bus.

5. The method according to claim 3 based on the CANoe test bus shutdown recovery strategy, It is characterized in that Initializing 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.

6. The method according to claim 3 based on the CANoe test bus shutdown recovery strategy, It is characterized in that The starting of the CAN software and loading of the interference test project includes: Open the host computer; Select the File module in the initial panel; Selecting an example configuration in the file module; Select CAN-Additional Configuration in the example configuration; In the CAN-Additional Configuration, select CAN Interference Engineering.

7. The method according to claim 3, based on the CANoe test bus shutdown recovery strategy, It is characterized in that The configuration of the CANoe communication channel includes: Select the Hardware option in the initial panel; Select channel mapping in the hardware options; Select an interferometer channel in the channel mapping table and confirm the configuration.

8. The method according to claim 3, based on the CANoe test bus shutdown recovery strategy, It is characterized in that The main control panel includes: Select the Control Panel option in the Home window; In the pop-up window, select Main Control Panel and confirm your selection.

9. The method according to claim 8 based on the CANoe test bus shutdown recovery strategy, It is characterized in that In the main control panel, configure the trigger mode including: Set the number of repetitive triggers, the number of fast recovery times, the fast recovery period, and the slow recovery period.

10. A system based on CANoe test bus shutdown recovery strategy, It is characterized in that include: A detection unit, used to detect whether the bus of the sample under test is in a closed state; A control unit, used to control the CAN controller to stop sending and receiving messages when the bus of the sample under test is in a closed state; The test unit is used to send a bus recovery request to the tested sample device and test the recovery strategy of the tested sample device after the bus is closed.

Citation Information

Patent Citations

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

    CN111130935A

  • Silent node bus closing fast and slow recovery strategy test method and system

    CN115494823A

  • Vehicle fault code analysis method and system based on CANoe

    CN118012005A

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

    CN118101368A

  • Optical ethernet apparatus capable of reset control

    US20170195042A1