Internal module circuit verification method and system based on dual MCU
Through the circuit verification method of the dual MCU architecture, circuit faults can be quickly determined and self-verified, which solves the problem of low fault diagnosis efficiency in the existing technology and improves the safety and reliability of the circuit.
Patent Information
- Application Number
- CN202411877949.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The existing technology lacks an effective fault diagnosis mechanism, resulting in low circuit fault diagnosis efficiency and difficulty in rapid response and processing.
A dual MCU architecture is adopted. The first MCU module sends an EN signal to drive the circuit module. The process sampling module collects the signal. The first and second MCU modules compare the signals. If they are inconsistent, the second MCU module constructs a new signal for re-sampling to determine the fault.
It realizes the rapid judgment and self-checking of circuit faults, improves the safety and reliability of the circuit, reduces misjudgment, and improves the efficiency of fault diagnosis.
Smart Images

Figure CN119780670B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of circuit verification, and in particular relates to a method and system for verifying an internal module circuit based on dual MCUs. Background Art
[0002] In the field of electronics, the modularization of circuit modules creates uncertainty about inter-module connectivity, making circuit verification particularly important. Existing solutions often lack effective fault diagnosis and handling mechanisms, making it difficult to quickly respond and address circuit failures.
[0003] A similar prior art Chinese patent application with publication number CN114721862A provides a watchdog circuit with a signal verification function, the method including: a signal verification circuit, which is communicated with the signal sender and is used to verify whether the signal received by the watchdog circuit is consistent with the signal sent by the signal sender; an error injection circuit, which is communicated with the signal verification circuit and is used to detect the function of the signal verification circuit; a watchdog circuit, which is communicated with the signal verification circuit and is used to respond to the signal verified by the signal verification circuit; the watchdog circuit includes a refresh controller, which is communicated with the counter of the watchdog circuit and is used to control the refresh of the counter after judging the validity of the dog feeding signal.
[0004] A similar prior art includes a Chinese patent application with publication number CN113656230A, which discloses a fault diagnosis circuit, method, device and computer-readable storage medium. The method includes: a safety protection circuit and a diagnostic module; the safety protection circuit is electrically connected to the protected circuit, and is used to perform a verification operation on the stored data in the protected circuit to obtain first verification data, and to inject an error into the second verification data corresponding to the stored data, and to generate a first verification result signal based on the first verification data and the second verification data after the error injection; the diagnostic module is electrically connected to the safety protection circuit, and the diagnostic module is used to perform fault diagnosis on the safety protection circuit based on the first verification result signal.
[0005] However, neither of the above two applications considers the problem of low fault diagnosis efficiency. Therefore, the present invention provides an internal module circuit verification method and system based on dual MCUs. Summary of the Invention
[0006] The present invention can quickly locate fault problems and enter the control system when a fault occurs to ensure the normal operation of the circuit and the external output status, thereby ensuring the safe state of the system.
[0007] In order to achieve the above-mentioned object of the invention, the present invention provides a dual-MCU internal module circuit verification method as described below, which is implemented by performing the following steps:
[0008] Step S1: The first MCU module sends a first EN signal to the driving circuit module. After receiving the first EN signal, the driving circuit module sends a first SignalEN signal to the circuit module under test. The circuit module under test outputs an internal signal after internal processing.
[0009] Step S2: When the circuit module under test outputs the internal signal, the process sampling module samples the internal signal of the circuit module under test, outputs a first sampling signal, and sends the first sampling signal to the first MCU module and the second MCU module;
[0010] Step S3: The first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. If the first sampling signal is found to be consistent with the expected signal, it indicates that the circuit module under test is working normally. If the first sampling signal is found to be inconsistent with the expected signal, step S4 is executed.
[0011] Step S4: the first MCU module turns off outputting the first EN signal, the second MCU module sends a second EN signal and a second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module;
[0012] Step S5: After the second sampling signal is input into the circuit module under test, the internal signal output by the circuit module under test is sampled for the second time to obtain a new first sampling signal, and the new first sampling signal is input into the first MCU module and the second MCU module to determine fault information.
[0013] As a preferred technical solution of the present invention, determining fault information includes the following steps:
[0014] Step S51: The first MCU module and the second MCU module compare the new first sampling signal with the expected signal for the second time. If the new first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally.
[0015] Step S52: If the new first sampling signal is still inconsistent with the expected signal, it indicates that there is an internal fault in the circuit module under test.
[0016] As a preferred technical solution of the present invention, in step S1, the following steps are further performed:
[0017] The first MCU module also establishes a communication channel with the second MCU module, and sends the first EN signal to the second MCU module through the communication channel.
[0018] As a preferred technical solution of the present invention, the first MCU module and the second MCU module compare the first sampled signal with the expected signal for the first time, including the following steps:
[0019] Step S31: After receiving the first sampling signal, the first MCU module compares the first sampling signal with the expected signal to obtain a first comparison result, where the first comparison result includes two situations: consistency and inconsistency.
[0020] Step S32: After receiving the first sampling signal, the second MCU module compares the first sampling signal with the expected signal to obtain a second comparison result, where the second comparison result includes two situations: consistency and inconsistency.
[0021] Step S33: The first MCU module sends the first comparison result to the second MCU module through the communication channel, and the second MCU module sends the second comparison result to the first MCU module through the communication channel;
[0022] Step S34: If the first comparison result and the second comparison result are both consistent, it is determined that the first sampling signal is consistent with the expected signal; otherwise, it is determined that the first sampling signal is inconsistent with the expected signal.
[0023] As a preferred technical solution of the present invention, comparing the first sampled signal with the expected signal to obtain a first comparison result includes the following steps:
[0024] Signal conditioning is performed on the first sampling signal, key parameters are extracted from the conditioned first sampling signal, the key parameters including amplitude, frequency, phase, and timestamp, and the key parameters are compared with key parameters of the expected signal to obtain a first comparison result.
[0025] As a preferred technical solution of the present invention, comparing the key parameter with the key parameter of the expected signal to obtain a first comparison result includes the following steps:
[0026] Determine whether each key parameter of the first sampling signal is within a threshold range of each key parameter of the expected signal; if each key parameter is within the threshold range of the corresponding key parameter of the expected signal, determine that the first comparison result of the first sampling signal and the expected signal is consistent; otherwise, determine that the first comparison result is inconsistent.
[0027] As a preferred technical solution of the present invention, the expected signal means that there is a set of preset standards inside the first MCU module and the second MCU module. Based on the preset standards, the first MCU module and the second MCU module can output the expected signal based on the first EN signal. The preset standards may be a theoretical model of circuit design, or signal characteristics under normal working conditions in historical data.
[0028] As a preferred technical solution of the present invention, the process sampling module samples the internal signal of the circuit module under test, including the following steps:
[0029] Real-time detection of environmental parameters, including temperature and humidity, and evaluation of the impact of the environmental parameters on signal quality to obtain a first environmental parameter, which refers to the environmental parameter with the greatest impact on signal quality. Sampling rules are set to increase the sampling frequency under specific circumstances.
[0030] As a preferred technical solution of the present invention, evaluating the impact of the environmental parameter on the signal quality to obtain the first environmental parameter includes the following steps:
[0031] Acquire the sampling signals and corresponding environmental parameters in the historical sampling process. For each type of environmental parameter, obtain the corresponding key signal feature based on the sampling signal, where the key signal feature refers to the amplitude value of the signal. Calculate the correlation coefficient between different environmental parameter values and the key signal feature, and use the environmental parameter with the largest correlation coefficient as the first environmental parameter.
[0032] The present invention also provides an internal module circuit verification system based on dual MCUs, comprising the following units:
[0033] a signal driving unit, configured to send a first EN signal to the driving circuit module, which, after receiving the first EN signal, sends a first SignalEN signal to the circuit module under test, and the circuit module under test outputs an internal signal after internal processing;
[0034] a signal sampling unit, configured to sample the internal signal of the circuit module under test during the process in which the circuit module under test outputs the internal signal, output a first sampling signal, and send the first sampling signal to the first MCU module and the second MCU module;
[0035] a signal comparison unit, wherein the first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time, and if it is found that the first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally; if it is found that the first sampling signal is inconsistent with the expected signal, a detection processing unit is executed;
[0036] The detection processing unit, the first MCU module turns off the output of the first EN signal, the second MCU module sends a second EN signal and a second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module;
[0037] The fault judgment unit samples the internal signal output by the circuit module under test for the second time after the second sampling signal is input into the circuit module under test, obtains a new first sampling signal, and inputs the new first sampling signal into the first MCU module and the second MCU module to judge fault information.
[0038] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0039] In the present invention, the first MCU module sends a first EN signal, the driving circuit module works and sends a first SignalEN signal, the circuit module under test works and sends an output signal, a process sampling module is used to sample the internal signal of the circuit module under test, and output the first sampling signal to the first MCU module and the second MCU module. The first MCU module and the second MCU module establish a communication channel, and compare the first sampling signals with each other. When it is detected that the output signal is inconsistent with the expected signal, the first MCU module turns off the output of the first EN signal, and the second MCU module sends a second EN signal and a second SignalEN signal. A new first sample signal is constructed by the verification signal construction module, and the new first sample signal is sent to the first MCU module and the second MCU module, and the new first sampling signals are compared with each other. Based on the comparison result, it is determined whether there is a fault, and fault information is output if there is a fault. The present invention can realize rapid judgment of circuit faults, and can also perform self-calibration and verification on the circuit, thereby improving the safety and reliability of the circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A flowchart of a method for verifying an internal module circuit based on dual MCUs according to the present invention;
[0041] Figure 2 Flowchart of the operation of each module of the present invention;
[0042] Figure 3 This is a structural diagram of the internal module circuit verification system based on dual MCUs of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script without departing from the scope of this application.
[0045] In the prior art, when diagnosing and judging circuit faults, the problem of low diagnostic efficiency is not considered.
[0046] Thus, the present invention provides Figure 1 The internal module circuit verification method based on dual MCUs is implemented by executing the following steps:
[0047] Step S1: The first MCU module sends a first EN signal to the driving circuit module. After receiving the first EN signal, the driving circuit module sends a first SignalEN signal and sends it to the circuit module under test. The circuit module under test outputs an internal signal after internal processing.
[0048] Specifically, under normal working conditions, the first MCU module is responsible for the main functional output, and the second MCU module is in standby monitoring and detection status. MCU is a small computer system that integrates multiple functional modules such as processor, memory, input and output interface, etc. The MCU controller usually includes CPU, memory, input and output interface, timer, ADC, DAC and other modules, which can realize various control, calculation, data processing and other functions. The first MCU module sends a first EN signal to the driving circuit module. After receiving the first EN signal, the driving circuit module sends a first SignalEN signal and sends it to the circuit module under test. The circuit module under test outputs the internal signal after internal processing.
[0049] Step S2: When the circuit module under test outputs an internal signal, the process sampling module samples the internal signal of the circuit module under test, outputs a first sampling signal, and sends the first sampling signal to the first MCU module and the second MCU module.
[0050] Specifically, during the process of the circuit module under test outputting an internal signal, the process sampling module samples the internal signal of the circuit module under test. In order to improve the accuracy and efficiency of detection, the sampling frequency is dynamically adjusted according to environmental changes. The specific sampling process will be explained in detail later. The first sampling signal is output and the first sampling signal is also sent to the first MCU module and the second MCU module. Subsequently, the first MCU module and the second MCU module can perform fault detection and processing based on the comparison of the first sampling signal and the expected signal.
[0051] In step S3, the first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. If the first sampling signal is found to be consistent with the expected signal, it indicates that the circuit module under test is working normally. If the first sampling signal is found to be inconsistent with the expected signal, step S4 is executed.
[0052] Specifically, the first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. When it is detected that the first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally. If it is found that the first sampling signal is inconsistent with the expected signal, it indicates that the circuit module under test may have a fault. At the same time, there is also a situation where the circuit module under test does not have a fault, but the first sampling signal has a problem. Therefore, the circuit module under test is further tested by executing step S4.
[0053] Step S4: the first MCU module turns off outputting the first EN signal, the second MCU module sends a second EN signal and a second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module.
[0054] Specifically, when it is detected that the first sampling signal is inconsistent with the expected signal, the first MCU module turns off the output of the first EN signal, the second MCU module outputs the second EN signal to the drive module, outputs the second SignalEN signal to the enable circuit module, and the verification signal construction module constructs a second sampling signal to output to the circuit module under test. In order to determine whether the circuit module under test is correct, the verification signal construction module constructs a new second sampling signal that ensures accuracy and reliability, and inputs the second sampling signal to the circuit module under test to further verify the fault condition of the circuit and improve the accuracy of fault diagnosis.
[0055] Step S5: After the second sampling signal is input into the circuit module under test, the internal signal output by the circuit module under test is sampled for the second time to obtain a new first sampling signal, and the new first sampling signal is input into the first MCU module and the second MCU module to determine the fault information.
[0056] Specifically, a new second sampling signal is constructed and input into the circuit module under test, and then a second sampling is performed on the internal signal output by the circuit module under test to obtain a new first sampling signal, and the new first sampling signal is input into the first MCU module and the second MCU module again. Subsequently, the first MCU module and the second MCU module are compared to determine whether the circuit module under test is abnormal. The specific judgment method will be explained in detail later. The above method can accurately locate the source of the fault, reduce misjudgment, and improve the efficiency of fault diagnosis.
[0057] like Figure 2 The flowchart shown is a flowchart of the operation of each module when implementing the present invention. The first MCU module sends a first EN signal, the drive circuit module operates and sends a first SignalEN signal, the circuit module under test operates and outputs an internal signal, the process sampling module samples the internal signal of the circuit module under test, and outputs the first sampling signal to the first MCU module and the second MCU module. The first MCU module and the second MCU module establish a communication channel and compare the first sampling signals with each other. When it is detected that the output signal is inconsistent with the expected signal, the first MCU module turns off the output of the first EN signal, and the second MCU module sends a second EN signal and a second SignalEN signal. A new second sample signal is constructed by the enabling circuit module and the verification signal construction module and output to the circuit module under test. The circuit module under test is sampled for a second time to obtain a new first sampling signal. The first MCU module and the second MCU module compare the new first sampling signals with each other, determine whether there is a fault based on the comparison result, and output fault information if there is a fault.
[0058] Furthermore, determining the fault information includes the following steps:
[0059] Step S51: The first MCU module and the second MCU module compare the new first sampling signal with the expected signal for the second time. If the new first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally.
[0060] Step S52: If the new first sampling signal is still inconsistent with the expected signal, it indicates that there is an internal fault in the circuit module under test.
[0061] Specifically, the first MCU module compares the acquired new first sampling signal with the expected signal. If the first sampling signal is consistent with the expected signal, it means that after using the correct new first sampling signal, the circuit module under test can output the first sampling signal that is correct with the expected signal, indicating that the circuit module under test is fault-free and can work normally. If the first sampling signal is inconsistent with the expected signal, it means that after using the correct new first sampling signal, the first sampling signal is still inconsistent with the expected signal, which indicates that there is an internal fault in the circuit under test.
[0062] Furthermore, in step S1, the following steps are also performed:
[0063] The first MCU module also establishes a communication channel with the second MCU module, and sends the first EN signal to the second MCU module through the communication channel.
[0064] Specifically, in order to enable the first MCU module and the second MCU module to exchange signals, the first MCU module also establishes a communication channel with the second MCU module, and sends the first EN signal to the second MCU module through the communication channel, so that the first MCU module and the second MCU module can determine whether there is a fault in the circuit module under test through mutual interaction.
[0065] Furthermore, the first MCU module and the second MCU module compare the first sampled signal with the expected signal for the first time, including the following steps:
[0066] Step S31: After receiving the first sampling signal, the first MCU module compares the first sampling signal with the expected signal to obtain a first comparison result, where the first comparison result includes two situations: consistency and inconsistency.
[0067] Step S32: After receiving the first sampling signal, the second MCU module compares the first sampling signal with the expected signal to obtain a second comparison result, where the second comparison result includes two situations: consistency and inconsistency.
[0068] Step S33: The first MCU module sends the first comparison result to the second MCU module through the communication channel, and the second MCU module sends the second comparison result to the first MCU module through the communication channel;
[0069] Step S34: If the first comparison result and the second comparison result are both consistent, it is determined that the first sampling signal is consistent with the expected signal; otherwise, it is determined that the first sampling signal is inconsistent with the expected signal.
[0070] Specifically, after the first MCU module receives the first sampling signal, it compares the first sampling signal with the expected signal to obtain a first comparison result. The first comparison result includes two situations: consistency and inconsistency. If the first MCU module determines that the first sampling signal is consistent with the expected signal, and the second MCU module also determines that the first sampling signal is consistent with the expected signal, then it can be more accurately explained that the first sampling signal and the expected signal are consistent. If the first MCU module determines that the first sampling signal is consistent with the expected signal, or the second MCU module also determines that the first sampling signal and the expected signal are inconsistent, or both determine that the first sampling signal and the expected signal are inconsistent, then it means that the first sampling signal and the expected signal are inconsistent. The above method can accurately determine whether the first sampling signal and the expected signal are consistent.
[0071] Furthermore, comparing the first sampled signal with the expected signal to obtain a first comparison result includes the following steps:
[0072] Signal conditioning is performed on the first sampling signal, key parameters are extracted from the conditioned first sampling signal, the key parameters including amplitude, frequency, phase and timestamp, and the key parameters are compared with key parameters of the expected signal to obtain a first comparison result.
[0073] Specifically, by obtaining key parameters of the first sampled signal and the expected signal through the above method, and subsequently comparing the first sampled signal and the expected signal based on the key parameters, a more accurate comparison result can be obtained.
[0074] Furthermore, comparing the key parameter with the key parameter of the expected signal to obtain a first comparison result includes the following steps:
[0075] Determine whether each key parameter of the first sampling signal is within a threshold range of each key parameter of the expected signal. If each key parameter is within the threshold range of the corresponding key parameter of the expected signal, then determine that the first comparison result of the first sampling signal and the expected signal is consistent; otherwise, the first comparison result is inconsistent.
[0076] Specifically, the above method is used to determine whether the key parameters of the first sampling signal are within the key parameter threshold range of the expected signal. If so, it indicates that the first sampling signal and the expected signal are consistent. Otherwise, it indicates that they are inconsistent, and a more accurate comparison result can be obtained.
[0077] Furthermore, the expected signal means that there is a set of preset standards inside the first MCU module and the second MCU module. Based on the preset standards, the first MCU module and the second MCU module can output the expected signal based on the first EN signal. The preset standard may be a theoretical model of circuit design, or a signal characteristic under normal working conditions in historical data.
[0078] Furthermore, the process sampling module samples the internal signal of the circuit module under test, including the following steps:
[0079] Real-time detection of environmental parameters, including temperature and humidity, and evaluation of their impact on signal quality to obtain the first environmental parameter, which is the environmental parameter with the greatest impact on signal quality. Sampling rules are set, and the sampling frequency is increased under specific circumstances.
[0080] Specifically, in order to improve the accuracy and efficiency of detection, by real-time detection of environmental parameters, the environmental parameters that have the greatest impact on signal quality are obtained, sampling rules are set, and the sampling frequency is increased in specific circumstances, such as increasing the sampling frequency in a high-noise environment to capture more signal details. The above method can dynamically adjust the sampling frequency based on environmental parameters to improve the accuracy and efficiency of detection.
[0081] Furthermore, evaluating the impact of environmental parameters on signal quality to obtain a first environmental parameter includes the following steps:
[0082] Obtain the sampling signals and corresponding environmental parameters in the historical sampling process. For each type of environmental parameter, obtain the corresponding key signal features based on the sampling signals. The key signal features refer to the amplitude values of the signals. Calculate the correlation coefficients between different environmental parameter values and the key signal features, and take the environmental parameter with the largest correlation coefficient as the first environmental parameter.
[0083] Specifically, obtaining the first environmental parameter that has the greatest impact on signal quality through the above method is helpful for collecting more detailed signal samples.
[0084] According to another aspect of the embodiment of the present invention, Figure 3 As shown, a dual-MCU-based internal module circuit verification system is also provided, including a signal driving unit, a signal sampling unit, a signal comparison unit, a detection processing unit, and a fault judgment unit, which is used to implement the dual-MCU-based internal module circuit verification method described above. The specific functions of each unit are as follows:
[0085] A signal driving unit is configured to send a first EN signal to the driving circuit module. After receiving the first EN signal, the driving circuit module sends a first SignalEN signal to the circuit module under test. The circuit module under test outputs an internal signal after internal processing.
[0086] The signal sampling unit is configured to sample the internal signal of the circuit module under test during the process of the circuit module under test outputting the internal signal, output a first sampling signal, and send the first sampling signal to the first MCU module and the second MCU module;
[0087] The signal comparison unit, the first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. If the first sampling signal is found to be consistent with the expected signal, it indicates that the circuit module under test is working normally. If the first sampling signal is found to be inconsistent with the expected signal, the detection processing unit is executed;
[0088] Detection processing unit, the first MCU module turns off the output of the first EN signal, the second MCU module sends the second EN signal and the second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module;
[0089] The fault judgment unit samples the internal signal output by the circuit module under test for the second time after the second sampling signal is input into the circuit module under test, obtains a new first sampling signal, and inputs the new first sampling signal into the first MCU module and the second MCU module to judge the fault information.
[0090] In summary, the present invention proposes a dual-MCU-based internal module circuit verification method and system, which includes the first MCU module sending a first EN signal to drive the circuit module under test to generate an internal signal, the process sampling module collecting the internal signal of the circuit module under test to sample and obtain a first sampling signal, the first MCU module and the second MCU module, by comparing to find whether the first sampling signal is consistent with the expected signal, if they are consistent, it is determined that the circuit module under test is working normally, otherwise the first MCU module shuts down and sends the first EN signal, the second MCU module sends a second EN signal and a second Signal signal, constructs a second sampling signal, and based on the second sampling signal, the circuit module under test is sampled for a second time to obtain a new first sampling signal, and the fault is determined based on the new first sampling signal. The present invention can achieve rapid judgment of circuit faults by performing self-verification on the circuit.
[0091] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0092] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0093] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above embodiments merely represent several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the appended claims.
[0095] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for verifying an internal module circuit based on dual MCUs, characterized in that: The steps include: Step S1: The first MCU module sends a first EN signal to the driving circuit module. After receiving the first EN signal, the driving circuit module sends a first SignalEN signal to the circuit module under test. The circuit module under test outputs an internal signal after internal processing. Step S2: When the circuit module under test outputs the internal signal, the process sampling module samples the internal signal of the circuit module under test, outputs a first sampling signal, and sends the first sampling signal to the first MCU module and the second MCU module; Step S3: The first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. If both the first MCU module and the second MCU module find that the first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally. If either the first MCU module or the second MCU module finds that the first sampling signal is inconsistent with the expected signal, step S4 is executed. Step S4: the first MCU module turns off outputting the first EN signal, the second MCU module sends a second EN signal and a second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module; Step S5: After the second sampling signal is input into the circuit module under test, the internal signal output by the circuit module under test is sampled for the second time to obtain a new first sampling signal, and the new first sampling signal is input into the first MCU module and the second MCU module to determine fault information.
2. The method according to claim 1, characterized in that Determining fault information includes the following steps: Step S51: The first MCU module and the second MCU module compare the new first sampling signal with the expected signal for the second time. If the new first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally. Step S52: If the new first sampling signal is still inconsistent with the expected signal, it indicates that there is an internal fault in the circuit module under test.
3. The method according to claim 1, characterized in that In step S1, the following steps are further performed: The first MCU module also establishes a communication channel with the second MCU module, and sends the first EN signal to the second MCU module through the communication channel.
4. The method according to claim 1, wherein The first MCU module and the second MCU module compare the first sampled signal with the expected signal for the first time, including the following steps: Step S31: After receiving the first sampling signal, the first MCU module compares the first sampling signal with the expected signal to obtain a first comparison result, where the first comparison result includes two situations: consistency and inconsistency. Step S32: After receiving the first sampling signal, the second MCU module compares the first sampling signal with the expected signal to obtain a second comparison result, where the second comparison result includes two situations: consistency and inconsistency. Step S33: The first MCU module sends the first comparison result to the second MCU module through the communication channel, and the second MCU module sends the second comparison result to the first MCU module through the communication channel; Step S34: If the first comparison result and the second comparison result are both consistent, it is determined that the first sampling signal is consistent with the expected signal; otherwise, it is determined that the first sampling signal is inconsistent with the expected signal.
5. The method according to claim 4, characterized in that Comparing the first sampled signal with the expected signal to obtain a first comparison result includes the following steps: Signal conditioning is performed on the first sampling signal, key parameters are extracted from the conditioned first sampling signal, the key parameters including amplitude, frequency, phase, and timestamp, and the key parameters are compared with key parameters of the expected signal to obtain a first comparison result.
6. The method according to claim 5, characterized in that Comparing the key parameter with the key parameter of the expected signal to obtain a first comparison result includes the following steps: Determine whether each key parameter of the first sampling signal is within a threshold range of each key parameter of the expected signal; if each key parameter is within the threshold range of the corresponding key parameter of the expected signal, determine that the first comparison result of the first sampling signal and the expected signal is consistent; otherwise, determine that the first comparison result is inconsistent.
7. The method according to claim 1, characterized in that The expected signal means that there is a set of preset standards inside the first MCU module and the second MCU module. Based on the preset standards, the first MCU module and the second MCU module can output the expected signal based on the first EN signal. The preset standards may be a theoretical model of circuit design, or signal characteristics under normal working conditions in historical data.
8. The method according to claim 1, characterized in that The process sampling module samples the internal signal of the circuit module under test, including the following steps: Real-time detection of environmental parameters, including temperature and humidity, and evaluation of the impact of the environmental parameters on signal quality to obtain a first environmental parameter, which refers to the environmental parameter with the greatest impact on signal quality. Sampling rules are set to increase the sampling frequency under specific circumstances.
9. The method according to claim 8, characterized in that Evaluating the impact of the environmental parameter on the signal quality to obtain a first environmental parameter includes the following steps: Acquire the sampling signals and corresponding environmental parameters in the historical sampling process. For each type of environmental parameter, obtain the corresponding key signal feature based on the sampling signal, where the key signal feature refers to the amplitude value of the signal. Calculate the correlation coefficient between different environmental parameter values and the key signal feature, and use the environmental parameter with the largest correlation coefficient as the first environmental parameter.
10. A dual-MCU-based internal module circuit verification system, used to implement the dual-MCU-based internal module circuit verification method according to any one of claims 1 to 9, characterized in that: Includes the following units: a signal driving unit, configured to send a first EN signal to the driving circuit module, which, after receiving the first EN signal, sends a first SignalEN signal to the circuit module under test, and the circuit module under test outputs an internal signal after internal processing; a signal sampling unit, configured to sample the internal signal of the circuit module under test during the process in which the circuit module under test outputs the internal signal, output a first sampling signal, and send the first sampling signal to the first MCU module and the second MCU module; a signal comparison unit, wherein the first MCU module and the second MCU module compare the first sampling signal with the expected signal for the first time. If both the first MCU module and the second MCU module find that the first sampling signal is consistent with the expected signal, it indicates that the circuit module under test is working normally. If either the first MCU module or the second MCU module finds that the first sampling signal is inconsistent with the expected signal, a detection processing unit is executed; The detection processing unit, the first MCU module turns off the output of the first EN signal, the second MCU module sends a second EN signal and a second SignalEN signal, and constructs a new second sampling signal to the circuit module under test through the enabling circuit module and the verification signal construction module; The fault judgment unit samples the internal signal output by the circuit module under test for the second time after the second sampling signal is input into the circuit module under test, obtains a new first sampling signal, and inputs the new first sampling signal into the first MCU module and the second MCU module to judge fault information.
Citation Information
Patent Citations
Fault diagnosis circuit, method and device and computer readable storage medium
CN113656230A
Watchdog circuit with signal verification function and working method thereof
CN114721862A
Integrated circuit chip testing system and method
CN110456257A
Circuit channel verification device and method
CN117590194A