CMS electronic rearview mirror fault diagnosis system and method based on automatic test

By integrating multimodal signals into an automated testing system to detect CMS electronic rearview mirror faults, the problems of lag and time consumption in traditional diagnostic methods have been solved, enabling rapid and accurate fault location and efficient testing.

CN120993884APending Publication Date: 2025-11-21CHANGZHOU XINGYU AUTOMOTIVE LIGHTING SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511102084.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In the existing technology, fault diagnosis of CMS electronic rearview mirrors relies on simple hardware status detection or manual visual inspection, which has the problems of diagnostic lag and time-consuming fault injection methods.

Method used

The CMS electronic rearview mirror fault diagnosis system, based on automated testing, is adopted. It uses multimodal signal fusion to detect camera image input links, CAN bus signals, screen image output links, power supply voltage and temperature sensors, etc. The system fault identifier is designed to have unique characteristics, so as to realize real-time fault detection and accurate location.

Benefits of technology

It enables rapid fault location, significantly improves testing efficiency and system reliability, meets ISO 26262 ASIL-B functional safety requirements, and reduces manual verification time and false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120993884A_ABST
    Figure CN120993884A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of advanced driving assistance systems, and relates to a CMS electronic rearview mirror fault diagnosis system and method based on automatic testing, and the system comprises a CMS electronic rearview mirror module which is used for the information display, detection processing and early warning control of a vehicle side rear environment; the left monitor, the left camera, the right camera and the right monitor are electrically connected to the CMS electronic rearview mirror module and used for external environment information display and screen end fault triggering of the CMS electronic rearview mirror; the PEPS module is electrically connected to the CMS electronic rearview mirror module and used for acquiring a vehicle starting signal; the VCU module is electrically connected to the CMS electronic rearview mirror module and is used for acquiring a gear signal; the BCM module is electrically connected to the CMS electronic rearview mirror module and used for obtaining a vehicle unlocking signal and a vehicle door state signal; the method has the effects that the problem scene can be repeatedly verified and tested in the testing process, and the development verification labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of advanced driving assistance systems, and in particular to a CMS electronic rearview mirror fault diagnosis system and method based on automated testing. BACKGROUND

[0002] At present, with the continuous development of vehicle intelligence, more and more driving assistance functions are applied to real vehicles. With the formal promulgation of the domestic automobile electronic rearview mirror regulations, more and more vehicles begin to install CMS electronic rearview mirrors to replace traditional physical rearview mirrors.

[0003] Electronic rearview mirror (CMS) is an indirect vision device that acquires a specified field of view through a camera and an electronic screen system. It contains high-definition cameras, digital vision processing systems, safety systems, electronic screens and other electronic devices, and is a new type of rearview mirror that can replace traditional optical rearview mirrors.

[0004] The prior art has the following defects: the fault diagnosis of the traditional electronic rearview mirror relies on simple hardware state detection or manual visual inspection, and there is a diagnosis lag that cannot obtain soft faults in real time. At the same time, the fault injection method is constructed manually, which will consume a lot of time in testing and verification. SUMMARY

[0005] The purpose of the present application is to provide a CMS electronic rearview mirror fault diagnosis system and method based on automated testing to solve the technical problem that the fault injection method is constructed manually, which will consume a lot of time in testing and verification. Therefore, the present application is based on automated testing to realize a CMS electronic rearview mirror multi-modal signal fusion fault diagnosis system. The system can detect real-time faults such as camera image input link, CAN bus signal, screen image output link, power voltage, temperature sensor, system internal image processing module, etc. The system fault identifier has a unique feature, and the fault status of different signal sources is displayed in real time, so as to accurately locate the fault module. By automatically constructing fault scenarios and automatically checking fault states, the automated testing platform can reduce manual verification time by more than 70%, and improve testing efficiency. Through long-term stable testing, accurate fault recognition is realized, the false alarm rate is reduced to <0.5%, the reliability and diagnosis efficiency of the CMS system are significantly improved, and the ISO 26262 ASIL-B level functional safety requirements are met. The present application reduces labor input and shortens testing time while ensuring product stability and realizing rapid fault positioning.

[0006] In order to achieve the above purpose, the present application adopts the following technical solutions:

[0007] A CMS electronic rearview mirror fault diagnosis system based on automated testing, comprising:

[0008] The CMS electronic rearview mirror module is used for vehicle side rear environment information display, detection processing and early warning control function;

[0009] The left monitor, the left camera, the right camera and the right monitor are electrically connected to the CMS electronic rearview mirror module, and are used for external environment information display of the CMS electronic rearview mirror and screen end fault triggering;

[0010] The PEPS module is electrically connected to the CMS electronic rearview mirror module, and is used for obtaining a vehicle starting signal;

[0011] The VCU module is electrically connected to the CMS electronic rearview mirror module, and is used for obtaining a gear signal;

[0012] The BCM module is electrically connected to the CMS electronic rearview mirror module, and is used for obtaining a vehicle unlocking signal and a vehicle door state signal;

[0013] The ESC module is electrically connected to the CMS electronic rearview mirror module, and is used for obtaining a vehicle speed signal;

[0014] The server & display module is used for Python script simulation fault injection, fault query and fault consistency verification, and a fault state is displayed on the upper computer;

[0015] The CMS electronic rearview mirror module comprises an SOC fault reporting submodule and an MCU fault reporting submodule.

[0016] The CMS electronic rearview mirror module is connected with a fault automatic test module.

[0017] Another object of the present application is to provide a CMS electronic rearview mirror fault diagnosis system based on automatic test, and a flow of the SOC fault reporting submodule is as follows:

[0018] Start: S1.1.1 MCU judges whether the system is normal, if normal, a camera end and screen end fault query identifier is sent, if not normal, it is returned to judge whether the MCU judges the system to be normal;

[0019] S1.1.2 SOC judges the camera end and screen end fault query identifier to be opened, and the register state of the corresponding adder and subtracter of the camera and the screen is queried to obtain a register state value;

[0020] S1.1.3 SOC reports different fault codes to MCU according to the register state value through SPI protocol;

[0021] S1.1.4 MCU judges whether the fault code is satisfied, if satisfied, MCU sends CAN signal fault code identifier to be 1, if not satisfied, MCU sends CAN signal fault code identifier to be 0;

[0022] S1.1.5 MCU sends the fault reporting CAN message to the host computer, and the host computer fault lamp displays red color, then a fault is generated, and the host computer fault lamp displays gray color, then it is normal.

[0023] As a preferred scheme of the present application, in S1.1.2, the register state of the serializer / deserializer includes camera-Sensor / serializer / power supply, board end deserializer, board end serializer and screen-power supply / deserializer.

[0024] As a preferred scheme of the present application, the SOC middleware fault reporting process is started at the same time when the SOC fault reporting module process is started.

[0025] S1.2.1 The SOC judges the fault query switch, and if the switch is opened, the CPU, temperature, memory usage, image input / output processing module, frame rate and time delay state are queried, and if the switch is closed, the process returns to the starting stage.

[0026] S1.2.2 The SOC judges whether to report a fault according to the threshold value of the middleware, and reports different fault codes to the MCU through the SPI protocol.

[0027] S1.2.3 The MCU judges whether the fault code meets the condition, and if yes, the MCU sends a CAN signal fault code mark set to 1, and if not, the MCU sends a CAN signal fault code mark set to 0.

[0028] S1.2.4 The MCU sends the fault reporting CAN message to the host computer.

[0029] As a preferred scheme of the present application, the MUC fault reporting module includes the following steps:

[0030] S1.3.1 The MCU periodically detects the power supply voltage, CAN communication with the vehicle body and HSD enable signal, and judges whether the trigger fault condition is met.

[0031] S1.3.2 If the MCU judges that the condition is met, the MCU sends a CAN signal fault code mark set to 1, and if not, the MCU sends a CAN signal fault code mark set to 0.

[0032] S1.3.3 The MCU sends the fault reporting CAN message to the host computer.

[0033] As a preferred scheme of the present application, the fault automatic test module includes the following steps:

[0034] S2.1 The CAN tool is used to develop a fault monitoring host computer, and the panel contains the following contents:

[0035] ① The check box for triggering the camera end and screen end fault query

[0036] ②CAN bus message data input text box

[0037] ③Power supply voltage sampling value input text box

[0038] ④Different module fault state indicator light

[0039] S2.2 Develop a small program using CAN tools, map the fault code to the indicator light in S1.1 through system variables, when receiving the fault reporting CAN message sent by the CMS electronic rearview mirror module, judge whether the system variable is set according to different CAN message ID and DATA;

[0040] If the system variable is set to 1, the indicator light displays red; otherwise, the indicator light displays gray;

[0041] S2.3 Develop a small program using CAN tools, associate checkboxes, text boxes with fields in CAN messages to simulate triggering camera end, screen end fault query or power supply voltage value, and send CAN messages to the CMS electronic rearview mirror module.

[0042] As a preferred scheme of the application, the fault automatic test module also includes the following steps:

[0043] S3.1 Execute the script python cmsfaulttest.py middilewaretest, use Python to complete the middleware fault diagnosis and verification automatic test;

[0044] S3.1.1 Python realizes Telnet login board, modifies middleware fault detection switch and threshold;

[0045] S3.1.2 Execute the restart application software command and wait for 5s;

[0046] S3.1.3 Login board, get CMS real-time fault state, and get the actual CPU usage rate of the board through the command;

[0047] S3.1.4 Intercept the fault monitoring host computer, and compare the picture with the expected picture of the current test scene to verify whether the CPU usage rate indicator light is red;

[0048] S3.1.5 The Python script judges whether it is consistent with the expectation, if yes, the test passes, otherwise it does not pass;

[0049] S3.1.6 Memory usage, temperature, clock, and register fault monitoring are all completed by referring to the process in S3.1 to complete automatic verification.

[0050] As a preferred scheme of the application, it also includes:

[0051] S4.1 Execute the script python cmsfaulttest.py cameratest to complete camera end fault diagnosis and verification automation test using Python. The SOC version defaults to camera end and screen end fault trigger conditions. As long as the fault query switch is turned on, the corresponding fault can be queried;

[0052] S4.1.1 Python implements the operation of clicking the camera end fault query checkbox to turn on the fault query switch;

[0053] S4.1.2 Wait for 2s, log in to the board, execute the command to obtain the real-time fault state of CMS, and search for fault codes through logs;

[0054] S4.1.3 Capture the fault monitoring host computer, and compare the picture with the expected picture of the current test scene to verify whether the camera end fault indicator light is red;

[0055] S4.1.4 The Python script judges whether it is consistent with the expected value. If yes, the test is passed, otherwise it is not passed. For the test scene that is not passed, the real-time fault state and the indicator light of the fault monitoring host computer are captured and saved to the Error folder for error analysis;

[0056] S4.2 Execute the script python cmsfaulttest.py lcdtest to complete screen end fault monitoring automation verification according to the processes in S4.1.1-S4.1.4;

[0057] S4.3 Execute the script python cmsfaulttest.py cantest / powertest to implement CAN communication and power rail fault injection test. Python simulates the operation of the host computer to input CAN messages, power rails, and HSD abnormal values;

[0058] According to the message format period in the DBC file (CAN communication matrix), send the vehicle speed, gear, steering indication, and door status CAN signals to the CMS controller to achieve the purpose of simulating the communication with the whole vehicle during the real vehicle test process;

[0059] According to the fault generation threshold of different power rails, set the value of the host computer text input box to simulate the sampling value of the CMS controller for different power rails;

[0060] According to the fault generation condition of HSD, set the value of the host computer text input box to simulate the state of the CMS controller HSD;

[0061] Other operations are completed according to the processes in S4.1.1-S4.1.4 to complete automation verification.

[0062] As a preferred scheme of the present application, it further comprises:

[0063] S5.1 executes the script python cmsfaulttest.py / testdir-w to perform fault diagnosis long stability test;

[0064] The Python scripts of S4.1-S4.3 above are traversed in the testdir, and tests are performed according to the camera end, screen end, middleware, power management, CAN communication protocol, and HSD test scene. After all the scenes are executed, the next cycle test is performed, until the ctrl+c shortcut is used to exit, thereby long stability test is performed in this way.

[0065] The present application has the following beneficial effects:

[0066] 1. According to the present application, the problem scene can be repeatedly verified and tested in the test process, thereby reducing the development verification manpower cost.

[0067] 2. According to the present application, the automatic test is realized, thereby shortening the test time and reducing the manpower cost.

[0068] 3. According to the present application, the long stability test is simulated, thereby guaranteeing the product stability. BRIEF DESCRIPTION OF DRAWINGS

[0069] Figure 1 is a system architecture diagram of the CMS electronic rearview mirror fault diagnosis system and method based on automatic test of the present application;

[0070] Figure 2 is a SOC fault reporting data flow diagram of the CMS electronic rearview mirror fault diagnosis system and method based on automatic test of the present application;

[0071] Figure 3 is an MCU fault reporting data flow diagram of the present application;

[0072] Figure 4 is a fault automatic test flow diagram of the present application;

[0073] Figure 5 is another fault automatic test flow diagram of the present application. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.

[0075] Example:

[0076] like Figures 1 to 5 As shown, a CMS electronic rearview mirror fault diagnosis system based on automated testing includes: a CMS electronic rearview mirror module for displaying, detecting, processing, and controlling information about the vehicle's side and rear environment; a left monitor, a left camera, a right camera, and a right monitor, electrically connected to the CMS electronic rearview mirror module for displaying external environmental information and triggering screen-end faults; a PEPS module, electrically connected to the CMS electronic rearview mirror module for acquiring vehicle start signals; a VCU module, electrically connected to the CMS electronic rearview mirror module for acquiring gear position signals; a BCM module, electrically connected to the CMS electronic rearview mirror module for acquiring vehicle unlock signals and door status signals; an ESC module, electrically connected to the CMS electronic rearview mirror module for acquiring vehicle speed signals; and a server & display module for using Python scripts to simulate fault injection, fault query, and fault consistency verification, with the host computer displaying the fault status.

[0077] The CMS electronic rearview mirror module includes a SOC fault reporting submodule and a MUC fault reporting submodule; the CMS electronic rearview mirror module is connected to an automated fault testing module.

[0078] like Figures 2 to 5 As shown, a method for a CMS electronic rearview mirror fault diagnosis system based on automated testing, the flow of its SOC fault reporting submodule is as follows:

[0079] Start: S1.1.1 The MCU determines whether the system is normal. If it is normal, it sends fault query flags to the camera and screen. If it is not normal, it returns to determine whether the system is normal.

[0080] When the fault query flags for the camera and screen are turned on, the S1.1.2SOC queries the status of the registers of the corresponding serializers / deserializers for the camera and screen to obtain the register status values.

[0081] S1.1.3 The SOC reports different fault codes to the MCU via the SPI protocol based on the register status value;

[0082] S1.1.4 The MCU determines whether the fault code is satisfied. If it is satisfied, the MCU sends a CAN signal to set the fault code indicator to 1. If it is not satisfied, the MCU sends a CAN signal to set the fault code indicator to 0.

[0083] The S1.1.5 MCU sends a fault reporting CAN message to the host computer. If the fault light on the host computer is red, a fault has occurred; if the fault light on the host computer is gray, it is normal.

[0084] likeFigures 2 to 3 As shown in S1.1.2, the adder / deserializer register state includes camera-Sensor / adder / power, board end deserializer, board end adder and screen-power / deserializer.

[0085] The SOC middleware fault reporting process is started at the same time as the SOC fault reporting module process is started:

[0086] S1.2.1 SOC judges the fault query switch to be opened, and queries CPU, temperature, memory usage, image input / output processing module, frame rate, and time delay state. If the query switch is opened, the next step is entered, and if the query switch is closed, the starting stage is returned.

[0087] S1.2.2 SOC judges whether to report a fault according to the threshold value of the middleware, and reports different fault codes to MCU through SPI protocol;

[0088] S1.2.3 MCU judges whether the fault code meets the condition, and MCU sends CAN signal fault code mark 1 if it meets the condition, and MCU sends CAN signal fault code mark 0 if it does not meet the condition;

[0089] S1.2.4 MCU sends the fault reporting CAN message to the upper computer.

[0090] Among them, as shown in Figure 3 S1.3.1 MCU periodically detects power voltage, CAN communication with vehicle body, and HSD enable signal, judges whether the trigger fault condition is met;

[0091] S1.3.2 If MCU judges to meet, MCU sends CAN signal fault code mark 1 if it meets the condition, and MCU sends CAN signal fault code mark 0 if it does not meet the condition;

[0092] S1.3.3 MCU sends the fault reporting CAN message to the upper computer.

[0093] As a preferred scheme of the present application, the fault automatic test module comprises the following steps:

[0094] S2.1 Develop a fault monitoring upper computer using a CAN tool, wherein the panel contains the following contents: ① Check box for triggering camera end and screen end fault query ② CAN bus message data input text box ③ Power voltage sampling value input text box ④ Different module fault state indicator light.

[0095] S2.2 Develop a small program using CAN tool, map the fault code with the indicator light in S1.1 through system variables, when receiving the fault reporting CAN message sent by the CMS electronic rearview mirror module, judge whether the system variable is set according to different CAN message ID and DATA; if the system variable is set to 1, the indicator light displays red; otherwise, the indicator light displays gray;

[0096] S2.3 Develop a small program using CAN tool, associate the check box, text box with the field in the CAN message, realize the simulation of triggering the camera end, screen end fault query or power voltage value, and send the CAN message to the CMS electronic rearview mirror module.

[0097] S3.1 Execute the script python cmsfaulttest.py middilewaretest, use Python to complete the middleware fault diagnosis and verification automation test;

[0098] S3.1.1 Python realizes Telnet login board, modifies the middleware fault detection switch and threshold;

[0099] S3.1.2 Execute the restart application software command, and wait for 5s;

[0100] S3.1.3 Login board, get the real-time fault state of CMS, and get the actual CPU usage of the board through the command;

[0101] S3.1.4 Intercept the fault monitoring host computer, and compare the picture with the expected picture of the current test scene, and verify whether the CPU usage indicator light is red;

[0102] S3.1.5 The Python script judges whether it is consistent with the expectation, if yes, the test is passed, otherwise it is not passed;

[0103] S3.1.6 The memory usage, temperature, clock and register fault monitoring are all completed by referring to the process in S3.1.

[0104] As a preferred scheme of the application, it further comprises:

[0105] S4.1 Execute the script python cmsfaulttest.py cameratest, use Python to complete the camera end fault diagnosis and verification automation test, and the SOC version default camera end, screen end fault trigger condition is met, as long as the fault query switch is turned on, the corresponding fault can be queried;

[0106] S4.1.1 Python realizes the operation of clicking the camera end fault query check box to turn on the fault query switch;

[0107] S4.1.2 Wait for 2s, log in the board end, execute the command to obtain the real-time fault state of CMS, and search for fault codes through logs;

[0108] S4.1.3 Capture the fault monitoring host computer, and compare the picture with the expected picture of the current test scene, and check whether the camera end fault indicator light is red;

[0109] S4.1.4 The Python script judges whether it is consistent with the expectation, if yes, the test is passed, otherwise it is not passed; for the test scene that is not passed, the real-time fault state and the indicator light of the fault monitoring host computer are captured and recorded and saved to the Error folder, so as to facilitate error analysis;

[0110] S4.2 Execute the script python cmsfaulttest.py lcdtest, and screen end fault monitoring is completed by referring to the processes in S4.1.1-S4.1.4 for automation verification;

[0111] S4.3 Execute the script python cmsfaulttest.py cantest / powertest to realize CAN communication and power rail fault injection test, and simulate the operation of the host computer to input CAN message, power rail and HSD abnormal value through Python;

[0112] According to the message format period in the DBC file (CAN communication matrix), send the CAN signals of vehicle speed, gear, steering indication and door state to the CMS controller, so as to achieve the purpose of simulating the communication with the whole vehicle in the real vehicle test process;

[0113] According to the fault generation threshold of different power rails, set the value of the host computer text input box, and simulate the sampling value of the CMS controller of different power rails;

[0114] According to the fault generation condition of HSD, set the value of the host computer text input box, and simulate the state of the CMS controller HSD;

[0115] Other operations are completed by referring to the processes in S4.1.1-S4.1.4 for automation verification.

[0116] Among them, S5.1 executes the script python cmsfaulttest.py / testdir-w for fault diagnosis long stability test;

[0117] Iterate through the Python scripts of S4.1-S4.3 in testdir, test according to the camera end, screen end, middleware, power management, CAN communication protocol and HSD test scene, and perform the next cycle test after all scenes are executed, until the ctrl+c shortcut is used to exit, in this way, long stability test is performed.

[0118] In summary, the technical key points of the present application are:

[0119] (1) Build a virtual vehicle environment, simulate scenarios such as camera link failure, system failure, inject fault signals and verify the response of the diagnosis system.

[0120] (2) Synchronous detection and display of multi-dimensional faults.

[0121] (3) Fault modularization and unique fault identification to accurately identify faults of different modules.

[0122] (4) Generate boundary values and other automated test cases based on diagnosis requirements.

[0123] (5) Test result visualization, test result consistency can be observed in the host computer.

[0124] (6) Batch verification of different test scenarios, from fault injection, fault verification to realize automated testing and long-term stable testing of fault diagnosis.

[0125] Each device selected in the present application is a general standard part or a component known to those skilled in the art, and its structure and principle can be known by those skilled in the art through a technical manual or through a conventional experimental method.

[0126] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0127] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore it cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0128] With the above ideal embodiments according to the present application as the inspiration, through the above description, relevant staff can make various changes and modifications without deviating from the technical idea of the present application. The technical scope of the present application is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims

1. A CMS electronic rearview mirror fault diagnosis system based on automated testing, characterized in that, include: The CMS electronic rearview mirror module is used for displaying, detecting, processing, and controlling information about the side and rear environment of the vehicle. The left monitor, left camera, right camera, and right monitor are electrically connected to the CMS electronic rearview mirror module for displaying external environmental information and triggering screen-end faults in the CMS electronic rearview mirror. The PEPS module is electrically connected to the CMS electronic rearview mirror module and is used to acquire the vehicle start signal; The VCU module is electrically connected to the CMS electronic rearview mirror module and is used to acquire gear position signals; The BCM module is electrically connected to the CMS electronic rearview mirror module and is used to acquire vehicle unlock signals and door status signals. The ESC module is electrically connected to the CMS electronic rearview mirror module and is used to acquire vehicle speed signals. The server and monitor module is used for Python scripts to simulate fault injection, fault query and fault consistency verification, and the host computer displays the fault status. The CMS electronic rearview mirror module includes a SOC fault reporting submodule and a MUC fault reporting submodule. The CMS electronic rearview mirror module is connected to an automated fault testing module.

2. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 1, characterized in that, The process of the SOC fault reporting submodule is as follows: Start: S1.1.1 The MCU determines whether the system is normal. If it is normal, it sends fault query flags to the camera and screen. If it is not normal, it returns to determine whether the system is normal. When the fault query flags for the camera and screen are turned on, the S1.1.2SOC queries the status of the registers of the corresponding serializers / deserializers for the camera and screen to obtain the register status values. S1.1.3 The SOC reports different fault codes to the MCU via the SPI protocol based on the register status value; S1.1.4 The MCU determines whether the fault code is satisfied. If it is satisfied, the MCU sends a CAN signal to set the fault code indicator to 1. If it is not satisfied, the MCU sends a CAN signal to set the fault code indicator to 0. The S1.1.5 MCU sends a fault reporting CAN message to the host computer. If the fault light on the host computer is red, a fault has occurred; if the fault light on the host computer is gray, it is normal.

3. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 2, characterized in that, In S1.1.2, the states of the serializer / deserializer registers include camera-Sensor / serializer / power, board-side deserializer, board-side serializer, and screen-power / deserializer.

4. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 3, characterized in that, The SOC middleware fault reporting process begins simultaneously with the start of the SOC fault reporting submodule process: When the S1.2.1SOC fault detection query switch is turned on, query the CPU, temperature, memory usage, image input / output processing module, frame rate, and latency status. If the query switch is turned on, proceed to the next step; if the query switch is turned off, return to the start stage. S1.2.2 The SOC determines whether to report a fault based on the middleware's threshold and reports different fault codes to the MCU via the SPI protocol; S1.2.3 The MCU determines whether the fault code is satisfied. If it is satisfied, the MCU sends a CAN signal to set the fault code indicator to 1. If it is not satisfied, the MCU sends a CAN signal to set the fault code indicator to 0. S1.2.4 The MCU sends a fault reporting CAN message to the host computer.

5. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 4, characterized in that, The MUC fault reporting submodule includes the following steps: S1.3.1 The MCU periodically detects the power supply voltage, CAN communication with the vehicle body, and HSD enable signal to determine whether the fault triggering conditions are met. S1.3.2 If the MCU determines that the condition is met, the MCU sends a CAN signal to set the fault code indicator to 1; otherwise, the MCU sends a CAN signal to set the fault code indicator to 0. S1.3.3 The MCU sends a fault reporting CAN message to the host computer.

6. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 5, characterized in that, The automated fault testing module includes the following steps: S2.1 uses the CAN tool to develop a fault monitoring host computer, whose panel includes the following: ① Checkboxes that trigger fault queries on both the camera and screen sides ② CAN bus message data input text box ③ Power supply voltage sampling value input text box ④ Fault status indicator lights for different modules S2.2 uses a CAN tool to develop a small program that maps fault codes to indicator lights in S1.1 through system variables. When a fault reporting CAN message is received from the CMS electronic rearview mirror module, the system variable is set according to the different CAN message ID and DATA. If a system variable is set to 1, the indicator light will turn red; otherwise, it will turn gray. S2.3 uses the CAN tool to develop a small program, which associates checkboxes and text boxes with fields in the CAN message to simulate triggering fault queries or power supply voltage values ​​at the camera and screen ends, and sends CAN messages to the CMS electronic rearview mirror module.

7. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 6, characterized in that, The automated fault testing module also includes the following steps: S3.1 executes the script python cmsfaulttest.py middilewaretest, using Python to automate middleware fault diagnosis and verification testing; S3.1.1 Implement Telnet login board using Python, and modify middleware fault detection switch and threshold; S3.1.2 Execute the command to restart the application software, wait 5 seconds; S3.1.3 Log in to the board, obtain the real-time fault status of CMS, and obtain the actual CPU utilization of the board through commands; S3.1.4 Capture the fault monitoring host computer and compare the image with the expected image of the current test scenario to verify whether the CPU utilization indicator light is red; If the S3.1.5 Python script matches the expected result, the test passes; otherwise, it fails. S3.1.6 memory usage, temperature, clock, and register fault monitoring are all automated and verified using the same process as in S3.

1.

8. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 7, characterized in that, Also includes: S4.1 executes the script python cmsfaulttest.py cameratest, which uses Python to complete automated testing for camera-side fault diagnosis and verification. By default, the automated testing SOC version meets the fault triggering conditions for both the camera and screen sides. As long as the fault query switch is turned on, the corresponding fault can be found. In S4.1.1 Python implementation, clicking the fault query checkbox on the camera will turn on the fault query switch; S4.1.2 Wait 2 seconds, log in to the board, execute commands to obtain the real-time fault status of CMS, and search for fault codes by retrieving logs; S4.1.3 Capture the fault monitoring host computer and compare the image with the expected image of the current test scenario to verify whether the fault indicator light on the camera is red; If the S4.1.4 Python script's judgment matches the expectation, the test passes; otherwise, it fails. For test scenarios that fail, the real-time fault status and indicator lights of the fault monitoring host computer must be captured and saved to the Error folder for error analysis. S4.2 executes the script python cmsfaulttest.py lcdtest, and the on-screen fault monitoring is automated by following the procedures in S4.1.1 to S4.1.

4. S4.3 executes the script python cmsfaulttest.py cantest / powertest to perform CAN communication and power rail fault injection tests. It uses Python to simulate the operation of the host computer to input CAN messages, power rails, and HSD abnormal values. According to the message format in the DBC file (CAN communication matrix), the vehicle speed, gear position, steering indication, and door status CAN signals are periodically sent to the CMS controller to achieve the purpose of simulating communication with the whole vehicle during the actual vehicle test. The values ​​of the text input boxes on the host computer are set according to the fault thresholds of different power rails to simulate the sampling values ​​of different power rails of the CMS controller. Set the text input box value in the host computer according to the fault conditions of HSD to simulate the state of CMS controller HSD; All other operations are automated by following the procedures in S4.1.1 to S4.1.

4.

9. The method for a CMS electronic rearview mirror fault diagnosis system based on automated testing as described in claim 8, characterized in that, Also includes: S5.1 executes the script python cmsfaulttest.py / testdir-w to perform fault diagnosis and long-term stability testing; Iterate through the Python scripts S4.1 to S4.3 in testdir and perform tests according to the camera end, screen end, middleware, power management, CAN communication protocol, and HSD test scenarios. After all scenarios are completed, start the next loop test until the shortcut ctrl+c is used to exit. Perform long-term stability testing in this way.