A method, apparatus, storage medium, and device for testing automotive controllers.
By using an automated cyclic testing method, a wake-up source is injected into the vehicle controller and the network is maintained. The calibration name value of the stored information is changed according to a preset table. The controller is then judged to restart based on the changes in the target signal. This solves the problems of high labor costs and low accuracy in the existing technology, and achieves efficient test coverage and improved accuracy.
Patent Information
- Application Number
- CN202411030956.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing automotive controller testing methods require significant manpower and have low accuracy and coverage.
An automated cyclic testing method is adopted. By injecting a wake-up source into the controller and maintaining the network, the calibration name value of the stored information is changed according to a preset table. The controller is judged to restart based on the change of the target signal. The test rounds are divided and the stored information is read within the wake-up time interval. The test is automatically judged to pass or fail.
It effectively reduces labor costs, improves test accuracy and coverage, shortens test time, and ensures the accuracy of the controller's sleep storage process.
Smart Images

Figure CN119002448B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive testing technology, and more specifically, to a method, apparatus, storage medium, and device for testing automotive controllers. Background Technology
[0002] With the continuous advancement of automotive technology, vehicle configurations and functions are becoming increasingly sophisticated, leading to a surge in the amount of data that controllers need to store. Most of this data is stored in the controller's non-volatile memory before it goes into sleep mode. Therefore, verifying the controller's behavior when faced with a wake-up source for re-entry before and during the process of storing data in non-volatile memory is a key focus of controller testing.
[0003] Currently, the main testing method for controllers involves testers manually calibrating and changing the values of the controller's stored data or operating the corresponding functions on a real vehicle. The controller is then woken up just before it goes into sleep mode, and upon waking, the system checks whether it has restarted and whether the stored values match expectations. If the controller has not restarted, the stored values should not have changed; if it has restarted, the retrieved stored values should be the values obtained through calibration. However, this method is labor-intensive, and the manual data reading and comparison process is prone to omissions or misinterpretations, resulting in low test accuracy and coverage. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, storage medium and equipment for testing automotive controllers, aiming to solve the problems of high manpower costs and low accuracy and coverage in controller testing methods in related technologies.
[0005] In a first aspect, this application provides a method for testing an automotive controller, comprising: injecting a wake-up source into the controller of the vehicle and maintaining the network; changing the value corresponding to the calibration name of the target stored information of the controller according to the current test round number; reading the target signal; then canceling the wake-up source and starting a timer; the target signal is used to indicate whether the controller has reset or restarted; when the timer result reaches a preset wake-up time interval, injecting a wake-up source into the controller and maintaining the network; reading the value corresponding to the signal name of the target stored information and the target signal; determining whether the test has passed based on the reading result; if the determination result is yes, canceling the wake-up source; when the controller is powered down, determining that the current test round is completed; if the current test round number reaches the total number of tests, determining that the test is over; if the current test round number does not reach the total number of tests, executing the next test round; the total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
[0006] In the above implementation process, based on the total time from controller release to power-down and the preset wake-up time interval, the controller testing process is divided into multiple test rounds, thus covering the entire power-down phase and improving test coverage. During the test, the values to be stored are automatically calibrated, then the wake-up source is released to put the controller into sleep mode. Afterwards, the controller is automatically woken up at the set time. Upon wake-up, the changes in the target signal are used to determine whether the controller should restart. Combined with the values of the signal names read from the stored information, it is automatically determined whether the controller has stored the calibrated changes. This automated cyclical testing method effectively reduces labor costs and improves test accuracy.
[0007] Furthermore, in some examples, changing the value corresponding to the calibration name of the target storage information of the controller according to the current test round number includes: reading the calibration name of the target storage information of the controller from a preset table; the preset table records the signal name and calibration name corresponding to each storage information of the controller; and changing the value corresponding to the calibration name according to the current test round number.
[0008] In the above implementation process, a table is created in advance, in which the signal name and calibration name corresponding to each stored information in the controller are entered. Then, based on this table, automated cyclic testing of the controller is implemented. In this way, through table-based management, the addition or reduction of stored information can be handled quickly, thereby improving testing efficiency.
[0009] Furthermore, in some examples, the preset table also records a first value and a second value corresponding to each stored information; the first value and the second value are set based on the range of values of the signal name corresponding to the stored information; the value corresponding to the calibration name is changed according to the current number of test rounds; if the current number of test rounds is odd, the value corresponding to the calibration name is changed to the first value corresponding to the target stored information; if the current number of test rounds is even, the value corresponding to the calibration name is changed to the second value corresponding to the target stored information.
[0010] In the above implementation process, during the testing of the controller, the value of the calibration name is alternately changed according to the two different values corresponding to the storage information recorded in the preset table, which helps to quickly verify whether the controller's hibernation storage process is normal.
[0011] Furthermore, in some examples, determining whether the test passed based on the reading result includes: determining whether the controller restarted based on the change of the target signal; when the determination result indicates that the controller restarted, if the current test round number is odd and the value corresponding to the read signal name is the first value corresponding to the target stored information, or the current test round number is even and the value corresponding to the read signal name is the second value corresponding to the target stored information, the test is determined to have passed; when the determination result indicates that the controller did not restart, if the current test round number is an odd number greater than 1 and the value corresponding to the read signal name is the second value corresponding to the target stored information, or the current test round number is even and the value corresponding to the read signal name is the first value corresponding to the target stored information, the test is determined to have passed.
[0012] In the above implementation process, by automatically reading and comparing the stored values, labor costs are effectively reduced and testing time is effectively shortened.
[0013] Furthermore, in some examples, the total time from the controller releasing the network to power-down is obtained based on the following method: when the controller is in a sleep state, a wake-up source is injected into the controller; the wake-up source is removed, the moment when the controller sends the last frame message is recorded as the first time point, the moment when the voltage of the controller's external power supply pin drops to 0V is recorded as the second time point, and the time interval between the first time point and the second time point is calculated; the calculation is repeated under the same operating conditions until the number of calculations reaches the target number, and the average value of all calculation results is taken, and the average value is determined as the total time from the controller releasing the network to power-down.
[0014] In the above implementation process, a specific method is provided to obtain the total time from the controller releasing the network to power-down.
[0015] Furthermore, in some examples, the wake-up time interval is determined based on the time cycle of the underlying software task execution; the total number of tests is the ratio between the total time from when the controller releases the network to when it powers down and the wake-up time interval.
[0016] In the above implementation process, the actual measured total sleep time is divided equally based on the time cycle of the underlying software task operation, and the test process covers the entire stage of the controller power-down, effectively improving the accuracy and coverage of the test.
[0017] Furthermore, in some examples, it also includes: if the test fails based on the reading result, outputting a prompt message; the prompt message is used to indicate that the controller has a problem to be investigated.
[0018] In the above implementation process, when the test fails, a prompt message is output to prompt the tester to troubleshoot the controller in a timely manner, thereby improving the tester's user experience.
[0019] Secondly, this application provides an automotive controller testing device, comprising: a modification module, configured to inject a wake-up source into the automotive controller and maintain the network, modify the value corresponding to the calibration name of the target stored information of the controller according to the current test round number, read the target signal, then cancel the wake-up source and start timing; the target signal is used to indicate whether the controller has reset or restarted; a judgment module, configured to inject a wake-up source into the controller and maintain the network when the timing result reaches a preset wake-up time interval, read the value corresponding to the signal name of the target stored information and the target signal, and determine whether the test has passed based on the reading result; and a determination module, configured to cancel the wake-up source if the determination result is yes, determine that the current test round is completed when the controller is powered down, determine that the test ends if the current test round number reaches the total number of tests, and execute the next test round if the current test round number does not reach the total number of tests; the total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
[0020] Thirdly, this application provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method described in any of the first aspects.
[0021] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in any of the first aspects.
[0022] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in any of the first aspects.
[0023] Other features and advantages disclosed in this application will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the above-described technology disclosed in this application.
[0024] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 A flowchart illustrating a vehicle controller testing method provided in this application embodiment;
[0027] Figure 2 A schematic diagram illustrating the workflow of a test scheme for controller hibernation storage provided in an embodiment of this application;
[0028] Figure 3 A block diagram of an automotive controller testing device provided in an embodiment of this application;
[0029] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0031] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0032] As described in the background section, existing controller testing methods suffer from high manpower costs and low accuracy and coverage. Therefore, this application provides a novel automotive controller testing solution to address these issues.
[0033] The embodiments of this application will be described below:
[0034] like Figure 1 As shown, Figure 1 This is a flowchart of a vehicle controller testing method provided in an embodiment of this application. The controller here can refer to the vehicle control unit (VCU), motor control unit (MCU), battery management system (BMS), etc.
[0035] The method includes:
[0036] Step 101: Inject a wake-up source into the vehicle's controller and maintain the network. Change the value corresponding to the calibration name of the target stored information of the controller according to the current test round number, read the target signal, then remove the wake-up source and start timing; the target signal is used to indicate whether the controller has been reset or restarted.
[0037] The target storage information mentioned in this step can refer to data that the controller stores in non-volatile memory before hibernation, such as the vehicle's driving mode, previous driving energy consumption, mileage, anti-theft mode, etc. For this type of data, the controller usually temporarily stores it first, in the form of a label name and its corresponding value. Before the controller goes into hibernation, it stores it in non-volatile memory and saves it in the form of a signal name and its corresponding value. Taking the target storage information including the vehicle's driving mode as an example, assuming that the signal name of the target storage information is "drive-mode", the label name is "drive-mode-temp", and the value is 0 for economy mode and 1 for sport mode, then when the user sets the driving mode to sport mode, the controller can temporarily store this data through RAM (Random Access Memory), at which time the data includes "drive-mode-temp=1". Before hibernation, the controller will store the data temporarily stored in RAM into EEPROM (Electrically Erasable Programmable Read-Only Memory), at which time the data is saved as "drive-mode=1".
[0038] Unlike related technologies that manually test the controller's hibernation storage behavior, this embodiment uses an automated cyclic testing method to detect whether the controller can correctly store the required values before hibernation, thereby reducing labor costs and improving test accuracy and coverage. This embodiment can be applied to test equipment. After starting the test, the test equipment can wake up the controller from hibernation by injecting a wake-up source and maintain the network through automated tools, preparing for subsequent changes to the values corresponding to the calibrated names of the target stored information. The wake-up source can be a hardwired wake-up or a network wake-up. Taking network wake-up as an example, the test equipment can send a specific network management message. The controller's CAN (Controller Area Network) transceiver will execute the wake-up operation after monitoring the network management message. The automated tools can include CANoe (CAN open environment), a bus development tool that allows the test equipment to maintain the controller's connection to the external network.
[0039] After injecting a wake-up source into the controller and maintaining the network, the test equipment modifies the value corresponding to the calibration name of the target stored information and reads the target signal according to the current test round number. Then, it removes the wake-up source, causing the controller to re-enter the sleep phase. In some embodiments, modifying the value corresponding to the calibration name of the target stored information of the controller according to the current test round number mentioned in this step may include: reading the calibration name of the target stored information of the controller from a preset table; the preset table records the signal name and calibration name corresponding to each stored information of the controller; and modifying the value corresponding to the calibration name according to the current test round number. That is, a table can be pre-established, in which the signal name and calibration name corresponding to each stored information inside the controller are entered. In this way, the test equipment can read the table in advance, read the value of the calibration name of the target stored information according to the table, and modify it. Through tabular management, it can quickly respond to the addition or reduction of stored information, thereby improving test efficiency.
[0040] Furthermore, in some embodiments, the preset table also records a first value and a second value corresponding to each stored information; the first value and the second value are set based on the range of values of the signal name corresponding to the stored information; the value corresponding to the calibration name is changed according to the current test round number; if the current test round number is odd, the value corresponding to the calibration name is changed to the first value corresponding to the target stored information; if the current test round number is even, the value corresponding to the calibration name is changed to the second value corresponding to the target stored information. That is to say, the preset table can also record two different values corresponding to each stored information, and the value of the calibration name is changed alternately during the test, which is beneficial for quickly verifying whether the controller's sleep storage process is normal.
[0041] The target signal mentioned in this step can be an outgoing message signal, which has the characteristic that its value changes significantly when the controller is reset or restarted. Therefore, by observing the change in the target signal, the test equipment can determine whether the controller has restarted.
[0042] Step 102: When the timing result reaches the preset wake-up time interval, inject a wake-up source into the controller and maintain the network, read the value corresponding to the signal name of the target stored information and the target signal, and determine whether the test is passed based on the reading result;
[0043] This step refers to: dividing the entire test process of the controller into multiple test rounds according to the preset wake-up time interval; after changing the value corresponding to the calibration name, canceling the wake-up source, waiting for the preset wake-up time interval, re-waking up the controller and maintaining the network, and then reading the value corresponding to the signal name of the target stored information and the target signal. In this way, based on the change of the target signal, it can be determined whether the controller has restarted. Combined with the value corresponding to the read signal name, it can be accurately determined whether the controller's hibernation storage process is normal.
[0044] In some embodiments, when the value corresponding to the calibration name is changed to a first value or a second value based on the parity of the current test round number, the process by which the testing device determines whether the test has passed based on the reading result may include: determining whether the controller has restarted based on the change of the target signal; when the determination result indicates that the controller has restarted, if the current test round number is odd and the value corresponding to the read signal name is the first value corresponding to the target stored information, or if the current test round number is even and the value corresponding to the read signal name is the second value corresponding to the target stored information, the test is determined to have passed; when the determination result indicates that the controller has not restarted, if the current test round number is an odd number greater than 1 and the value corresponding to the read signal name is the second value corresponding to the target stored information, or if the current test round number is even and the value corresponding to the read signal name is the first value corresponding to the target stored information, the test is determined to have passed.
[0045] Continuing with the previous example, suppose the target stored information of the vehicle's driving mode has a first value of 0 and a second value of 1. If the current test round is the first test round, the value corresponding to the calibration name of this target stored information changes from the initial value M to 0. In the case of a controller restart, the value read by the test device corresponding to the signal name should be the value after the calibration change; that is, when the read value is 0, the test is considered passed. If the controller does not restart, the value read by the test device corresponding to the signal name should be the value before the calibration change; that is, when the read value is M, the test is considered passed. The test passed. If the current test round number is even, such as 2, and the value corresponding to the target stored information's label name changes from 0 to 1, then if the controller restarts, a value of 1 indicates a successful test; otherwise, a value of 0 indicates a successful test. Similarly, if the current test round number is odd, greater than 1, such as 3, a value of 0 indicates a successful test if the controller restarts, and a value of 1 indicates a successful test. This automated reading and comparison of stored values effectively reduces labor costs and shortens testing time.
[0046] Step 103: If the judgment result is yes, cancel the wake-up source. When the controller power-down is completed, determine that the current test round is completed. If the current test round count reaches the total number of tests, determine that the test ends. If the current test round count does not reach the total number of tests, execute the next test round. The total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
[0047] In this embodiment, the total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval. After determining that the current test round has passed, the wake-up source is released, and the current test round is determined to be completed when the controller completes the order. If the number of completed test rounds has not reached the total number of tests, the above steps are repeated to enter the next test round until the number of completed test rounds reaches the total number of tests, thereby covering the entire stage of the controller power-down and improving test coverage.
[0048] In some embodiments, the total time from controller releasing the network to power-down mentioned in this step is obtained based on the following method: When the controller is in a sleep state, a wake-up source is injected into the controller; the wake-up source is removed, the moment when the controller sends the last frame message is recorded as the first time point, and the moment when the voltage of the controller's external power supply pin drops to 0V is recorded as the second time point. The time interval between the first time point and the second time point is calculated. The calculation is repeated under the same conditions until the target number of calculations is reached. The average value of all calculation results is then taken as the total time from controller releasing the network to power-down. That is, when obtaining the time from controller releasing the network to sleep, the controller can be woken up while in a sleep state. After waking up, the wake-up source is removed, and the time t1 when the controller sends the last frame message is recorded, and the moment t2 when the voltage of the controller's external power supply pin drops to 0V is recorded. The time interval t0 = t2 - t1 is calculated. The same conditions are repeated a target number of times, such as 5 times, and the average value is taken. This average value t0 is the time interval from controller releasing the network to power-down. avg This refers to the total time from when the controller releases the network to when it powers off. Of course, the target number of times can be set differently depending on the needs of different scenarios, and this application does not impose any restrictions on this.
[0049] Furthermore, in some embodiments, the wake-up time interval is determined based on the runtime of the underlying software task; the total number of tests is the ratio between the total time from when the controller releases the network to when it powers down and the wake-up time interval. That is, the wake-up time interval T can be set based on the runtime of the underlying software task. step This serves as the timing for the wake-up source injection in each test round, with a total number of tests m = t. avg / T step For example, the total time t from when the controller releases the network to when it is powered down. avg The wake-up time interval is 1 second. step When the time is 20 milliseconds, the total number of tests m is 50. In this way, by dividing the actual measured total sleep time into equal parts, the test process covers the entire stage of the controller power-down, effectively improving the accuracy and coverage of the test.
[0050] Furthermore, in some embodiments, the above method may also include: if the test fails based on the reading result, outputting a prompt message; the prompt message is used to indicate that the controller has a problem to be investigated. That is, in each test round, when the test fails, the test device can output a prompt message to the tester to prompt the tester to troubleshoot the controller in a timely manner, thereby improving the tester's user experience.
[0051] In this embodiment, based on the total time from controller release to power-down and a preset wake-up time interval, the controller testing process is divided into multiple test rounds, thus covering the entire power-down phase and improving test coverage. During the test, the values to be stored are automatically calibrated, then the wake-up source is released to put the controller into sleep mode. Afterward, the controller is automatically woken up at a set time. Upon wake-up, the controller is checked for restarting based on changes in the target signal. Combined with the value of the signal name read from the stored information, the controller is automatically checked to determine if it has stored the calibrated changes. This automated cyclic testing method effectively reduces labor costs and improves test accuracy.
[0052] To provide a more detailed explanation of the solution in this application, a specific embodiment is described below:
[0053] This embodiment provides a test scheme for controller hibernation storage. The workflow of this scheme is as follows: Figure 2 As shown, it includes:
[0054] S201. Obtain the total time from when the controller releases the network to when it is powered off;
[0055] Specifically, the network maintenance and release of the controller are performed using the automated tool CANoe. When the controller is in sleep mode, a wake-up operation is performed. After wake-up, the wake-up source is removed, and the time t1 of the last frame message sent by the controller is recorded. Then, the voltage of the controller's external 5V power supply pin is continuously read through the CANoe I / O interface. When the voltage drops to 0V, this moment t2 is recorded. t0 = t2 - t1 is calculated. This process is repeated five times under the same conditions, and the average value is taken. This average value is determined as the total time t from the controller releasing the network to the controller powering down. avg ;
[0056] S202. Divide the total time equally to obtain the total number of tests;
[0057] Specifically, the execution cycle T of the underlying software task step As the wake-up interval, i.e., the timing of the wake-up source injection in each test, the total number of tests m = t avg / T step ;
[0058] S203. Design a table to enter the signal name, calibration name, and two different values corresponding to each stored information.
[0059] S204. Determine the target signal used to indicate whether the controller should restart;
[0060] Specifically, find the signal Signal1 that sends an outgoing message from all the signals of the controller. This signal has the characteristic that its value will change significantly when the controller is reset or restarted. Therefore, by observing the change of this signal, it can be determined whether the controller has restarted.
[0061] S205. Start testing. Change the value corresponding to the calibration name of the stored information according to the designed table, read the target signal, and then release the wake-up source to put the controller into sleep mode. After that, it will automatically perform a wake-up operation at the set time, and after waking up, read the value of the signal name of the stored information and the target signal.
[0062] S206. Determine whether the test passed based on the reading result. If yes, proceed to S207; otherwise, proceed to S209.
[0063] Specifically, each piece of stored information entered in the table corresponds to two different values, A and B. The automated loop test cases are run, the pre-set table is read, and the value of the calibration name corresponding to the stored information is changed via INCA (an automotive calibration measurement and diagnostic tool) through the wake-up source network. When the current test round number n is odd, the value of the calibration name is changed to A; when the current test round number n is even, the value of the calibration name is changed to B, and Signal1 is read via the bus signal. Then, after the wake-up source is removed, timing begins. When the time reaches n*T... step At that time, the wake-up source is injected and the network is maintained. The value of the signal name corresponding to the stored information is read through INCA and denoted as E. n It reads Signal1 via the bus signal, determines whether the controller needs to restart based on changes in the value of Signal1, and then executes the following judgment logic:
[0064] When n is 1, if the controller restarts, and the read value E... n =A, confirming the test passed; otherwise, troubleshooting is required. If the controller does not restart, and the read value is E... n The initial value for the signal name corresponding to the stored information at the start of the test is used to confirm that the test has passed; otherwise, the problem needs to be investigated.
[0065] When n is an odd number greater than 1, if the controller restarts, and the read value E... n=A, confirming the test passed; otherwise, troubleshooting is required. If the controller does not restart, and the read value is E... n =B, confirming the test passed; otherwise, the problem needs to be investigated.
[0066] When n is even, if the controller restarts, and the read value E... n =B, confirming the test passed; otherwise, troubleshooting is required. If the controller does not restart, and the read value is E... n =A, confirming the test passed; otherwise, the problem needs to be investigated.
[0067] S207. Release the wake-up source and wait for the controller to power down before confirming the completion of the current test round.
[0068] S208. Determine whether the number of completed test rounds has reached the total number of tests. If yes, execute S210; otherwise, return to S205.
[0069] S209, The output indicator controller has a problem that needs to be investigated;
[0070] S210, Confirm test complete.
[0071] This embodiment allows for testing the controller's hibernation storage independently of a real vehicle, and offers at least the following advantages: First, based on a hardware-in-the-loop approach, it divides the measured total hibernation time into equal parts, covering the entire power-down phase of the controller, thus improving test accuracy and coverage. Second, tabular management allows for rapid adjustments when increasing or decreasing storage capacity. Third, it enables testing even without access to internal information such as when the controller performs storage actions, the power-down method, the timing of the power-down action, or task counters, demonstrating strong versatility. Fourth, after injecting a wake-up source during the controller's power-down process, other observations can be added simultaneously to assess whether other functional modules function correctly after the controller is woken up, providing strong scalability. Fifth, targeted testing can be flexibly performed by adjusting the test step size and the start and end times of injecting the wake-up source after its release.
[0072] Corresponding to the embodiments of the aforementioned methods, this application also provides embodiments of an automotive controller testing device and a terminal for its application:
[0073] like Figure 3 As shown, Figure 3 This is a block diagram of an automotive controller testing device provided in an embodiment of this application. The device includes:
[0074] The modification module 31 is used to inject a wake-up source into the vehicle's controller and maintain the network, change the value corresponding to the calibration name of the target stored information of the controller according to the current test round number, read the target signal, then cancel the wake-up source and start timing; the target signal is used to indicate whether the controller has been reset or restarted.
[0075] The judgment module 32 is used to inject a wake-up source into the controller and maintain the network when the timing result reaches the preset wake-up time interval, read the value corresponding to the signal name of the target stored information and the target signal, and determine whether the test is passed based on the reading result;
[0076] The determination module 33 is used to cancel the wake-up source if the determination result is yes, and to determine that the current test round is completed when the controller is powered down. If the current number of test rounds reaches the total number of tests, the test is determined to end. If the current number of test rounds does not reach the total number of tests, the next test round is executed. The total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
[0077] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0078] This application also provides an electronic device, please refer to [link to application]. Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. The electronic device may include a processor 410, a communication interface 420, a memory 430, and at least one communication bus 440. The communication bus 440 is used to enable direct communication between these components. In this embodiment, the communication interface 420 of the electronic device is used for signaling or data communication with other node devices. The processor 410 may be an integrated circuit chip with signal processing capabilities.
[0079] The processor 410 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor, or the processor 410 can be any conventional processor.
[0080] The memory 430 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. The memory 430 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 410, the electronic device can perform the aforementioned operations. Figure 1 The various steps involved in the method implementation examples.
[0081] Alternatively, the electronic device may also include a storage controller and an input / output unit.
[0082] The memory 430, storage controller, processor 410, peripheral interface, and input / output unit are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses 440. The processor 410 is used to execute executable modules stored in the memory 430, such as software function modules or computer programs included in electronic devices.
[0083] The input / output unit is used to provide users with the ability to create tasks and to set optional start periods or preset execution times for those tasks, thereby enabling user-server interaction. The input / output unit may be, but is not limited to, a mouse and keyboard.
[0084] Understandable. Figure 4 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof.
[0085] This application also provides a storage medium storing instructions. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, the method will not be described again here.
[0086] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0088] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0089] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0092] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for testing an automotive controller, characterized in that, include: A wake-up source is injected into the vehicle's controller and the network is maintained. The value corresponding to the calibration name of the target storage information temporarily stored in the controller is changed according to the current test round number. The target signal is read, the wake-up source is then removed, and the timer is started. The target signal is used to indicate whether the controller has been reset or restarted. When the timing result reaches the preset wake-up time interval, a wake-up source is injected into the controller and the network is maintained. The value corresponding to the signal name of the target stored information in the non-volatile memory and the target signal are read. The test is judged based on the reading result. Each stored information corresponds to a signal name and a calibration name. In the event that the controller restarts, the value corresponding to the signal name of the target stored information read is the value changed through calibration. If the judgment result is yes, the wake-up source is cancelled. When the controller is powered down, the current test round is determined to be completed. If the current number of test rounds reaches the total number of tests, the test is determined to end. If the current number of test rounds does not reach the total number of tests, the next test round is executed. The total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
2. The method according to claim 1, characterized in that, The step of changing the value corresponding to the calibration name of the target storage information of the controller according to the current test round number includes: The calibration name of the target storage information of the controller is read from a preset table; the preset table records the signal name and calibration name corresponding to each storage information of the controller; The value corresponding to the calibration name is changed based on the current number of test rounds.
3. The method according to claim 2, characterized in that, The preset table also records a first value and a second value corresponding to each stored information; the first value and the second value are set based on the range of values of the signal name corresponding to the stored information. The step of changing the value corresponding to the calibration name based on the current test round number includes: If the current test round number is odd, change the value corresponding to the calibration name to the first value corresponding to the target storage information; If the current test round number is even, change the value corresponding to the calibration name to the second value corresponding to the target storage information.
4. The method according to claim 3, characterized in that, The step of determining whether the test passed based on the reading results includes: The controller is determined to restart based on the changes in the target signal. When the judgment result indicates that the controller needs to be restarted, if the current test round number is odd and the value corresponding to the read signal name is the first value corresponding to the target stored information, or if the current test round number is even and the value corresponding to the read signal name is the second value corresponding to the target stored information, the test is determined to be passed. When the judgment result indicates that the controller has not restarted, if the current test round number is an odd number greater than 1 and the value corresponding to the read signal name is the second value corresponding to the target stored information, or if the current test round number is an even number and the value corresponding to the read signal name is the first value corresponding to the target stored information, the test is determined to be passed.
5. The method according to claim 1, characterized in that, The total time from controller release to power-down is obtained based on the following method: When the controller is in a sleep state, a wake-up source is injected into the controller; Remove the wake-up source, record the moment when the controller sends the last frame message as the first time point, record the moment when the voltage of the controller's external power supply pin drops to 0V as the second time point, and calculate the time interval between the first time point and the second time point; The calculation is repeated under the same operating conditions until the target number of calculations is reached. Then, the average value of all calculation results is taken, and the average value is determined as the total time from when the controller releases the network to when it is powered off.
6. The method according to claim 5, characterized in that, The wake-up time interval is determined based on the time cycle of the underlying software task; the total number of tests is the ratio between the total time from when the controller releases the network to when it powers down and the wake-up time interval.
7. The method according to claim 1, characterized in that, Also includes: If the test fails based on the reading results, output a prompt message; The prompt message is used to indicate that there is a problem with the controller that needs to be investigated.
8. A testing device for an automotive controller, characterized in that, include: The modification module is used to inject a wake-up source into the vehicle's controller and maintain the network. It changes the value corresponding to the calibration name of the target storage information temporarily stored in the controller according to the current test round number, reads the target signal, then cancels the wake-up source and starts timing. The target signal is used to indicate whether the controller has been reset or restarted. The judgment module is used to inject a wake-up source into the controller and maintain the network when the timing result reaches the preset wake-up time interval, read the value corresponding to the signal name of the target stored information in the non-volatile memory and the target signal, and determine whether the test is passed based on the reading result; each stored information corresponds to a signal name and a calibration name; In the event that the controller restarts, the value corresponding to the signal name of the target stored information read is the value changed through calibration. The determination module is used to cancel the wake-up source if the determination result is yes, and to determine that the current test round is completed when the controller is powered down. If the current number of test rounds reaches the total number of tests, the test is determined to end. If the current number of test rounds does not reach the total number of tests, the next test round is executed. The total number of tests is determined based on the total time from the controller releasing the network to power-down and the wake-up time interval.
9. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed by a processor, implements the method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
FCT test method and system of controller
CN113655775A
Memory data testing method and device, storage medium and electronic equipment
CN116662092A