Resetting method and system for reading abnormity of SD (Secure Digital) card
By employing a multi-level adaptive reset method and intelligent cache synchronization, the low success rate of existing SD card reset methods has been resolved, achieving more efficient and accurate SD card reset and data protection.
Patent Information
- Application Number
- CN202610063972.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-19
AI Technical Summary
Existing reset methods for SD card read errors cannot differentiate between specific causes, resulting in a low reset success rate and an inability to adapt to changes in different models, environments, and abnormal situations, increasing system overhead and time costs.
A multi-level adaptive reset method is adopted, which combines machine learning algorithms and big data analysis to dynamically adjust reset parameters and strategies, including soft reset, hard reset and deep reset. Combined with environmental awareness and multi-dimensional monitoring, the reset process is optimized, and data integrity is ensured through intelligent cache synchronization and data repair strategies.
It improves the success rate and accuracy of SD card reset, reduces equipment downtime, ensures data integrity, and enhances the system's adaptability and intelligence.
Smart Images

Figure CN121542093A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of storage card reset, in particular to a reset method and system for SD card reading abnormity. BACKGROUND
[0002] With the rapid development of automotive electronics, industrial control and other fields, SD cards, as a common data storage medium, are widely used in various devices. In the scenarios of in-vehicle infotainment systems, data recording devices, etc., the stable operation of SD cards is crucial. However, in actual use, SD cards may malfunction due to various reasons, such as electrical abnormalities, environmental interference, software errors, etc., resulting in the device being unable to normally identify or read and write data.
[0003] A patent with patent publication number CN108073462A discloses a reset method and system for SD card reading abnormity. The method includes: the SD card reset circuit detects that the SD card is inserted into the vehicle-mounted electronic device, and sends a low-level signal to the CPU; the CPU reads the SD card data and compares the read SD card data with the internal cache, and when the data is not updated, sends a low-level reset signal to the SD card reset circuit; the SD card reset circuit powers off the SD card; the SD card reset circuit sends a high-level signal to the CPU; the CPU sends a high-level signal to the SD card reset circuit; the SD card reset circuit powers on the SD card, and determines that the SD card is inserted into the vehicle-mounted electronic device. The technical solution points are: a software and hardware combined mode is adopted, software triggering is performed by the CPU, the SD card reset circuit is controlled to execute, so as to simulate physical plugging and unplugging of the SD card to re-identify and read data under the condition that the actual input of the SD card exists and the power supply is normal, and the anti-interference ability of the SD card is improved.
[0004] However, the above-mentioned technology often has the following defects: the existing method only uses a fixed reset method, such as directly restarting or sending a simple soft reset command, without distinguishing and processing according to the specific reason of the exception, and using the relatively rough power-off restart method may cause the loss of data being processed, and cannot effectively solve the fault of the logic layer, thereby increasing unnecessary system overhead and time cost, and the existing reset method often uses fixed parameters, such as fixed power-off / power-on delay time, fixed monitoring frequency, etc., when performing the reset operation, however, different types of SD cards, different use environments and different abnormal conditions have different requirements for reset parameters, and the fixed parameters cannot adapt to these changes, resulting in poor reset effect and low reset success rate; on the other hand, the existing method cannot dynamically adjust the reset strategy according to the change of environmental parameters, that is, in high or low temperature environment, the performance of the SD card will be affected, and the probability and type of abnormality may be different, but the existing method still performs reset according to the normal strategy, and cannot be optimized according to the change of environment, thereby reducing the accuracy and success rate of reset.
[0005] Therefore, the present application provides a reset method and system for SD card reading exception. SUMMARY
[0006] In order to make up for the deficiencies of the prior art and solve at least one technical problem proposed in the background art.
[0007] The technical scheme adopted by the present application to solve its technical problems is: the reset method for SD card reading exception provided by the present application comprises the following steps: S1, multi-stage adaptive reset step: First level soft reset: when the SD card exception is detected, the historical abnormal data of the SD card is analyzed based on a machine learning algorithm to predict the cause of the current exception, if the logic layer is predicted to be abnormal, a CMD0 reset command is sent to the SD card, only the logic layer is reset and the power is not turned off, and a dynamic monitoring frequency adjustment strategy is used to monitor the CMD line response signal, within 40-60ms after sending the reset command, the monitoring frequency is 3-8ms per time, and if no response is received, the monitoring frequency is 5-10ms per time; if the response signal is successfully received, it is determined that the reset is successful and the data transmission is restored; Second level hard reset: if the first level soft reset fails, the power-off / power-on process parameters are dynamically adjusted based on the SD card model and historical hard reset data, the power-off / power-on process is executed, and the power is turned on again after a delay of 50-100ms after power-off, and a multi-parameter fusion monitoring method is used to monitor the power-on current fluctuation, which comprehensively judges the current change rate, current peak value and current stabilization time; if the current is within the preset threshold range and the CMD line recovers response, it is determined that the reset is successful; Level 3 Deep Reset: If a Level 2 hard reset fails, the delay time is dynamically adjusted based on environmental perception data, with a delay of 10+. A few seconds later, the mechanical structure of the card slot is controlled by an electromagnet or motor to simulate the manual insertion and removal of an SD card. Multi-dimensional monitoring is used to monitor the current and CMD line response, including the instantaneous value, average value, and fluctuation range of the current, as well as the amplitude, frequency, and phase of the CMD line signal. If the process still fails, a fault is reported. The acquisition process involves first collecting environmental parameters such as temperature and electromagnetic interference intensity using various environmental sensors; then inputting these parameters into a pre-built data analysis model, which comprehensively considers the influence weights of different environmental parameters on SD card reset and the correspondence between each parameter and the appropriate delay time in historical data; finally, the model calculates and processes the data to obtain the desired result. Calculated based on environmental perception data; S2. Dynamic adjustment steps: Record the type and success rate of each reset, and use big data analysis technology to establish a correlation model between the reset success rate and environmental parameters. When historical data shows that the success rate of a certain level of reset exceeds the preset threshold, the reset of that level will be performed first when the same or similar environmental parameters are abnormal.
[0008] A further improvement of the present invention is that the data transmission recovery step includes: before reset, synchronizing key metadata of the SD card through a cache, the key metadata including the file system FAT table, root directory entries, or the SHA-256 hash value of a user-specified file; the intelligent cache synchronization strategy dynamically adjusts the synchronization cycle according to the usage frequency and data change frequency of the SD card, shortening the synchronization cycle for frequently used SD cards or areas with frequent data changes; after a successful reset, the key metadata is recovered from the cache first; after reset, the hash value of the user-specified file is recalculated and compared with the cached value, that is, multiple CPU cores are used simultaneously for hash calculation, and if they are inconsistent, a data repair process is triggered. This intelligent data repair process selects different repair algorithms according to the type and degree of data corruption, that is, backup-based repair is used for minor metadata corruption, and reconstruction repair based on redundant data is used for severe file content corruption.
[0009] A further improvement of the present invention is that the cache synchronization adopts a dynamic update strategy: when the SD card is working normally, the CPU synchronizes key metadata to the cache at a preset time interval and records the synchronization timestamp; when the system load is high, the synchronization time interval is appropriately extended; when a specific data access pattern is detected, the synchronization time interval is shortened, the timestamp is checked before reset, and if the cache has not expired and the probability of data change during the reset period is predicted to be lower than a preset value based on the data access history, the data comparison step is skipped.
[0010] A further improvement of the present invention is that a soft-start circuit is used in the power-off / power-on process: a MOSFET and an RC filter circuit are connected in series in the SD card power path. The intelligent RC filter circuit can dynamically adjust the RC parameters according to the real-time current demand of the SD card and the power supply voltage fluctuation, so as to achieve linear voltage boost / buck within 10ms and avoid current surges. The timing starting point of the 10-second delay is the moment of failure of the secondary hard reset. During the timing period, the SD card is kept in a power-off state. The timing is based on the discharge characteristics of the 100μF energy storage capacitor in the SD card power path and the influence of ambient temperature on capacitor discharge. Through experimental modeling, the time to discharge to the safe voltage threshold is determined to be 9.8 seconds. After reserving a safety margin of 0.2 seconds, it is set to 10 seconds.
[0011] A further improvement of the present invention is that it also includes a fault monitoring step: monitoring current fluctuations by a voltage / current sensor integrated into the reset circuit. The intelligent voltage / current sensor has self-diagnosis and adaptive calibration functions and can automatically adjust the monitoring accuracy according to environmental changes and the sensor's own state. If the current is continuously lower than the lower threshold or exceeds the upper threshold during power-on, it is determined to be a reset failure and the next level of reset is triggered. By capturing the CLK and CMD line signals of the SD card and monitoring the communication protocol layer, the intelligent signal analysis algorithm can identify minor anomalies and potential fault modes in the signal. If the CMD8 or ACMD41 response signal is not detected within a preset time, it is determined to be a hardware fault and reported to the host system. At the same time, it provides a preliminary diagnosis of the cause of the fault based on historical fault data and current signal characteristics.
[0012] A further improvement of the present invention is that an ESD protection module is provided at the SD card interface. The ESD protection module includes a TVS diode and a polymer tantalum capacitor, as well as an intelligent control circuit. The intelligent control circuit can monitor the voltage and current changes at the interface in real time and automatically adjust the operating parameters of the TVS diode and the polymer tantalum capacitor according to the characteristics of static electricity and voltage spikes, so as to achieve more effective suppression of static electricity and voltage spikes.
[0013] A further improvement of the present invention is that: the three-level deep reset reports the fault and triggers a user intervention process at the same time. The process includes: prompting fault information through the vehicle display screen. The intelligent prompting strategy displays the fault information in text, icons, voice and priority according to the user's operating habits and historical fault handling records; and provides a physical reset button. The user presses and holds the button for a preset time to trigger a deep reset. At the same time, the user's intervention operation and reset result are recorded for subsequent fault analysis and strategy optimization.
[0014] A further improvement of the present invention is that it also includes a black box log recording step: recording reset history data in a non-volatile memory, wherein the history data includes reset time, reset type, reset result, environmental parameters during reset, and key signal waveforms during the reset process; The non-volatile memory is EEPROM. The reset history data is classified and cyclically overwritten according to time order and importance, with important fault data and key environmental parameter data being retained first.
[0015] A further improvement of the present invention is that the preset threshold is a threshold dynamically determined based on big data analysis and machine learning algorithms. This threshold is adjusted in real time according to the usage scenario, model and historical fault data of the SD card. When the historical success rate of a certain level of reset exceeds the dynamic threshold, the reset of that level will be performed first in subsequent abnormal situations.
[0016] A reset system for SD card read error, applied to the aforementioned SD card read error reset method, includes: a detection module, a multi-level reset control module, a dynamic strategy module, a data protection module, a security protection module, and a user interaction module; Detection module: Used to detect the insertion status of the SD card, including level detection circuit, current sensor and environmental sensing sensor, the output is connected to the CPU, and can collect the electrical status and environmental parameters of the SD card in real time; Multi-level reset control module: Level 1 Reset Unit: Implements soft reset by sending CMD0 command through SDIO interface, and also has the function of dynamically adjusting monitoring frequency; Secondary reset unit: controls the MOSFET switching circuit to perform power-off / power-on hard reset. The delay time is dynamically adjusted according to the SD card model and historical data. A smart RC filter circuit is used to achieve linear voltage rise and fall. Three-level reset unit: drives an electromagnet or stepper motor to simulate manual insertion and removal, and the delay time is dynamically adjusted according to environmental sensing data, with multi-dimensional monitoring function; Dynamic Strategy Module: A non-volatile memory that stores historical reset records, using big data analysis and machine learning algorithms to dynamically select reset priorities based on success rate and environmental parameters; Data protection module: Cache unit: Stores the SD card FAT table and key data hash values SHA-256, and has an intelligent cache synchronization strategy; Comparison Unit: Before reset, it verifies the timeliness of cached data and intelligently determines whether to skip the data comparison step based on data access history and system status; Security protection module: Soft-start circuit: integrates RC filter and MOSFET to achieve 10ms linear voltage rise and fall, and has adaptive adjustment function; ESD protection circuit: TVS diodes and tantalum capacitors are connected in parallel to the SD card interface, and intelligent control circuitry is used to achieve dynamic protection. User interaction module: includes in-vehicle display screen, LED indicator lights and physical reset button. The in-vehicle display screen has intelligent prompt function and records user intervention operations and reset results for subsequent analysis and optimization.
[0017] The beneficial effects of this invention are as follows: 1. Employing a multi-level reset control module and leveraging big data analytics, the system can formulate precise operating parameters for each reset level based on multi-dimensional information such as historical anomaly data of the SD card, model information, and environmental perception data. In the first-level soft reset, machine learning algorithms analyze historical anomaly data to accurately predict the cause of the current anomaly, sending targeted reset commands and employing a dynamic monitoring frequency adjustment strategy to ensure that response signals are obtained at the optimal time, improving the reset success rate. The second-level hard reset and the third-level deep reset also dynamically adjust key parameters such as power-off / power-on process parameters and delay time based on big data, making the reset operation more aligned with actual needs, avoiding the time and resource waste caused by blind resets, thereby shortening the reset time and improving the overall reset efficiency. Secondly, the system uses big data analytics to establish a correlation model between reset success rate and environmental parameters. Based on the relationship between the reset success rate of a certain level and environmental parameters in historical data, when the same or similar environmental parameters are abnormal in the future, the reset level with the higher success rate is prioritized. This dynamic adjustment mechanism allows the system to automatically optimize the reset strategy according to the actual situation without manual intervention, improving the system's adaptability and intelligence level, and further enhancing the accuracy and success rate of the reset. 2. The system employs an intelligent caching synchronization strategy to dynamically adjust the synchronization cycle, ensuring the secure storage of critical metadata. Simultaneously, after a reset, it recalculates the hash value of the user-specified file and compares it with the cached value. Based on the type and extent of data corruption, and leveraging accumulated repair experience from big data, it selects different repair algorithms for intelligent data repair, effectively ensuring data integrity and accuracy and reducing the risk of data loss. Furthermore, through intelligent voltage / current sensors and intelligent signal analysis algorithms integrated into the reset circuit, and utilizing big data to learn various fault modes and signal characteristics, the system can monitor current fluctuations and communication protocol layer signals in real time and accurately. Moreover, by analyzing a large amount of historical fault data and current signal characteristics, the system can not only quickly determine whether the reset was successful but also perform preliminary hardware fault diagnosis and provide detailed fault information. This provides users and maintenance personnel with strong decision-making support, helping to resolve problems promptly and reduce equipment downtime. Attached Figure Description
[0018] The invention will now be further described with reference to the accompanying drawings.
[0019] Figure 1 This is a flowchart of the reset method of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figure 1 , This embodiment provides a method for resetting an SD card read error, including the following steps: S1. Multi-level adaptive reset steps: Level 1 Soft Reset: The level detection circuit, current sensor, and environmental perception sensor in the detection module collect the electrical status and environmental parameters of the SD card in real time and transmit the data to the CPU. When the CPU detects an SD card anomaly, it uses machine learning algorithms to learn and analyze historical anomaly data of the SD card to predict the cause of the anomaly. If the anomaly is predicted to be a logic layer anomaly, the CPU sends a CMD0 reset command to the SD card through the SDIO interface, resetting only the logic layer without interrupting power. Simultaneously, a dynamic monitoring frequency adjustment strategy is used to monitor the CMD line response signal. Monitoring is performed every 3-8 ms for the first 40-60 ms after sending the reset command. If no response is received thereafter, monitoring continues at a frequency of every 5-10 ms. If a response signal is successfully received, the reset is considered successful, and the CPU resumes data transmission. Alternatively, a decision tree model can be used to learn the characteristics of logic layer anomalies and non-logic layer anomalies from a large amount of historical anomaly data to construct a decision tree structure, accurately predicting the cause of the current anomaly. Meanwhile, when using a dynamic monitoring frequency adjustment strategy to monitor the CMD line response signal, the specific judgment conditions for monitoring at different frequencies are clearly defined. For example, if no response signal is received for three consecutive times within the first 40-60ms after sending a reset command, the monitoring frequency is switched to every 5-10 milliseconds / time to continue monitoring.
[0022] Level 2 Hard Reset: If the Level 1 soft reset fails, the CPU dynamically adjusts the power-off / power-on process parameters based on the SD card model and historical hard reset data. The power-off / power-on process is executed by controlling the MOSFET switching circuit, with a 50-100ms delay before power-on. A multi-parameter fusion monitoring method is used to monitor power-on current fluctuations, combining current change rate, peak current, and current stabilization time for comprehensive judgment. If the current is within a preset threshold range and the CMD line recovers its response, the reset is considered successful. During the power-off / power-on process, a soft-start circuit is used, connecting a MOSFET and an RC filter circuit in series in the SD card power path. The intelligent RC filter circuit dynamically adjusts the RC parameters based on the SD card's real-time current requirements and power supply voltage fluctuations, achieving linear voltage boost / buck within 10ms to avoid current surges. For example, for a certain brand's Model A SD card, the power-off delay might be 60-80ms, and the power-on delay 30-50ms; for Model B SD cards, the power-off delay might be 70-90ms, and the power-on delay 40-60ms, etc. At the same time, the specific judgment criteria for current change rate, current peak value, and current stabilization time in the multi-parameter fusion monitoring method are explained in detail. For example, the current change rate should be kept within a certain range during normal reset, and if it exceeds the range, it is judged as abnormal; the current peak value should be between the preset upper and lower limits; and the current stabilization time should reach a stable state within a specified time.
[0023] Level 3 Deep Reset: If a Level 2 hard reset fails, the CPU dynamically adjusts the latency based on environmental awareness data, with a latency of 10+. A few seconds later, the mechanical structure of the card slot is controlled by an electromagnet or motor to simulate inserting and removing an SD card. Multi-dimensional monitoring is used to monitor the current and CMD line response, including the instantaneous value, average value, and fluctuation range of the current, as well as the amplitude, frequency, and phase of the CMD line signal. If the process still fails, a fault is reported. The acquisition process involves first collecting environmental parameters such as temperature, electromagnetic interference intensity, and humidity using various environmental sensors; then, inputting these parameters into a pre-built data analysis model. The model comprehensively considers the impact weights of different environmental parameters on SD card reset, as well as the correspondence between each parameter and the appropriate delay time in historical data; finally, the model calculates and processes the data to obtain... For example, assuming the current measured temperature is 35℃ and the electromagnetic interference intensity is 8, that is... =30℃, =20℃, and the weight of temperature was determined through experiments and empirical analysis. =0.6, weight of electromagnetic interference intensity =0.4, then the degree of temperature deviation ; =10, =0, then the degree of deviation of electromagnetic interference intensity =0.3; Overall impact value =0.6×1+0.4×0.3=0.6+0.12=0.72, that is, under the environmental conditions of a current temperature of 35℃ and an electromagnetic interference intensity of 8, based on the assumed model and data, The value is 7.2 seconds, meaning the delay time before simulating manual insertion and removal of the SD card is 10 + 7.2 = 17.2 seconds. After 17.2 seconds (the timing starts at the moment of failure of the secondary hard reset, and the SD card remains powered off during the timing period, based on the discharge characteristics of the 100μF energy storage capacitor in the SD card power path and the influence of ambient temperature on capacitor discharge, the time to discharge to the safe voltage threshold is determined to be 9.8 seconds through experimental modeling, and set to 10 seconds after reserving a 0.2-second safety margin), the mechanical structure of the card slot is controlled by an electromagnet or motor to simulate manual insertion and removal of the SD card. A multi-dimensional monitoring method is used to monitor the current and CMD line response, including monitoring the instantaneous value, average value, and fluctuation range of the current, as well as the amplitude, frequency, and phase of the CMD line signal. If the attempt still fails, a fault is reported. Furthermore, when the temperature is high, the performance of the internal components of the SD card may be affected, and the delay time needs to be appropriately extended to ensure safe reset. When the electromagnetic interference intensity is high, the delay time may also need to be adjusted to avoid the interference affecting the reset process. At the same time, the specific implementation method of simulating manual insertion and removal of SD cards by driving the mechanical structure of the card slot with an electromagnet or motor is described in detail, including the selection of electromagnet or motor, the design of control circuit, etc.
[0024] S2. Dynamic adjustment steps: Record the type and success rate of each reset, and use big data analysis technology to establish a correlation model between the reset success rate and environmental parameters. For example, use the Hadoop big data platform for data storage and processing, and use regression analysis algorithms in machine learning to establish a correlation model. When historical data shows that the success rate of a certain level of reset exceeds a preset threshold (this preset threshold is dynamically determined based on big data analysis and machine learning algorithms, and is adjusted in real time according to factors such as the usage scenario, model, and historical fault data of the SD card), this level of reset will be performed first when the same or similar environmental parameters are abnormal. S3. Data transmission recovery steps: Cache Synchronization: Before reset, critical metadata of the SD card is synchronized via cache. This critical metadata includes the file system FAT table, root directory entries, or the SHA-256 hash value of user-specified files. An intelligent cache synchronization strategy is employed, dynamically adjusting the synchronization cycle based on the SD card's usage frequency and data change frequency. For frequently used SD cards or areas with frequent data changes, the synchronization cycle is shortened. When the SD card is working normally, the CPU synchronizes critical metadata to the cache at preset time intervals and records the synchronization timestamp. When the system load is high, the synchronization time interval is appropriately extended; when a specific data access pattern is detected, the synchronization time interval is shortened. Before reset, the timestamp is checked. If the cache has not expired and the probability of data change during the reset period is predicted to be lower than a preset value based on data access history, the data comparison step is skipped. For example, the usage frequency is calculated by recording the number of read / write operations and the time intervals of the SD card, and the data change frequency is determined by comparing the data content at different time points. In addition, it describes in detail how to adjust the synchronization time interval when the system load is high and a specific data access pattern is detected; for example, when the system CPU utilization exceeds 80%, the synchronization time interval is extended to twice the original; when an access pattern of continuously reading a large amount of data in a certain area is detected, the synchronization time interval for that area is shortened to 0.5 times the original. Data recovery and repair: After a successful reset, key metadata is recovered from the cache first. After the reset, the hash value of the user-specified file is recalculated and compared with the cached value. At the same time, multiple CPU cores are used to perform hash calculation. If they are inconsistent, the data repair process is triggered. This intelligent data repair process selects different repair algorithms according to the type and degree of data corruption. For minor metadata corruption, backup-based repair is used, and for severe file content corruption, reconstruction repair based on redundant data is used. Furthermore, backup data can be periodically stored on other storage devices within the system, and redundant data can be generated using RAID technology or data encoding algorithms. The document also explains how to accurately select different repair algorithms based on the type and extent of data corruption, such as analyzing data checksums, hash values, and other characteristics to determine the type and extent of corruption, and then selecting the appropriate repair algorithm. S4. Fault Monitoring Steps Current monitoring: Current fluctuations are monitored by a voltage / current sensor integrated into the reset circuit. The intelligent voltage / current sensor has self-diagnostic and adaptive calibration functions, and can automatically adjust the monitoring accuracy according to environmental changes and the sensor's own state. If the current remains below the lower threshold or exceeds the upper threshold during power-on, it is determined as a reset failure and triggers the next level of reset. For example, the sensor periodically performs internal circuit checks and signal quality assessments. When an anomaly is detected, an alarm is issued and fault information is recorded. The specific implementation method of adaptive calibration is described in detail, such as automatically adjusting the sensor's measurement parameters according to changes in ambient temperature, humidity, and other parameters to ensure measurement accuracy.
[0025] Communication protocol layer monitoring: By capturing the CLK and CMD line signals of the SD card, the communication protocol layer is monitored. The intelligent signal analysis algorithm can identify minor anomalies and potential fault modes in the signal. If the CMD8 or ACMD41 response signal is not detected within the preset time, it is determined to be a hardware fault and reported to the host system. At the same time, a preliminary diagnosis of the fault cause is provided based on historical fault data and current signal characteristics. Furthermore, the characteristics of common minor anomalies and potential fault modes include small fluctuations in signal amplitude, small shifts in frequency, and abnormal changes in phase. At the same time, it explains how to provide a preliminary diagnosis of the cause of the fault based on historical fault data and current signal characteristics. For example, a fault feature library can be established, and the current signal characteristics can be matched with the data in the fault feature library to find the most likely cause of the fault. Furthermore, when a high voltage spike is detected, the breakdown voltage of the TVS diode is increased to improve its ability to suppress voltage spikes.
[0026] S5. ESD Protection Steps: An ESD protection module is installed at the SD card interface. This module includes a TVS diode, a polymer tantalum capacitor, and an intelligent control circuit. The intelligent control circuit can monitor the voltage and current changes at the interface in real time and automatically adjust the operating parameters of the TVS diode and polymer tantalum capacitor according to the characteristics of static electricity and voltage spikes to achieve more effective suppression of static electricity and voltage spikes.
[0027] User Intervention Process: The three-level deep reset process reports the fault and triggers the user intervention process simultaneously. Fault information is displayed on the in-vehicle screen. The intelligent prompting strategy uses text, icons, and voice prompts based on the user's operating habits and historical fault handling records, prioritizing these elements. A physical reset button is provided; the user presses and holds it for a preset time to trigger a deep reset. The user's intervention and reset results are recorded for subsequent fault analysis and strategy optimization. For example, by analyzing the user's past handling of different types of fault information, the system determines the user's preference for text, icons, and voice prompts, as well as the priority order of different fault types. Fault information is then displayed according to the user's preferences and priorities. The system also specifies the exact time requirement for the user to press and hold the physical reset button to trigger a deep reset, such as pressing and holding for 3-5 seconds. S6. Black Box Log Recording Steps: Record reset history data in non-volatile memory (such as EEPROM). The history data includes reset time, reset type, reset result, environmental parameters during reset, and key signal waveforms during the reset process. The reset history data is classified and cyclically overwritten according to time order and importance. Important fault data and key environmental parameter data are reserved first. For example, the reset history data is divided into different categories such as important fault data, general fault data, and routine operation data. It is cyclically overwritten and stored according to a certain time interval or storage space limit. Important fault data and key environmental parameter data are reserved first. At the same time, describe in detail how to record and store key signal waveforms during the reset process. For example, sampling and quantization methods are used to convert continuous signal waveforms into discrete data points for storage.
[0028] A reset system for SD card read error, which is applied to a reset method for SD card read error, includes: a detection module, a multi-level reset control module, a dynamic strategy module, a data protection module, a security protection module, and a user interaction module; Detection module: Used to detect the insertion status of the SD card, including level detection circuit, current sensor and environmental sensing sensor, the output is connected to the CPU, and can collect the electrical status and environmental parameters of the SD card in real time; Multi-level reset control module: Level 1 Reset Unit: Implements soft reset by sending CMD0 command through SDIO interface, and also has the function of dynamically adjusting monitoring frequency; Secondary reset unit: controls the MOSFET switching circuit to perform power-off / power-on hard reset. The delay time is dynamically adjusted according to the SD card model and historical data. A smart RC filter circuit is used to achieve linear voltage rise and fall. Three-level reset unit: drives an electromagnet or stepper motor to simulate manual insertion and removal, and the delay time is dynamically adjusted according to environmental sensing data, with multi-dimensional monitoring function; Dynamic Strategy Module: A non-volatile memory that stores historical reset records, using big data analysis and machine learning algorithms to dynamically select reset priorities based on success rate and environmental parameters; Data protection module: Cache unit: Stores the SD card FAT table and key data hash values SHA-256, and has an intelligent cache synchronization strategy; Comparison Unit: Before reset, it verifies the timeliness of cached data and intelligently determines whether to skip the data comparison step based on data access history and system status; Security protection module: Soft-start circuit: integrates RC filter and MOSFET to achieve 10ms linear voltage rise and fall, and has adaptive adjustment function; ESD protection circuit: TVS diodes and tantalum capacitors are connected in parallel to the SD card interface, and intelligent control circuitry is used to achieve dynamic protection. User interaction module: includes in-vehicle display screen, LED indicator lights and physical reset button. The in-vehicle display screen has intelligent prompt function and records user intervention operations and reset results for subsequent analysis and optimization. Secondly, after system integration, comprehensive debugging and verification are required. Various fault scenarios can be simulated to test the functionality and collaborative working ability of each module of the system. For example, simulating logic layer anomalies, power module failures, card slot mechanical failures, etc., can be used to check whether the system can perform multi-level resets, dynamic adjustments, fault monitoring, and data recording operations as required by the design.
[0029] The terms "front," "back," "left," "right," "top," and "bottom" all refer to the figures in the accompanying drawings. Figure 1 Based on the perspective of the observer, the side of the device facing the observer is defined as the front, the left side of the observer is defined as the left, and so on.
[0030] In the description of this invention, it should be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the scope of protection of this invention.
[0031] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A reset method for SD card read error, characterized in that: Includes the following steps: S1. Multi-level adaptive reset steps: The first-level soft reset, the second-level hard reset and the third-level deep reset are executed sequentially. Each level of reset is progressively advanced. If the previous level of reset fails, the next level of reset is triggered. S2. Dynamic adjustment steps: Record the type and success rate of each reset. When the historical success rate of a certain level of reset exceeds the preset threshold, the reset of that level will be executed first when an SD card read abnormality is detected in the future.
2. The reset method for an SD card read error according to claim 1, characterized in that: The first-level soft reset specifically involves: when an SD card malfunction is detected, a CMD0 reset command is sent to the SD card to reset only the logic layer without interrupting power, and the CMD line response signal is monitored; if the response signal is successfully received, the reset is determined to be successful and data transmission is resumed.
3. The reset method for an SD card read error according to claim 2, characterized in that: The data transmission recovery steps include: before resetting, synchronizing key metadata of the SD card through the cache, the key metadata including the file system FAT table, root directory entries, or the SHA-256 hash value of a user-specified file; after a successful reset, first recovering the key metadata from the cache; after resetting, recalculating the hash value of the user-specified file and comparing it with the cached value, if they are inconsistent, triggering the data repair process.
4. The reset method for an SD card read error according to claim 3, characterized in that: The cache synchronization adopts a dynamic update strategy: when the SD card is working normally, the CPU synchronizes key metadata to the cache at preset time intervals and records the synchronization timestamp; before resetting, the timestamp is checked, and if the cache has not expired, the data comparison step is skipped.
5. The reset method for an SD card read error according to claim 1, characterized in that: The secondary hard reset is as follows: if the primary soft reset fails, a power-off / power-on process is executed, and power is restored after a delay of 50-100ms, while monitoring the power-on current fluctuation; if the current is within the preset threshold range and the CMD line recovers its response, the reset is determined to be successful.
6. A reset method for an SD card read error according to claim 5, characterized in that: The power-off / power-on process employs a soft-start circuit: a MOSFET and an RC filter circuit are connected in series in the SD card power path to achieve linear boost / buck within 10ms, avoiding current surges; the delay timing of the three-stage deep reset starts at the moment of failure of the second-stage hard reset, and the SD card remains in a power-off state during the timing period, based on the discharge of the 100μF energy storage capacitor in the SD card power path to a safe voltage threshold.
7. A reset method for an SD card read error according to claim 6, characterized in that: It also includes fault monitoring steps: monitoring current fluctuations through a voltage / current sensor integrated into the reset circuit; if the current remains below the lower threshold or exceeds the upper threshold during power-up, it is determined to be a reset failure and triggers the next level of reset; monitoring the communication protocol layer by capturing the CLK and CMD line signals of the SD card; if the CMD8 or ACMD41 response signal is not detected within a preset time, it is determined to be a hardware fault and reported to the host system.
8. A reset method for an SD card read error according to claim 7, characterized in that: An ESD protection module is provided at the SD card interface: the ESD protection module includes a TVS diode and a polymer tantalum capacitor to suppress static electricity and voltage spikes.
9. A reset method for an SD card read error according to claim 1, characterized in that: The three-level deep reset specifically involves: if the second-level hard reset fails, after a 10-second delay, controlling the card slot mechanical structure via an electromagnet or motor to simulate manual insertion and removal of the SD card, and monitoring the current and CMD line response; If the failure still fails, the fault is reported and the user intervention process is triggered. The user intervention process includes: displaying fault information on the vehicle display screen and providing a physical reset button. The user presses and holds the button for a preset time to trigger a deep reset. It also includes a black box log recording step: recording reset history data in non-volatile memory, the history data including reset time, reset type and reset result; the non-volatile memory is EEPROM, and the reset history data is stored in chronological order; the preset threshold is 80%, when the historical success rate of a certain level of reset exceeds 80%, the reset of that level will be executed first in subsequent abnormalities.
10. A reset system for SD card read error, applied to the reset method for SD card read error as described in any one of claims 1-9, characterized in that: It includes a detection module, a multi-level reset control module, a dynamic strategy module, a data protection module, a security protection module, and a user interaction module; The detection module is used to detect the SD card insertion status and read anomalies. It includes a level detection circuit and a current sensor, and its output is connected to the CPU. The multi-level reset control module includes a primary reset unit, a secondary reset unit, and a tertiary reset unit. The primary reset unit sends a CMD0 command through the SDIO interface to achieve a soft reset. The secondary reset unit controls the MOSFET switching circuit to perform a power-off / power-on hard reset with a delay of 50-100ms. The tertiary reset unit drives an electromagnet or stepper motor to simulate manual insertion and removal, triggering after a 10-second delay. Dynamic strategy module: includes a non-volatile memory for storing historical reset records, used to dynamically select reset priority based on reset success rate; Data protection module: includes a caching unit and a comparison unit; the caching unit stores the SD card FAT table and key data hash values SHA-256; the comparison unit verifies the timeliness of cached data before reset, and determines that the cache has not expired if the timestamp is < 5 minutes. Safety protection module: includes a soft-start circuit and an ESD protection circuit; the soft-start circuit integrates RC filter and MOSFET to achieve 10ms linear voltage rise and fall; the ESD protection circuit consists of a TVS diode and a tantalum capacitor connected in parallel and is located at the SD card interface; User interaction module: includes in-vehicle display screen, LED indicator lights and physical reset button, used for fault indication and manual deep reset trigger.
Citation Information
Patent Citations
Reset method and system against SD card reading anomaly
CN108073462A
Multi-level resetting method and system for distributed architecture of protection control equipment
CN119937433A
Quick exchange chip resetting method and system
CN120973590A