Gateway controller function test method
By introducing gateway controller functional testing methods with accompanying test pieces and Lin tools, the problems of incomplete functional testing and inefficient testing in the prior art were solved, the comprehensiveness and accuracy of functional testing were achieved, and data storage was carried out.
Patent Information
- Application Number
- CN202411792526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-07
- Publication Date
- 2025-03-07
AI Technical Summary
The existing gateway controller functional testing methods cannot guarantee the integrity of functional testing and are inefficient in testing.
A gateway controller functional testing method is adopted, and the accompanying test piece and Lin tool are introduced to test the functions of the test piece through a series of steps, including recording the test piece information, measuring impedance, testing the sleep function, CAN communication, Lin communication, Ethernet communication and switching quantity testing, and data storage is carried out.
This method ensures the integrity of gateway controller functional testing, increases the coverage of functional testing, improves the accuracy of testing, and realizes data storage.
Smart Images

Figure CN119583402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication testing, and in particular to a gateway controller function testing method. Background Art
[0002] The function of the gateway is to transmit messages and information between different CAN network groups in the vehicle, including CAN message forwarding, CAN signal analysis and forwarding, LIN signal forwarding, network management, analog signal acquisition, digital switch acquisition, and Ethernet communication.
[0003] The existing function testing method of the gateway controller requires each test function to be tested separately, which cannot ensure the integrity of the function test and has low test efficiency. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a gateway controller function testing method.
[0005] The present invention provides a gateway controller function testing method, which introduces a companion test piece and a Lin tool to test the function of the device under test; wherein the method comprises the following steps:
[0006] 1) Record the information of the device under test;
[0007] 2) Measure the impedance between the main GND and each pin;
[0008] 3) Test the sleep function of the device under test;
[0009] 4) The CAN network is formed by the companion CAN and the CAN of the tested device to send and receive messages, and the CAN communication function is tested and verified;
[0010] 5) Introduce Lin tool to test the Lin communication function of the device under test;
[0011] 6) The companion test piece and the tested piece are interconnected through Ethernet to form an Ethernet test environment and perform multi-channel Ethernet communication testing;
[0012] 7) Carry out switch quantity test;
[0013] 8) After the test is completed, the data is stored.
[0014] Furthermore, the specific method for recording the information of the device under test in the step 1) is to power on the device under test, scan the QR code on the PCBA with a barcode scanner, write the scanned information into the memory of the device under test through the CAN bus, power off the device under test, and enter the step 2) after completion. If there is no response within the time limit, the data is stored and the test is terminated.
[0015] Furthermore, after step 2) is completed, step 3) is entered, and if there is no response after a timeout, data is stored and the test is terminated.
[0016] Furthermore, the specific method of step 3) is to power on the device under test, send a sleep command through CAN, put the device under test into sleep, measure the sleep current, and send a wake-up command through CAN to wake up the device under test; through the CAN message, measure whether the voltage value at the specified position of the device under test meets the requirements, and after completion, proceed to step 4), if there is no response within the timeout period, store the data and end the test.
[0017] Furthermore, the specific method of step 4) is to introduce a companion test piece, use the companion test piece CAN and the tested piece CAN to form a CAN network to send and receive messages, complete the multi-channel CAN communication test, and enter step 5). If there is no response within the timeout period, data is stored and the test is terminated.
[0018] Furthermore, the specific method of step 5) is to introduce the Lin tool, and when testing the Lin communication of the device under test, set the Lin tool to actively send messages, and then the host computer sends a control command to the CAN bus. If there is no problem with the Lin communication of the device under test, the device under test will feedback the corresponding message to the CAN bus. After completion, enter step 6). If there is no response within the timeout period, the data is stored and the test is ended.
[0019] Furthermore, the specific method of step 6) is to introduce a companion test component, interconnect it with the device under test through Ethernet, and form an Ethernet test environment. The host computer sends instructions to the CAN bus. If the Ethernet communication of the device under test is normal, the device under test feeds back the corresponding message to the CAN bus. After completing the multi-channel Ethernet communication test, enter step 7). If there is no response after the timeout, the data is stored and the test is terminated.
[0020] Further, it is characterized in that the step 7) performs a switch quantity test on the device under test, stores data after completion, and ends the current test; if there is no response after timeout, stores data and ends the current test.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] The gateway controller function test method of the present invention introduces a companion test piece and a Lin tool, thereby ensuring the integrity of the function test of the device under test, i.e., the gateway controller, and increasing the coverage of the function test. By judging whether the bus message has an abnormality, the quality of the device under test is judged, thereby ensuring the accuracy of the test and realizing data storage.
[0023] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0025] Figure 1 The present invention provides a flow chart of a gateway controller function testing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] Please refer to Figure 1 The embodiment of the present invention provides a gateway controller function testing method, which introduces a companion test piece and a Lin tool to test multiple functions of a device under test (ie, a gateway controller); wherein the method comprises the following steps:
[0029] 1) Record the information of the device under test;
[0030] 2) Measure the impedance between the main GND and each pin;
[0031] 3) Test the sleep function of the device under test;
[0032] 4) The CAN network is formed by the companion CAN and the CAN of the tested device to send and receive messages, and the CAN communication function is tested and verified;
[0033] 5) Introduce Lin tool to test the Lin communication function of the device under test;
[0034] 6) The companion test piece and the tested piece are interconnected through Ethernet to form an Ethernet test environment and perform multi-channel Ethernet communication testing;
[0035] 7) Carry out switch quantity test;
[0036] 8) After the test is completed, the data is stored.
[0037] In a preferred embodiment, the specific method for recording the information of the device under test in step 1) is to power on the device under test, scan the QR code on the PCBA with a barcode scanner, write the scanned information into the memory of the device under test through the CAN bus, and store the data if there is no response after a timeout, end the current test, and power off the device under test; after completion, proceed to step 2) to continue the test.
[0038] The QR code on the PCBA can contain a variety of information, including product information, instruction manual and serial number, etc.
[0039] Product information: The QR code can display more product information, including but not limited to product name, model, production date, manufacturer information, etc.; this information can be customized through the background editing function for customer viewing.
[0040] Instructions for use: The QR code can be linked to the product's instruction manual. Customers can obtain detailed tutorials, operation videos, etc. by scanning the code, which greatly facilitates customers and their end users.
[0041] Serial number: By scanning the QR code, you can obtain a unique serial number for product traceability and inventory management; this serial number can also be used for subsequent functions such as after-sales management.
[0042] In a preferred embodiment, after step 2) is completed, the process goes to step 3), and if there is no response after a timeout, the data is stored and the test ends.
[0043] Step 2) is to measure the impedance between the main GND and each pin. The main functions include the following aspects:
[0044] Ensure signal integrity: Impedance matching is one of the key factors to ensure signal integrity. In high-speed signal transmission, if the impedance of the signal source does not match the impedance of the transmission line, it will cause reflections, affecting the transmission efficiency and quality of the signal. By measuring the impedance, it is possible to ensure the impedance matching between the signal source and the transmission line, reduce reflections and oscillations, and thus improve the transmission efficiency and stability of the signal.
[0045] Reduce electromagnetic interference (EMI): Impedance mismatch will cause reflection and standing waves in the signal transmission process, which will not only affect the quality of the signal, but also generate electromagnetic interference. By measuring and adjusting the impedance, high-frequency noise and overshoot can be reduced, thereby reducing electromagnetic interference and ensuring the normal operation of the equipment.
[0046] Optimize circuit design: In circuit design, impedance measurement can help engineers understand the actual working status of the circuit, find problems in the design and optimize them. For example, by measuring the impedance between the main GND and each pin, potential grounding problems such as ground loops and poor grounding can be found, so that corresponding measures can be taken to improve them.
[0047] Improve equipment reliability: By measuring the impedance between the main GND and each pin, you can ensure that the grounding system of the equipment is designed reasonably and reduce interference and failures during equipment operation. Reasonable grounding design can provide a stable reference level to ensure the stability and reliability of the equipment.
[0048] Meet the requirements of electromagnetic compatibility (EMC): In electronic equipment, electromagnetic compatibility is an important indicator. By measuring the impedance between the main GND and each pin, the compatibility of the device in the electromagnetic environment can be ensured, the mutual interference between devices can be reduced, and the normal operation of the device can be ensured.
[0049] In short, measuring the impedance between the main GND and each pin is of great significance for ensuring signal integrity, reducing electromagnetic interference, optimizing circuit design, improving equipment reliability and meeting electromagnetic compatibility requirements.
[0050] In a preferred embodiment, the specific method of step 3) is to power on the device under test, send a sleep command via CAN, and the device under test will sleep. If there is no response after a timeout, data will be stored and the test will be terminated.
[0051] If the response is completed, the sleep current is measured. If there is no response after the timeout, the data is stored and the test is terminated.
[0052] If the response is completed, a wake-up command is sent through CAN to wake up the device under test. If there is no response within a timeout period, data is stored and the test ends.
[0053] If the response is completed, the CAN message is used to measure whether the voltage value at the specified position of the DUT meets the requirements. If the response is completed, the process goes to step 4). If there is no response within the timeout period, the data is stored and the test is terminated.
[0054] In a preferred embodiment, the specific method of step 4) is to introduce a companion test piece, use the companion test piece CAN and the CAN of the tested piece to form a CAN network to send and receive messages, complete the multi-channel CAN communication test, and enter step 5). If there is no response within the timeout period, data is stored and the test is terminated.
[0055] In a preferred embodiment, the specific method of step 5) is to introduce the Lin tool, and when testing the Lin communication of the device under test, set the Lin tool to actively send messages, and then the host computer sends a control command to the CAN bus. If there is no problem with the Lin communication of the device under test, the device under test will feedback the corresponding message to the CAN bus, and after completion, enter step 6). If there is no response within the timeout period, the data is stored and the test is ended.
[0056] Among them, the Lin tool can use the data transceiver tool of the LIN module, including a tool box and a computer with serial port transceiver software installed. The tool box is equipped with a processor for signal conversion, the processor is equipped with a USB serial port line for connecting to the computer USB interface, and the processor is equipped with a LIN line for connecting to the LIN bus.
[0057] In a preferred embodiment, the specific method of step 6) is to introduce a companion test component, interconnect it with the device under test through Ethernet, and form an Ethernet test environment. The host computer sends instructions to the CAN bus. If the Ethernet communication of the device under test is normal, the device under test feeds back the corresponding message to the CAN bus. After completing the multi-channel Ethernet communication test, enter step 7). If there is no response within the timeout period, the data is stored and the current test is terminated.
[0058] In a preferred embodiment, the step 7) performs a switch quantity test on the device under test, stores data after completion, and ends the current test; if there is no response after a timeout, stores data and ends the current test.
[0059] The functional testing method of the gateway controller of the present application realizes real-time storage of data when problems are encountered during testing so that the test problems can be viewed later, and introduces accompanying test parts and Lin tools to ensure the integrity of the functional testing of the gateway controller and increase the coverage of the functional testing of the gateway controller.
[0060] In the description of this specification, the terms "connection", "installation", "fixation" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0061] In the description of this specification, the description of the terms "one embodiment", "some embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0062] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A gateway controller function testing method, characterized in that: Introduce the companion test piece and Lin tool to test the function of the device under test; the process includes the following steps: 1) Record the information of the device under test; 2) Measure the impedance between the main GND and each pin; 3) Test the sleep function of the device under test; 4) The CAN network is formed by the companion CAN and the CAN of the tested device to send and receive messages, and the CAN communication function is tested and verified; 5) Introduce Lin tool to test the Lin communication function of the device under test; 6) The companion test piece and the tested piece are interconnected through Ethernet to form an Ethernet test environment and perform multi-channel Ethernet communication testing; 7) Carry out switch quantity test; 8) After the test is completed, the data is stored.
2. The gateway controller function testing method according to claim 1, characterized in that: The specific method for recording the information of the device under test in step 1) is to power on the device under test, scan the two-dimensional code on the PCBA with a barcode scanner, write the scanned information into the memory of the device under test through the CAN bus, and power off the device under test. After completion, the process goes to step 2), and if there is no response within a timeout period, the data is stored and the test is terminated.
3. The gateway controller function testing method according to claim 1, characterized in that: After step 2) is completed, the process goes to step 3), and if there is no response after a timeout, the data is stored and the test ends.
4. The gateway controller function testing method according to claim 1, characterized in that: The specific method of step 3) is to power on the device under test, send a sleep command through CAN, put the device under test into sleep, measure the sleep current, and send a wake-up command through CAN to wake up the device under test; through the CAN message, measure whether the voltage value at the specified position of the device under test meets the requirements, and after completion, proceed to step 4), if there is no response within the timeout period, store the data and end the test.
5. The gateway controller function testing method according to claim 1, characterized in that: The specific method of step 4) is to introduce a companion test piece, use the companion test piece CAN and the CAN of the tested piece to form a CAN network to send and receive messages, complete the multi-channel CAN communication test, and enter step 5), if there is no response after the timeout, store the data and end the test.
6. The gateway controller function testing method according to claim 1, characterized in that: The specific method of step 5) is to introduce the Lin tool, and when testing the Lin communication of the device under test, set the Lin tool to actively send messages, and then the host computer sends a control command to the CAN bus. If there is no problem with the Lin communication of the device under test, the device under test will feedback the corresponding message to the CAN bus, and then enter step 6) after completion. If there is no response within the timeout period, the data is stored and the test is terminated.
7. The gateway controller function testing method according to claim 1, characterized in that: The specific method of step 6) is to introduce a companion test component, interconnect it with the device under test through Ethernet, and form an Ethernet test environment. The host computer sends a command to the CAN bus. If the Ethernet communication of the device under test is normal, the device under test feeds back a corresponding message to the CAN bus. After completing the multi-channel Ethernet communication test, enter step 7). If there is no response within the timeout period, the data is stored and the test is terminated.
8. The gateway controller function testing method according to claim 1, characterized in that: In the step 7), the switch quantity test is performed on the device under test, and after completion, the data is stored and the current test is ended; if there is no response after the timeout, the data is stored and the current test is ended.