An IO fault determination method, apparatus, device and medium

By collecting and analyzing multi-dimensional feature vectors through an intelligent IO diagnostic coprocessor, the problem of automotive-grade microcontrollers being unable to accurately detect early degradation and intermittent faults of IO ports is solved, achieving highly reliable fault diagnosis and reducing the false alarm rate.

CN122633486APending Publication Date: 2026-08-25CCORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610807235.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing automotive-grade microcontrollers cannot accurately detect early degradation and intermittent faults of I/O ports, resulting in a high false positive rate and a lack of operational context correlation, making it impossible to use multi-dimensional features to distinguish between external load faults and internal I/O damage of the MCU.

Method used

The intelligent IO diagnostic coprocessor is used to collect the static voltage level, voltage response waveform, and transient waveform of the signal transition edge of the IO port. It extracts multi-dimensional feature vectors such as voltage reference value, dynamic contact impedance, edge slope and ringing energy, and performs similarity matching with the pre-stored health fingerprint baseline and typical fault fingerprint to identify the current status of the IO port.

Benefits of technology

It achieves accurate identification of early degradation and intermittent faults of IO ports, reduces false alarm rate, improves the diagnostic reliability of automotive-grade MCUs under complex operating conditions, and avoids system shutdown or reset under strong electromagnetic interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633486A_ABST
    Figure CN122633486A_ABST
Patent Text Reader

Abstract

The application discloses an IO fault determination method and device, equipment and medium, and relates to the technical field of IO port fault diagnosis. The scheme collects the static voltage level of the IO port, the voltage response waveform under the injection test excitation, and the transient waveform of the signal jump edge, avoids the limitation of relying on a single voltage threshold, extracts a multi-dimensional feature vector containing a voltage reference value, a dynamic contact impedance, an edge slope, an overshoot amplitude and a ringing energy, can accurately capture the weak features of early degradation and intermittent faults such as increasing contact resistance and transient glitches, and performs similarity matching of the multi-dimensional feature vector with a health fingerprint baseline and a typical fault fingerprint in fault recognition, distinguishes four states of normal, transient interference, early degradation and hard fault according to the similarity result, avoids system shutdown or reset caused by false triggering of a single threshold under strong electromagnetic interference, and improves the diagnosis reliability of the vehicle-grade MCU under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of I / O port fault diagnosis technology, and in particular to an I / O fault determination method, apparatus, device and medium. Background Technology

[0002] Currently, automotive-grade microcontroller units (MCUs) commonly employ a solution based on static threshold comparison and a watchdog mechanism for input / output (IO) fault detection. The hardware layer integrates a comparator at the IO port, triggering an interrupt when the pin voltage consistently exceeds preset high or low level thresholds. The software layer periodically performs a self-test, comparing the IO output status with the read-back level; a mismatch is detected, a fault is identified, and the port driver is disabled or a system reset is triggered, while simultaneously recording the fault code.

[0003] However, such methods can only detect existing hard faults and are unable to identify early degradation and intermittent faults caused by pin oxidation, solder joint microcracks, etc., such as gradually increasing contact resistance or transient glitch. These anomalies are often ignored because they do not reach the filtering threshold. Under strong electromagnetic interference such as ignition and motor start-stop, voltage fluctuations can easily trigger the static threshold, leading to false alarms of hardware damage and unnecessary shutdowns or resets. This results in a high false alarm rate and a lack of contextual information about the operating conditions. Furthermore, the diagnostic dimensions are limited to high and low voltage levels, and it is impossible to use multi-dimensional features such as current change rate, impedance spectrum, and waveform distortion to distinguish between external load faults and MCU internal I / O damage.

[0004] Given the above, how to solve the problem of inaccurate detection of early degradation and intermittent failures of I / O ports in automotive-grade microcontrollers is an urgent issue for engineers in this field. Summary of the Invention

[0005] The purpose of this application is to provide an I / O fault determination method, apparatus, device, and medium to solve the problem of inaccurate detection of early degradation and intermittent faults of I / O ports for automotive-grade microcontrollers.

[0006] To address the aforementioned technical problems, this application provides an I / O fault determination method applied to an intelligent I / O diagnostic coprocessor within an MCU; the method includes:

[0007] The raw waveform data of the IO port is collected according to a preset period; the raw waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge;

[0008] Multidimensional feature vectors are extracted based on the original waveform data; the multidimensional feature vectors include at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy.

[0009] The multidimensional feature vector is matched with the pre-stored healthy fingerprint baseline and typical fault fingerprints to obtain the similarity results.

[0010] The current state of the I / O port is identified based on the similarity results; the current state includes at least the normal state, the transient interference state, the early degradation state, and the hard fault state.

[0011] On the one hand, raw waveform data from the I / O ports is collected according to a preset period, including:

[0012] When the IO port is in a signal quiescent period, the configurable IO drive array is controlled to inject a test stimulus of preset amplitude into the IO port.

[0013] During the injection of test stimulus, the voltage response waveform of the IO port under the test stimulus is acquired;

[0014] When a signal transition occurs at the I / O port, the transient waveform of the I / O port is acquired;

[0015] When no test stimulus is injected into the IO port and no signal transition occurs, the static voltage level of the IO port is collected.

[0016] On the other hand, multi-dimensional feature vectors are extracted based on the original waveform data, including:

[0017] The raw waveform data is buffered using a hardware FIFO and preprocessed using a moving average filtering algorithm.

[0018] The static voltage level is calculated by arithmetic mean to obtain the voltage reference value;

[0019] Calculate the dynamic contact impedance of the IO port based on the current amplitude and voltage change of the voltage response waveform corresponding to the test excitation.

[0020] Based on the transient waveform, the time required for the waveform to rise from the first amplitude ratio to the second amplitude ratio is extracted as the edge slope, the difference between the peak value and the steady-state value is extracted as the overshoot amplitude, and the ringing energy is obtained by integrating the oscillation waveform after overshoot.

[0021] The voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy are combined into a multi-dimensional feature vector.

[0022] On the other hand, the multidimensional feature vectors are matched with pre-stored healthy fingerprint baselines and typical faulty fingerprints based on similarity, including:

[0023] The multidimensional feature vector is normalized with the health fingerprint baseline to generate a residual feature vector;

[0024] The similarity between the residual feature vector and the typical fault fingerprint is calculated to obtain the similarity result.

[0025] On the other hand, the current state of the I / O port is identified based on the similarity results, including:

[0026] When the similarity result is greater than the first threshold, it is confirmed that the IO port is in normal condition;

[0027] When the similarity result is between the first threshold and the second threshold, it is confirmed that the IO port is in an early degradation state.

[0028] When the similarity result is less than the second threshold, determine whether the waveform of the IO port recovers to the normal range within a preset time.

[0029] If so, then confirm that the IO port is in a transient interference state;

[0030] If not, then confirm that the I / O port is in a hard fault state;

[0031] The first threshold is greater than the second threshold.

[0032] On the other hand, after confirming that the I / O port is in a normal state, it also includes:

[0033] The current value of the health fingerprint baseline and the multidimensional feature vector are weighted and averaged according to the preset smoothing coefficient to generate the updated health fingerprint baseline.

[0034] Write the updated health fingerprint baseline to non-volatile memory to replace the current value of the health fingerprint baseline.

[0035] On the other hand, it also includes:

[0036] When it is confirmed that the IO port is in an early degradation state, increase the drive current of the IO port and / or extend the debouncing time or sample-and-hold time of the IO port;

[0037] When it is confirmed that the IO port is in a transient interference state, disable the current fault alarm and adjust the cutoff frequency of the digital filter of the IO port;

[0038] When it is confirmed that the IO port is in a hard fault state, the driver circuit of the IO port is turned off, and if there is a backup port for the IO port, the internal logical routing is switched to the backup port.

[0039] To address the aforementioned technical problems, this application also provides an I / O fault determination device, applied to an intelligent I / O diagnostic coprocessor within an MCU; the device includes:

[0040] The acquisition module is used to acquire raw waveform data from the I / O port according to a preset period; wherein the raw waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge;

[0041] The feature extraction module is used to extract multi-dimensional feature vectors based on the original waveform data; wherein, the multi-dimensional feature vectors include at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy;

[0042] The matching module is used to perform similarity matching between the multidimensional feature vector and the pre-stored healthy fingerprint baseline and typical faulty fingerprints to obtain similarity results;

[0043] The identification module is used to identify the current state of the IO port based on the similarity results; wherein the current state includes at least the normal state, the transient interference state, the early degradation state, and the hard fault state.

[0044] To address the aforementioned technical problems, this application also provides an IO fault determination device, comprising:

[0045] Memory, used to store computer programs;

[0046] A processor is used to implement the steps of the above-described I / O fault determination method when executing a computer program.

[0047] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned IO fault determination method.

[0048] The IO fault determination method provided in this application avoids the limitations of relying solely on a single voltage threshold by periodically acquiring the static voltage level of the IO port, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge, thus providing a data foundation for multi-dimensional fault diagnosis. Based on this, a multi-dimensional feature vector containing voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy is extracted. This accurately captures weak features of early degradation and intermittent faults such as gradually increasing contact resistance and transient glitches, solving the problem that the static threshold method cannot identify fault precursors. During fault identification, the multi-dimensional feature vector is matched with the healthy fingerprint baseline and typical fault fingerprints for similarity. Based on the similarity results, four states are distinguished: normal, transient interference, early degradation, and hard fault. This avoids system shutdown or reset caused by false triggering of a single threshold under strong electromagnetic interference, significantly reducing the false alarm rate and improving the diagnostic reliability of automotive-grade MCUs under complex operating conditions.

[0049] In addition, this application also provides an IO fault determination device, equipment and medium, which have the same effect as above. Attached Figure Description

[0050] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 An architecture diagram of an automotive-grade MCU IO fault analysis system based on dynamic feature fingerprinting is provided in this application embodiment;

[0052] Figure 2 A flowchart illustrating an I / O fault determination method provided in this application embodiment;

[0053] Figure 3 A flowchart of the fault analysis and self-healing process provided in the embodiments of this application;

[0054] Figure 4 This is a schematic diagram of an I / O fault determination device provided in an embodiment of this application;

[0055] Figure 5 This is a structural diagram of an IO fault determination device provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0057] The core of this application is to provide an IO fault determination method, apparatus, device, and medium to solve the problem of inaccurate detection of early degradation and intermittent faults of IO ports for automotive-grade microcontrollers.

[0058] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] Currently, automotive-grade MCU I / O fault detection commonly employs a solution based on static threshold comparison and a watchdog mechanism. This solution can only detect existing hard faults and struggles to identify early degradation and intermittent faults caused by factors such as pin oxidation, solder joint microcracks, gradually increasing contact resistance, or transient glitches. These anomalies are often ignored because they do not reach the filtering threshold. Under strong electromagnetic interference such as ignition and motor start-stop, voltage fluctuations can easily trigger the static threshold, leading to misjudgments of hardware damage and unnecessary shutdowns or resets, resulting in a high false alarm rate and a lack of contextual information. Furthermore, the diagnostic dimensions are limited to high and low voltage levels, failing to utilize multi-dimensional features such as current change rate, impedance spectrum, and waveform distortion to distinguish between external load faults and internal MCU I / O damage. Therefore, to address these issues, this application provides an I / O fault determination method.

[0060] It should be noted that the method provided in this application is applied to the Smart IO Diagnostic Co-processor (SIDCP) inside the MCU. This processor runs independently of the main CPU and includes a high-speed ADC sampling unit, a feature extraction engine, a fingerprint matching library, and a policy execution unit. Figure 1 This is an architecture diagram of an automotive-grade MCU IO fault analysis system based on dynamic feature fingerprinting, provided as an embodiment of this application. Figure 1 As shown, the system includes a CPU and an intelligent I / O diagnostic coprocessor. The CPU is responsible for executing the vehicle's main control logic (such as engine control and body logic), while the intelligent I / O diagnostic coprocessor, as an independent hardware coprocessor, is specifically responsible for real-time monitoring and fault diagnosis of I / O ports. This allows for high-frequency fault scanning without consuming the main core's computing power or affecting the real-time performance of the main control system. The two interact via an internal bus, and the intelligent I / O diagnostic coprocessor can report diagnostic results to the CPU in the form of interrupts or register status.

[0061] The intelligent I / O diagnostic coprocessor integrates four key functional modules: a high-speed synchronous sampling unit, which is directly connected to a configurable I / O driver array; it can not only acquire the static voltage level of the I / O port, but also synchronously acquire the transient waveforms of current response and signal transition edges within a microsecond-level time window; this high sampling rate ensures the capture of nanosecond-level electromagnetic interference pulses or minute contact jitter. A feature extraction engine receives raw waveform data from the high-speed synchronous sampling unit and calculates multi-dimensional feature vectors in real time using hardware algorithms. A health baseline and fingerprint library pre-stores the health fingerprint baseline calibrated during the vehicle's end-of-life (EOL) testing phase, as well as feature templates for various typical faults (such as short circuit, open circuit, oxidation); this library supports linear interpolation compensation with temperature variations to eliminate the influence of ambient temperature on electrical characteristics. A decision and strategy unit performs similarity matching between the real-time feature vectors generated by the feature extraction engine and the data in the fingerprint library, and autonomously determines the fault type (normal, early degradation, transient interference, hard fault) based on the matching results, and generates corresponding control commands. The following is a detailed description of the I / O fault determination method executed by the intelligent I / O diagnostic coprocessor:

[0062] Figure 2 This is a flowchart illustrating an I / O fault determination method provided in an embodiment of this application. Figure 2 As shown, the method includes:

[0063] S10: Collect raw waveform data from the IO port according to a preset period.

[0064] The original waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform at the signal transition edge.

[0065] Specifically, the process of this solution begins with a periodic diagnostic trigger. The system does not only operate when a fault occurs, but also performs the acquisition of raw waveform data at a preset period. In this embodiment, there is no limitation on the size of the preset period; for example, it can be 1ms.

[0066] Simultaneously, the raw waveform data to be acquired should include at least the static voltage level, the voltage response waveform under injected test stimulus, and the transient waveform at the signal transition edge. It should be noted that the static voltage level refers to the voltage amplitude acquired by the I / O port in its steady-state operation; the voltage response waveform under injected test stimulus is the response curve of the voltage generated at the I / O port changing over time after a known test stimulus is injected. The transient waveform at the signal transition edge refers to the transient process of voltage change over time captured at the moment the I / O port signal level switches. This embodiment does not limit the specific process of acquiring the raw waveform data; it depends on the specific implementation.

[0067] S11: Extract multidimensional feature vectors based on the original waveform data.

[0068] Among them, the multidimensional feature vector includes at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy.

[0069] Subsequently, multi-dimensional feature vectors are extracted based on the original waveform data. It is important to note that the multi-dimensional feature vectors include at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy. The voltage reference value reflects the actual operating level of the I / O port in steady state, used to determine if there are abnormal voltage levels such as short circuits to power or ground. Dynamic contact impedance reflects the contact state between the I / O port pins and external circuitry, used to identify increasing contact resistance caused by pin oxidation, loose connectors, etc. Edge slope reflects the driving capability and signal transition speed of the I / O port, used to detect switching characteristic degradation caused by aging of the drive circuit or abnormal load. Overshoot amplitude reflects the impedance matching state at the moment of signal transition, used to identify abnormal changes in port parasitic effects. Ringing energy reflects the energy intensity of the oscillation attenuation process after signal transition, used to distinguish between external interference coupling and hardware damage to the port itself. These data collectively reflect the steady-state operating point, port impedance characteristics, and dynamic switching behavior of the I / O port, forming a multi-dimensional data foundation covering all port operating conditions, thereby supporting the accurate identification of various fault modes such as short circuits, oxidation, and transient interference.

[0070] It should be noted that this embodiment does not impose restrictions on the extraction process of multidimensional feature vectors, and it depends on the specific implementation.

[0071] S12: Perform similarity matching between the multidimensional feature vector and the pre-stored healthy fingerprint baseline and typical faulty fingerprint to obtain similarity results.

[0072] Furthermore, the multidimensional feature vectors are matched with pre-stored health fingerprint baselines and typical fault fingerprints to obtain similarity results. The health fingerprint baseline refers to a multidimensional feature vector benchmark reflecting the normal state of the port, which is a full-characteristic scan and stored during the factory testing phase. It supports linear compensation for temperature changes to eliminate the influence of ambient temperature on diagnosis. The typical fault fingerprint refers to a feature vector template pre-calibrated for common fault modes such as short circuits, open circuits, and pin oxidation. It is used to match the residual feature vectors extracted in real time to determine the specific fault type.

[0073] In this embodiment, there are no restrictions on the similarity matching method. For example, Euclidean distance or cosine similarity can be calculated, depending on the specific implementation.

[0074] S13: Identify the current state of the IO port based on the similarity results.

[0075] The current state includes at least the normal state, the transient disturbance state, the early degradation state, and the hard fault state.

[0076] Finally, the current state of the I / O port is identified based on the similarity results, specifically whether the I / O port is in a normal state, a transient interference state, an early degradation state, or a hard fault state. It's worth noting that a normal state refers to a state where the real-time characteristics of the I / O port closely match the healthy baseline, and the port operates within its calibrated range. An early degradation state refers to an intermediate state where the port characteristics have deviated from the healthy baseline but have not yet completely failed, manifested as a slight increase in contact impedance or a gradual decrease in edge slope, indicating a trend of abnormality. A transient interference state refers to a non-continuous abnormal state where the port waveform undergoes temporary distortion due to external electromagnetic interference but recovers to normal within a preset time. A hard fault state refers to a continuous physical damage state where the port has suffered a short circuit, open circuit, or pin adhesion, which cannot be self-recovered. By accurately identifying early degradation, intermittent faults, etc., the drive strategy can be automatically adjusted, enabling the system to "survive with defects" and reduce functionality, maximizing the safe operation of the vehicle to the repair point. This embodiment does not limit the specific process of I / O port state identification; it depends on the specific implementation.

[0077] In this embodiment, by periodically acquiring the static voltage level of the IO port, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge, the limitations of relying solely on a single voltage threshold are avoided, providing a data foundation for multidimensional fault diagnosis. Based on this, a multidimensional feature vector containing voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy is extracted. This accurately captures weak features of early degradation and intermittent faults such as gradually increasing contact resistance and transient glitches, solving the problem that the static threshold method cannot identify fault precursors. During fault identification, the multidimensional feature vector is matched with the healthy fingerprint baseline and typical fault fingerprints for similarity. Based on the similarity results, four states are distinguished: normal, transient interference, early degradation, and hard fault. This avoids system shutdown or reset caused by false triggering of a single threshold under strong electromagnetic interference, significantly reducing the false alarm rate and improving the diagnostic reliability of automotive-grade MCUs under complex operating conditions.

[0078] Figure 3 A flowchart illustrating the fault analysis and self-healing process provided in this application embodiment. Figure 3 As shown, based on the above embodiments, in some embodiments, the raw waveform data of the IO port is collected according to a preset period, including:

[0079] S101: When the IO port is in a signal quiescent period, control the configurable IO drive array to inject a test stimulus of preset amplitude into the IO port.

[0080] S102: During the injection of test stimulus, the voltage response waveform of the IO port under test stimulus is acquired.

[0081] S103: When a signal transition occurs at the IO port, the transient waveform of the IO port is acquired.

[0082] S104: When no test stimulus is injected into the IO port and no signal transition occurs, the static voltage level of the IO port is acquired.

[0083] After periodic diagnostics are triggered, the intelligent IO diagnostic coprocessor monitors the signal status of the IO port. When the IO port is detected to be in the quiescent state, i.e., the steady-state region without level switching, the existing configurable IO driver array in the MCU is controlled to inject a small current pulse of preset amplitude into the IO port as a test excitation. At the same time, the voltage response waveform generated on the port due to the test excitation is synchronously acquired, which reflects the dynamic impedance characteristics of the port.

[0084] When a normal signal transition occurs at the I / O port, the coprocessor immediately captures and records the complete transient voltage waveform along the transition edge, including the transition process of the rising or falling edge. During the steady-state period when no test stimulus is injected into the I / O port and no signal transition occurs, the static voltage level of the port is acquired. The above acquisition actions are executed sequentially or in parallel within each preset cycle, and finally, the static voltage level, voltage response waveform, and transient waveform are used together as raw waveform data for subsequent feature extraction.

[0085] Based on the above embodiments, in some embodiments, multidimensional feature vectors are extracted based on the original waveform data, including:

[0086] S111: The original waveform data is buffered using a hardware FIFO and preprocessed using a moving average filtering algorithm.

[0087] S112: Calculate the arithmetic mean of the static voltage levels to obtain the voltage reference value.

[0088] S113: Calculate the dynamic contact impedance of the IO port based on the current amplitude and voltage change of the voltage response waveform corresponding to the test excitation.

[0089] S114: Based on the transient waveform, the time required for the waveform to rise from the first amplitude ratio to the second amplitude ratio is extracted as the edge slope, the difference between the peak value and the steady-state value of the waveform is extracted as the overshoot amplitude, and the ringing energy is obtained by integrating the oscillation waveform after overshoot.

[0090] S115: Combines voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy into a multi-dimensional feature vector.

[0091] After acquiring the raw waveform data, the data is first written to a hardware FIFO for buffering, and then a moving average filtering algorithm is used to remove high-frequency random noise from the raw waveform data to obtain smoothed waveform data S. smooth (t). In this embodiment, there is no restriction on the specific type of moving average filtering algorithm used; it depends on the specific implementation.

[0092] Next, based on the preprocessed original waveform data, the arithmetic mean of the flat-top region of the waveform is calculated to obtain the voltage reference value. The specific formula is as follows:

[0093] ;

[0094] Among them, V level Here, N is the voltage reference value, and S is the total number of sampling points. smooth (t i The voltage value at the i-th sampling time is the smoothed waveform voltage value after moving average filtering, taken from the sampling segment corresponding to the static voltage level in the original smoothed waveform data. It is important to note that the voltage reference value directly reflects the actual operating level of the I / O port under the current conditions. When a hard fault occurs at the port, such as a short circuit to power, a short circuit to ground, or an open circuit, the voltage reference value will deviate significantly from the expected range. Therefore, it is the most fundamental judgment basis in fault detection.

[0095] For the voltage response waveform acquired during the injection test excitation, the known current amplitude corresponding to the test excitation is obtained, the steady-state change of voltage before and after excitation is calculated, and finally the dynamic contact impedance is calculated based on the current amplitude and voltage change. The specific formula is as follows:

[0096] ;

[0097] Among them, R dyn For dynamic contact resistance, The voltage change is the amount of voltage change in the voltage response waveform. This represents the current amplitude. Dynamic contact impedance reflects the contact state between the I / O port pin and the external circuit. When pin oxidation, solder joint microcracks, or connector loosening cause the contact resistance to gradually increase, the dynamic contact impedance will experience a small but detectable shift. Therefore, it can detect early signs of degradation before hard failures occur and is a core indicator for distinguishing between normal and early degradation states.

[0098] The transient waveform is then processed, and the time required for the waveform to rise from the first amplitude ratio to the second amplitude ratio is extracted from the signal transition edge as the edge slope T. rThe edge slope reflects the driving capability of the I / O port driver circuit and the switching characteristics of the signal path. When the driver circuit ages, the power supply voltage drops, or the load capacitance increases abnormally, the edge slope will slow down significantly. Therefore, it is an important parameter for detecting port driving capability degradation and load abnormalities.

[0099] The difference between the peak value and the steady-state value of the waveform is further extracted as the overshoot amplitude V. overshoot The ringing energy E is obtained by integrating the oscillation waveform after overshoot. ringing Ringing energy E ringing The integral formula is as follows:

[0100] ;

[0101] Among them, t start t is the starting moment of integration, the time point after the overshoot peak and the first time the oscillation waveform falls back to near the steady-state value, i.e., the beginning moment of the damped oscillation phase; end The integration end time is the point in time when the oscillation amplitude continues to decay to a negligible noise level or below a preset stability threshold, i.e., the moment when the damped oscillation phase ends; V(t) is the transient waveform voltage value, which is the actual voltage value at time t in the transient waveform acquired at the signal transition edge.

[0102] It should be noted that the overshoot amplitude reflects the combined effect of impedance matching and parasitic effects such as parasitic inductance and capacitance in the I / O port signal path. When the overshoot amplitude increases abnormally, it indicates that the damping characteristics of the port have changed, which may be due to damage to the internal structure of the port, poor contact of external connectors, or load impedance mismatch. The ringing energy reflects the resonant characteristics of the port at high frequencies. The transient glitches generated by external electromagnetic interference coupling and the oscillations caused by damage to the port's own hardware differ significantly in energy distribution. Ringing energy can effectively distinguish between transient interference and actual physical damage to the port, thereby reducing the false alarm rate. It should be noted that this embodiment does not limit the magnitude of the first amplitude ratio and the second amplitude ratio; for example, the first amplitude ratio can be set to 10%, and the second amplitude ratio to 90%.

[0103] Finally, the above five feature values ​​are combined to form a multi-dimensional feature vector, which is then fed into the subsequent matching process. The multi-dimensional feature vector is specifically F... current ={V level ,R dyn ,T r V overshoot E ringing}

[0104] In this embodiment, by extracting the above five feature values ​​and combining them to form a multi-dimensional feature vector, it is possible to effectively identify complex fault modes such as early contact degradation, drive capability attenuation and transient electromagnetic interference based on the vector, thereby significantly improving the accuracy of fault detection.

[0105] Based on the above embodiments, in some embodiments, the multidimensional feature vector is matched with a pre-stored healthy fingerprint baseline and typical faulty fingerprints for similarity, including:

[0106] S121: Normalize the multidimensional feature vector with the healthy fingerprint baseline to generate a residual feature vector.

[0107] S122: Calculate the similarity between the residual feature vector and the typical fault fingerprint to obtain the similarity result.

[0108] To achieve fault matching, the effects of temperature drift must first be eliminated. Specifically, the current vector F current Compared with the pre-stored health fingerprint baseline vector F base Normalization is performed to generate residual feature vectors. The formula for the final dynamic fingerprint used to match fault types is as follows:

[0109] ;

[0110] Finally, the residual feature vectors are compared with typical fault fingerprints to obtain the similarity results. It should be noted that when using Euclidean distance, the final similarity result is the similarity between real-time fingerprint features and fault fingerprints.

[0111] Based on the above embodiments, in some embodiments, the current state of the I / O port is identified according to the similarity result, including:

[0112] S131: When the similarity result is greater than the first threshold, confirm that the IO port is in normal condition.

[0113] S132: When the similarity result is between the first threshold and the second threshold, it is confirmed that the IO port is in an early degradation state.

[0114] S133: When the similarity result is less than the second threshold, determine whether the waveform of the IO port recovers to the normal range within a preset time; if yes, confirm that the IO port is in a transient interference state; if no, confirm that the IO port is in a hard fault state.

[0115] The first threshold is greater than the second threshold.

[0116] To identify the current state of the I / O port, in this embodiment, when the similarity result is greater than a first threshold, the I / O port is confirmed to be in a normal state. When the similarity result is between the first and second thresholds, the I / O port is confirmed to be slightly abnormal, corresponding to an early degradation state, such as slight oxidation of the connector or microcracks in the solder joints. When the similarity result is less than the second threshold, the I / O port is confirmed to be significantly abnormal; at this time, it is determined whether the waveform of the I / O port recovers to the normal range within a preset time. If the abnormality is only manifested as transient spikes or glitches, and automatically falls back to the normal level range within a preset time (e.g., microseconds), it is determined to be waveform self-recovery and classified as external transient interference; if the abnormality is manifested as continuous level distortion, impedance abnormality, or signal loss, and fails to recover to the normal range within a preset time or within multiple consecutive diagnostic cycles, it is determined to be waveform non-self-recovery and classified as a physical hardware failure.

[0117] It is important to note that this embodiment does not impose restrictions on the magnitude of the first and second thresholds. For example, the first threshold can be set to 90% and the second threshold to 80%, as long as the first threshold is greater than the second threshold, depending on the specific implementation. This achieves accurate determination of the I / O port status, allowing for the adoption of different maintenance strategies based on the actual state of the I / O ports.

[0118] Based on the above embodiments, in some embodiments, after confirming that the I / O port is in a normal state, the method further includes:

[0119] S141: Calculate the weighted average of the current value of the healthy fingerprint baseline and the multidimensional feature vector according to the preset smoothing coefficient to generate the updated healthy fingerprint baseline.

[0120] S142: Write the updated health fingerprint baseline to non-volatile memory to replace the current value of the health fingerprint baseline.

[0121] To allow the system to adapt to the natural aging of the devices and prevent sensitivity drift caused by fixed thresholds, after confirming that the I / O ports are in normal condition, the health baseline can be further updated by a moving average using the current real-time data.

[0122] First, the old baseline is obtained. The system reads the health baseline feature vector from the fingerprint database for the previous period, denoted as F. old For example, the dynamic impedance baseline of the previous cycle. Simultaneously, the real-time multidimensional feature vector F, which is determined to be normal in the current cycle, is obtained. current A preset smoothing coefficient φ is then introduced. In this embodiment, the magnitude of the preset smoothing coefficient is not limited; for example, it can be between 0.01 and 0.1. The new baseline is calculated using the following formula:

[0123] ;

[0124] Among them, F new This is the updated health fingerprint baseline.

[0125] Finally, the calculated F new Write back to non-volatile memory, overwriting the old health fingerprint baseline, as the benchmark for the next cycle comparison.

[0126] It should also be noted that, since the preset smoothing coefficient 𝛼 is generally very small, the new health fingerprint baseline will only approach the current real-time data very slowly.

[0127] In this embodiment, updating the health fingerprint baseline when the I / O port status is confirmed to be normal effectively addresses aging and resists interference. That is, if the impedance of a device does experience a slight but continuous increase due to long-term use, the baseline will automatically "drift" to a new normal value after thousands of iterations, thus preventing the system from falsely reporting "poor contact." If real-time data suddenly becomes an abnormal value due to external interference, because the preset smoothing coefficient φ is very small, other effects on the baseline are negligible, and the baseline remains stable, ensuring the robustness of the diagnosis.

[0128] Furthermore, current I / O port fault detection lacks adaptive and self-healing capabilities, often resorting to a "one-size-fits-all" approach of shutting down the port. It fails to attempt degraded operation or dynamically adjust driver parameters to maintain basic functionality based on the fault type. Therefore, to address this issue, in some embodiments, the method further includes, based on the above embodiments:

[0129] S151: When it is confirmed that the IO port is in an early degradation state, increase the drive current of the IO port and / or extend the debouncing time or sample-and-hold time of the IO port.

[0130] S152: When it is confirmed that the IO port is in a transient interference state, disable the current fault alarm and adjust the cutoff frequency of the digital filter of the IO port.

[0131] S153: When it is confirmed that the IO port is in a hard fault state, shut down the IO port drive circuit, and if there is a backup port for the IO port, switch the internal logical route to the backup port.

[0132] Specifically, when an early degradation state is detected, the system does not immediately report an error and shut down. Instead, it enhances the drive, automatically fine-tuning the output current of the I / O driver or reducing the pull-up / pull-down resistor values ​​to compensate for the increased contact resistance. Simultaneously, it relaxes timing, appropriately extending the signal debounce time or sample-and-hold time to ensure signal stability. Finally, it logs a "maintenance warning" level fault code (DTC) in the background, prompting the user to check during the next maintenance, but without affecting current driving. It then enters continuous monitoring; if the trend worsens, it escalates the process; if it recovers, it reverts to normal baseline updates.

[0133] When it is confirmed that the IO port is in a state of transient interference, ignore this alarm to avoid false triggering, and dynamically adjust the cutoff frequency of the digital filter to suppress this type of interference, and the process ends.

[0134] When an I / O port is confirmed to be in a hard fault state, the drive circuit of the faulty pin is immediately shut down to prevent overcurrent damage to the internal structure of the MCU. If the signal has an associated backup pin, the hardware switch automatically switches to the backup path. An ASIL-D level fault is reported to the main core, triggering a vehicle safety state (such as limp mode). Finally, the system enters a safety state, ensuring the vehicle operates safely to the minimum extent possible under fault conditions, and the process ends. In this way, through a three-level self-healing mechanism, the reliability and availability of automotive-grade MCUs under complex operating conditions are maximized.

[0135] In the above embodiments, the IO fault determination method has been described in detail. This application also provides embodiments of the IO fault determination device.

[0136] Figure 4 This is a schematic diagram of an I / O fault determination device provided in an embodiment of this application. The device is applied to an intelligent I / O diagnostic coprocessor within an MCU; such as... Figure 4 As shown, the device includes:

[0137] The acquisition module 10 is used to acquire raw waveform data of the IO port according to a preset period; wherein the raw waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge.

[0138] The feature extraction module 11 is used to extract multi-dimensional feature vectors based on the original waveform data; wherein, the multi-dimensional feature vectors include at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude and ringing energy.

[0139] The matching module 12 is used to perform similarity matching between the multidimensional feature vector and the pre-stored healthy fingerprint baseline and typical fault fingerprint to obtain similarity results.

[0140] The identification module 13 is used to identify the current state of the IO port based on the similarity result; wherein the current state includes at least the normal state, the transient interference state, the early degradation state, and the hard fault state.

[0141] In some embodiments, the acquisition module 10 includes:

[0142] The control submodule is used to control the configurable IO drive array to inject a test stimulus of preset amplitude into the IO port when the IO port is in a signal quiescent period.

[0143] The first acquisition submodule is used to acquire the voltage response waveform of the IO port under the test stimulus during the injection of test stimulus;

[0144] The second acquisition submodule is used to acquire the transient waveform of the IO port when a signal transition occurs at the IO port;

[0145] The third acquisition submodule is used to acquire the static voltage level of the IO port when no test stimulus is injected into the IO port and no signal transition occurs.

[0146] In some embodiments, the feature extraction module 11 includes:

[0147] The preprocessing module is used to buffer the raw waveform data using a hardware FIFO and preprocess the raw waveform data using a moving average filtering algorithm.

[0148] The first calculation submodule is used to perform an arithmetic average calculation on the static voltage level to obtain the voltage reference value;

[0149] The second calculation submodule is used to calculate the dynamic contact impedance of the IO port based on the current amplitude and voltage change of the voltage response waveform corresponding to the test excitation.

[0150] The third calculation submodule is used to extract the time required for the waveform to rise from the first amplitude ratio to the second amplitude ratio based on the transient waveform as the edge slope, extract the difference between the peak value and the steady-state value as the overshoot amplitude, and perform integral calculation on the oscillation waveform after overshoot to obtain the ringing energy.

[0151] The feature merging submodule is used to combine voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude and ringing energy into a multi-dimensional feature vector.

[0152] In some embodiments, the matching module 12 includes:

[0153] The normalization module is used to normalize the multidimensional feature vector with the health fingerprint baseline to generate a residual feature vector.

[0154] The similarity calculation module is used to calculate the similarity between the residual feature vector and the typical fault fingerprint to obtain the similarity result.

[0155] In some embodiments, the identification module 13 includes:

[0156] The first identification submodule is used to confirm that the IO port is in normal condition when the similarity result is greater than the first threshold.

[0157] The second identification submodule is used to confirm that the IO port is in an early degradation state when the similarity result is between the first threshold and the second threshold.

[0158] The third identification submodule is used to determine whether the waveform of the IO port recovers to the normal range within a preset time when the similarity result is less than the second threshold; if yes, it confirms that the IO port is in a transient interference state; if no, it confirms that the IO port is in a hard fault state.

[0159] The first threshold is greater than the second threshold.

[0160] In some embodiments, it also includes:

[0161] The update submodule is used to calculate the weighted average of the current value of the health fingerprint baseline and the multidimensional feature vector based on the preset smoothing coefficient, and generate the updated health fingerprint baseline.

[0162] The storage submodule is used to write the updated health fingerprint baseline to non-volatile memory to replace the current value of the health fingerprint baseline.

[0163] In some embodiments, it also includes:

[0164] The first adjustment module is used to increase the drive current of the IO port and / or extend the debouncing time or sample-and-hold time of the IO port when it is confirmed that the IO port is in an early degradation state.

[0165] The second adjustment module is used to block the fault alarm and adjust the cutoff frequency of the digital filter of the IO port when it is confirmed that the IO port is in a transient interference state.

[0166] The third adjustment module is used to shut down the drive circuit of the IO port when it is confirmed that the IO port is in a hard fault state, and to switch the internal logical route to the backup port when there is a backup port for the IO port.

[0167] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0168] Figure 5This is a structural diagram of an I / O fault determination device provided in an embodiment of this application. Figure 5 As shown, the I / O fault determination device includes:

[0169] Memory 20 is used to store computer programs;

[0170] The processor 21 is configured to implement the steps of the IO fault determination method mentioned in the above embodiments when executing a computer program.

[0171] The IO fault determination device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0172] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0173] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the IO fault determination method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the IO fault determination method.

[0174] In some embodiments, the IO fault determination device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0175] Those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the I / O fault determination device and may include more or fewer components than illustrated.

[0176] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.

[0177] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0178] The foregoing provides a detailed description of an I / O fault determination method, apparatus, device, and medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

[0179] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for determining I / O faults, characterized in that, A smart I / O diagnostic coprocessor applied within an MCU; the method includes: The raw waveform data of the I / O port is collected according to a preset period; wherein, the raw waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge; A multidimensional feature vector is extracted based on the original waveform data; wherein the multidimensional feature vector includes at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy; The multidimensional feature vector is matched with the pre-stored healthy fingerprint baseline and typical fault fingerprints to obtain similarity results; The current state of the IO port is identified based on the similarity results; wherein the current state includes at least the normal state, the transient interference state, the early degradation state, and the hard fault state.

2. The I / O fault determination method according to claim 1, characterized in that, Raw waveform data from the I / O ports is collected according to a preset period, including: When the IO port is in a signal quiescent period, the configurable IO drive array is controlled to inject the test stimulus of a preset amplitude into the IO port; During the injection of the test stimulus, the voltage response waveform of the IO port under the test stimulus is acquired; When a signal transition occurs at the I / O port, the transient waveform of the I / O port is acquired; When the test stimulus is not injected into the IO port and no signal transition occurs, the static voltage level of the IO port is acquired.

3. The I / O fault determination method according to claim 1, characterized in that, Extracting multidimensional feature vectors based on the original waveform data includes: The original waveform data is buffered using a hardware FIFO, and a moving average filtering algorithm is used to preprocess the original waveform data. The static voltage level is calculated by arithmetic mean to obtain the voltage reference value; The dynamic contact impedance of the IO port is calculated based on the current amplitude corresponding to the test excitation and the voltage change of the voltage response waveform. Based on the transient waveform, the time required for the waveform to rise from the first amplitude ratio to the second amplitude ratio is extracted as the edge slope, the difference between the peak value and the steady-state value of the waveform is extracted as the overshoot amplitude, and the ringing energy is obtained by integrating the oscillation waveform after overshoot. The voltage reference value, the dynamic contact impedance, the edge slope, the overshoot amplitude, and the ringing energy are combined into the multidimensional feature vector.

4. The I / O fault determination method according to claim 1, characterized in that, The multidimensional feature vector is matched with a pre-stored healthy fingerprint baseline and typical faulty fingerprints based on similarity, including: The multidimensional feature vector is normalized with the healthy fingerprint baseline to generate a residual feature vector; The similarity between the residual feature vector and the typical fault fingerprint is calculated to obtain the similarity result.

5. The I / O fault determination method according to claim 4, characterized in that, Identifying the current state of the I / O port based on similarity results includes: When the similarity result is greater than the first threshold, it is confirmed that the IO port is in the normal state; When the similarity result is between the first threshold and the second threshold, it is confirmed that the IO port is in the early degradation state; When the similarity result is less than the second threshold, it is determined whether the waveform of the IO port recovers to the normal range within a preset time. If so, then confirm that the IO port is in the transient interference state; If not, then confirm that the IO port is in the hard fault state; Wherein, the first threshold is greater than the second threshold.

6. The I / O fault determination method according to claim 5, characterized in that, After confirming that the IO port is in the normal state, the process also includes: The current value of the health fingerprint baseline and the multidimensional feature vector are weighted and averaged according to a preset smoothing coefficient to generate an updated health fingerprint baseline. The updated health fingerprint baseline is written to non-volatile memory to replace the current value of the health fingerprint baseline.

7. The I / O fault determination method according to any one of claims 1 to 6, characterized in that, Also includes: When it is confirmed that the IO port is in the early degradation state, increase the drive current of the IO port and / or extend the debouncing time or sample-and-hold time of the IO port; When it is confirmed that the IO port is in the transient interference state, the fault alarm is blocked and the cutoff frequency of the digital filter of the IO port is adjusted. When it is confirmed that the IO port is in the hard fault state, the driver circuit of the IO port is turned off, and if there is a backup port for the IO port, the internal logical routing is switched to the backup port.

8. An I / O fault determination device, characterized in that, A smart I / O diagnostic coprocessor applied within an MCU; the device includes: The acquisition module is used to acquire raw waveform data of the IO port according to a preset period; wherein, the raw waveform data includes at least the static voltage level, the voltage response waveform under injected test excitation, and the transient waveform of the signal transition edge; The feature extraction module is used to extract multi-dimensional feature vectors based on the original waveform data; wherein, the multi-dimensional feature vectors include at least the voltage reference value, dynamic contact impedance, edge slope, overshoot amplitude, and ringing energy; The matching module is used to perform similarity matching between the multidimensional feature vector and the pre-stored healthy fingerprint baseline and typical fault fingerprints to obtain similarity results; The identification module is used to identify the current state of the IO port based on the similarity result; wherein the current state includes at least the normal state, the transient interference state, the early degradation state, and the hard fault state.

9. An I / O fault determination device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the I / O fault determination method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the I / O fault determination method as described in any one of claims 1 to 7.