Recovery system and method for user configuration failure, chip and electronic equipment
By designing a recovery system with failed user configuration in Flash storage, using interface units and configuration recovery units to unblock password protection, obtain and update configuration information, the problem of invalid user configuration information is solved, safe and reliable recovery of configuration is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202311624828.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
In Flash storage, due to external factors and human configuration errors, the source space of the user configuration area and the sector latch flags in the backup space both appear incorrectly, resulting in the user configuration information being invalid and normal operations cannot be performed, seriously affecting the user experience.
It provides a recovery system with failed user configuration. Through the coordinated work of interface unit, user configuration checking and storage unit and configuration recovery unit, it obtains the command sequence entered by the user, unblocks password protection, obtains configuration information, and updates the user configuration through data analysis and conversion algorithms.
It realizes timely and secure recovery of user configuration, avoids loss of configuration information, improves user experience, and prevents malicious tampering.
Smart Images

Figure CN120066551A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a system, method, chip and electronic device for recovering user configuration failure. Background Art
[0002] In the design of the Flash for user configuration storage, a sector latch flag is set to achieve reliability protection of the user configuration. The backup space is usually used to copy the source space data. If an error occurs in the sector latch flag of the source data space, the user configuration will be read from the backup space.
[0003] However, due to some external factors and human configuration errors, the sector latch flags of the source space and backup space of the Flash user configuration area are both wrong, which will cause the user's configuration information to be invalid and unable to perform corresponding operations. Only the factory configuration can be run, which seriously affects the user experience. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide a system, method, chip and electronic device for recovering user configuration failure to solve the above technical problems.
[0005] In a first aspect, an embodiment of the present application provides a user configuration failure recovery system, comprising:
[0006] An interface unit, used to connect to Flash, wherein the interface unit stores a preset data analysis and conversion algorithm, and the Flash includes a storage area for storing the user configuration;
[0007] A user configuration checking and storage unit connected to the interface unit, used to load the user configuration and generate a configuration loading error signal when the user configuration is loaded incorrectly;
[0008] A configuration recovery unit is respectively connected to the external debugging interface, the interface unit and the user configuration checking and storage unit, and is used for obtaining a first command sequence input by the user through the external debugging interface when the configuration loading error signal is obtained, and for releasing the password protection of the configuration write control of the configuration recovery unit according to the first command sequence to obtain the configuration information input by the user, and sending the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0009] This embodiment can restore the user configuration in a timely and safe manner, improve the user experience, and solve the problem that after the user configuration becomes invalid, the accurate user configuration cannot be obtained and only the factory configuration can be run, which seriously affects the user experience.
[0010] Optionally, the configuration recovery unit further includes:
[0011] a configuration recovery control module connected to the user configuration checking and storage unit, and configured to generate a configuration recovery enabling signal and obtain a first command sequence input by a user through the external debugging interface when the configuration loading error signal is obtained;
[0012] a password protection module, connected to the configuration recovery control module, and configured to determine whether the first command sequence is a command sequence for removing password protection, and when the first command sequence is a command sequence for removing password protection, obtain a preset recovery configuration password, and match the password carried by the first command sequence with the recovery configuration password, and when the password carried by the first command sequence matches the recovery configuration password, generate a password protection removal enable signal;
[0013] The configuration recovery write control module is connected to the password protection module and the configuration recovery control module respectively, and is used to obtain the configuration information input by the user when the configuration recovery enable signal and the password protection release enable signal are obtained, and send the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0014] This embodiment can safely and reliably restore user configurations, preventing others from maliciously tampering with user configurations, thereby improving user experience.
[0015] Optionally, the configuration information includes at least a second command sequence for modifying the configuration, a configuration address, and configuration data; and the interface unit further includes:
[0016] a data parsing module, configured to parse the second command sequence, the configuration address and the configuration data to obtain a command enable signal;
[0017] A data conversion module is used to obtain the command enable signal and convert the command enable signal into a corresponding Flash operation sequence to control the Flash to write the configuration data into the storage area according to the Flash operation sequence and the configuration address to update the user configuration.
[0018] This embodiment can ensure that the configuration data is accurately written into the user configuration, and has high reliability.
[0019] Optionally, the user configuration check and storage unit further includes:
[0020] A sector latch flag judgment module, configured to read a sector latch flag from the Flash and judge whether the sector latch flag is correct;
[0021] A user configuration loading module, configured to generate the configuration loading error signal when the sector latch flag is incorrect; when the sector latch flag is correct, load the corresponding user configuration and generate a configuration loading completion signal after the loading is completed.
[0022] This embodiment can accurately load the user configuration and timely feedback the configuration loading status.
[0023] Optionally, the user configuration failure recovery system further includes:
[0024] A power-on control unit, connected to the user configuration check and storage unit;
[0025] A multiplexing unit, respectively connected to the power-on control unit, the configuration recovery unit, and the interface unit.
[0026] This embodiment can improve the system reliability.
[0027] Optionally, the power-on control unit further includes:
[0028] A power-on signal detection module, configured to obtain a power-on signal and detect the power-on enable of the power-on signal;
[0029] A power-on address and enable generation module, configured to generate a read address signal and a read enable signal for loading the user configuration when the power-on enable is detected, so that the user configuration check and storage unit loads the user configuration according to the read address signal and the read enable signal;
[0030] A power-on completion detection module, configured to obtain the configuration loading completion signal and detect the configuration loading completion signal after the user configuration check and storage unit completes loading the user configuration.
[0031] This embodiment can improve the system reliability.
[0032] In a second aspect, an embodiment of the present application further provides a method for recovering user configuration failure, which is applied to the user configuration failure recovery system, and the method for recovering user configuration failure includes:
[0033] When a configuration loading error signal is obtained, obtain a first command sequence input by a user through an external debugging interface;
[0034] The password protection for the configuration writing control of the configuration restoration unit is released according to the first command sequence to obtain the configuration information input by the user, and the configuration information is sent to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0035] This embodiment can perform user configuration restoration timely and securely, improving the user experience and solving the problem that after the user configuration fails, accurate user configuration cannot be obtained and only the factory configuration can be run, seriously affecting the user experience.
[0036] Optionally, when obtaining the configuration loading error signal includes: generating a configuration restoration enable signal;
[0037] The releasing the password protection for the configuration writing control of the configuration restoration unit according to the first command sequence to obtain the configuration information input by the user, and sending the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration includes:
[0038] Determine whether the first command sequence is a command sequence for releasing password protection;
[0039] When the first command sequence is a command sequence for releasing password protection, obtain the preset restoration configuration password, and match the password carried by the first command sequence with the restoration configuration password;
[0040] When the password carried by the first command sequence matches the restoration configuration password, generate a password protection release enable signal;
[0041] According to the configuration restoration enable signal and the password protection release enable signal, obtain the configuration information input by the user, and send the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0042] This embodiment can perform user configuration restoration safely and reliably, preventing others from maliciously tampering with the user configuration, thereby improving the user experience.
[0043] In a third aspect, an embodiment of the present application further provides a chip, including the above user configuration failure recovery system.
[0044] In a fourth aspect, an embodiment of the present application further provides an electronic device, including the above chip.
[0045] The user configuration failure recovery system provided by the embodiment of the present application obtains a first command sequence input by the user through an external debugging interface when a configuration loading error signal is obtained, and the password protection of the configuration write control of the configuration recovery unit is released according to the first command sequence to obtain the configuration information input by the user, and the configuration information is sent to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration. This can solve the problem that after the user configuration fails, the accurate user configuration cannot be obtained and only the factory configuration can be run, which seriously affects the user experience. The password protection needs to be released during configuration recovery, which has the effect of high security and reliability. The configuration information needs to be written into the user configuration after data analysis and conversion processing, which has the effect of high accuracy.
[0046] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 A schematic diagram of the architecture of a user configuration failure recovery system provided in an embodiment of the present application is shown.
[0049] Figure 2 A schematic diagram of the architecture of a configuration recovery unit provided in an embodiment of the present application is shown.
[0050] Figure 3 A schematic diagram of the architecture of the interface unit provided in an embodiment of the present application is shown.
[0051] Figure 4 A schematic diagram of the architecture of a user configuration checking and storage unit provided in an embodiment of the present application is shown.
[0052] Figure 5 A schematic diagram of the architecture of a user configuration failure recovery system provided by another embodiment of the present application is shown.
[0053] Figure 6 A schematic diagram of the architecture of a power-on control unit provided in an embodiment of the present application is shown.
[0054] Figure 7 A flow chart of a method for recovering from user configuration failure provided in an embodiment of the present application is shown.
[0055] Figure 8 It shows a schematic flowchart of step S20 provided in an embodiment of the present application. Detailed implementation manners
[0056] The following details the implementation manners of the present application. Examples of the implementation manners are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The implementation manners described below with reference to the accompanying drawings are exemplary only for explaining the present application and should not be construed as a limitation to the present application.
[0057] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present application.
[0058] In the embodiments of the present application, it should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0059] Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the said element.
[0060] In the description of the embodiments of the present application, words such as "example" or "for example" are used to represent examples, explanations or descriptions. Any embodiment or design solution described as "for example" or "example" in the embodiments of the present application is not construed as being more preferred or having more advantages than another embodiment or design solution. The use of words such as "example" or "for example" is intended to present relative concepts in a clear manner.
[0061] In addition, "a plurality of" in the embodiments of the present application means two or more. In view of this, "a plurality of" in the embodiments of the present application can also be understood as "at least two". "At least one" can be understood as one or more, for example, understood as one, two or more. For example, including at least one means including one, two or more, and it does not limit which ones are included. For example, including at least one of A, B, and C, then what is included can be A, B, C, A and B, A and C, B and C, or A and B and C.
[0062] Currently, in the design of the Flash for storing user configurations, to achieve reliable protection of user configurations, a sector latch flag is set. Usually, the backup space is used to copy the data in the source space. If an error occurs in the sector latch flag of the source data space, the user configuration will be read from the backup space.
[0063] However, due to the influence of some external factors and human configuration errors, the sector latch flags of both the source space and the backup space in the user configuration area of the Flash will be incorrect, which will cause the user configuration information to become invalid and corresponding operations cannot be performed. Moreover, each time the power is turned on, only the factory configuration can be run, seriously affecting the user experience.
[0064] As Figure 1 shown, Figure 1The user configuration failure recovery system 100 of an embodiment of the present application is schematically shown. The user configuration failure recovery system 100 includes: an interface unit 10, a user configuration check and storage unit 20, and a configuration recovery unit 30. Among them, the interface unit 10 is used to connect to Flash 200, the user configuration check and storage unit 20 is respectively connected to the interface unit 10 and the configuration recovery unit 30, and the configuration recovery unit 30 is respectively connected to the external debugging interface 300 and the interface unit 10. In an achievable implementation, the interface unit 10 stores a preset data parsing and conversion algorithm, and Flash 200 includes a storage area for storing user configurations. The user configuration check and storage unit 20 is used to load the user configuration, and when the user configuration is loaded incorrectly, a configuration loading error signal is generated and sent to the configuration recovery unit 30; the configuration recovery unit 30 is used to obtain the first command sequence input by the user through the external debugging interface 300 when the configuration loading error signal sent by the user configuration check and storage unit 20 is obtained, and the password protection of the configuration write control of the configuration recovery unit 30 is released according to the first command sequence to obtain the configuration information input by the user, and the configuration information is sent to the interface unit 10, so that the interface unit 10 processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration. This embodiment can timely and safely recover the user configuration, improve the user experience, and solve the problem that after the user configuration fails, the accurate user configuration cannot be obtained, and only the factory configuration can be run, which seriously affects the user experience.
[0065] In one possible implementation, see Figure 2, the configuration restoration unit 30 further includes: a configuration restoration control module 31, a password protection module 32, and a restored configuration writing control module 33. The configuration restoration control module 31 is respectively connected to the user configuration check and storage unit 20, the password protection module 32, and the restored configuration writing control module 33, and the password protection module 32 is connected to the restored configuration writing control module 33. In this embodiment, to protect the security of the user configuration, a step of removing password protection is added during configuration restoration. When the user receives a prompt of configuration loading error sent by the system, connect to the external debugging interface 300, and input a first command sequence to the configuration restoration control module 31 through the external debugging interface 300. The first command sequence carries a password, and the length of the password can be 256 bits. The password can be the factory password or the user-set password. If the password is the factory password, the restored configuration password written to the protected password sector by default is the factory password; if the password is the user-set password, the restored configuration password written to the protected password sector by default is the user-set password. The restored configuration password is the matching password required for subsequent password protection removal operations. The system supports the user to modify the password through the factory password, and only supports one modification to be effective. Specifically, when the user modifies the password, input the factory password through the password protection removal command sequence, and then through the programming operation of the Flash, write the user-set password into the protected password sector to complete the password modification.
[0066] In this embodiment, during the process of the user configuration check and storage unit 20 loading the user configuration, when the user configuration loading error occurs, a configuration loading error signal is generated; when the configuration restoration control module 31 obtains the configuration loading error signal sent by the user configuration check and storage unit 20, a configuration restoration enable signal is generated and the first command sequence input by the user is obtained through the external debugging interface 300; the password protection module 32 obtains the first command sequence from the configuration restoration control module 31 and determines whether the first command sequence is a command sequence for removing password protection. When the first command sequence is not a command sequence for removing password protection, it does not respond to the current operation; when the first command sequence is a command sequence for removing password protection, obtain the restored configuration password, and match the password carried by the first command sequence with the restored configuration password. When the password carried by the first command sequence matches the preset restored configuration password, a password protection removal enable signal is generated; when the restored configuration writing control module 33 obtains the configuration restoration enable signal and the password protection removal enable signal, obtain the configuration information input by the user, and send the configuration information to the interface unit 10, so that the interface unit 10 processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration. This embodiment can perform user configuration restoration safely and reliably, prevent others from maliciously tampering with the user configuration, and thus improve the user experience.
[0067] In an implementable embodiment, the configuration information at least includes a second command sequence for modifying the configuration, a configuration address, and configuration data.
[0068] In an implementable embodiment, refer to Figure 3 , the interface unit 10 further includes: a data parsing module 11 and a data conversion module 12 connected to the data parsing module 11. The data parsing module 11 is configured to parse the second command sequence, the configuration address, and the configuration data to obtain a command enable signal; the data conversion module 12 is configured to obtain the command enable signal and convert the command enable signal into a corresponding Flash operation timing sequence to control the Flash 200 to write the configuration data into the storage area according to the Flash operation timing sequence and the configuration address, and update the user configuration. This embodiment can ensure that the configuration data is accurately written into the user configuration with high reliability.
[0069] In an implementable embodiment, the preset data parsing and conversion algorithms stored in the interface unit 10 may include existing publicly available data parsing algorithms and timing conversion circuits. Exemplarily, the data parsing module 11 parses the second command sequence, the configuration address, and the configuration data based on the data parsing algorithm to obtain a command enable signal, and sends the command enable signal to the data conversion module 12. The data conversion module 12 converts the command enable signal into a corresponding Flash operation timing sequence based on the timing conversion circuit, and then controls the Flash 200 to write the configuration data into the storage area according to the Flash operation timing sequence and the configuration address, and update the user configuration.
[0070] In an implementable embodiment, refer to Figure 4, the user configuration check and storage unit 20 further includes: a sector latch flag judgment module 21 and a user configuration loading module 22 connected to the sector latch flag judgment module 21. The sector latch flag judgment module 21 is configured to read the sector latch flag from the Flash 200 and judge whether the sector latch flag is correct; the user configuration loading module 22 is configured to generate a configuration loading error signal when the sector latch flag is incorrect; when the sector latch flag is correct, load the corresponding user configuration and generate a configuration loading completion signal after the loading is completed. In an implementable embodiment, the sector may include a source sector and a backup sector. The sector latch flag judgment module 21 first reads the corresponding latch value from the source sector and compares the latch value of the source sector with a first preset value; if the latch value of the source sector is consistent with the first preset value, it is considered that the latch value of the source sector is correct, and the user configuration loading module 22 is allowed to load the configuration value of the source sector and generate a configuration loading completion signal after the loading is completed. If the latch value of the source sector is inconsistent with the first preset value, it is considered that the latch value of the source sector is incorrect, and the corresponding latch value is continuously read from the backup sector and compared with a second preset value. If the latch value of the backup sector is consistent with the second preset value, it is considered that the latch value of the backup sector is correct, and the user configuration loading module 22 is allowed to load the configuration value of the backup sector and generate a configuration loading completion signal after the loading is completed; if the latch value of the backup sector is inconsistent with the second preset value, it is considered that the latch value of the backup sector is incorrect, and a configuration loading error signal is generated. The first preset value and the second preset value in this embodiment may be values set by developers. By judging the correctness of the sector latch flag to determine whether to load the user configuration, this embodiment can accurately load the user configuration and timely feedback the configuration loading status.
[0071] In an implementable embodiment, please refer to Figure 5The user configuration failure recovery system 100 also includes: a power-on control unit 40 and a multiplexing unit 50 connected to the power-on control unit 40, the power-on control unit 40 is also connected to the user configuration checking and storage unit 20, and the multiplexing unit 50 is respectively connected to the configuration recovery unit 30 and the interface unit 10. In this embodiment, when the power-on control unit 40 obtains the power-on signal, it reads relevant information from the Flash 200 through the multiplexing unit 40 and the interface unit 10 in sequence to generate a corresponding user-configured read address signal and a read enable signal. Then, the user configuration checking and storage unit 20 loads the user configuration according to the read address signal and the read enable signal, generates a configuration loading completion signal after the loading is completed and sends the configuration loading completion signal to the power-on control unit 40, or, when the user configuration loading is wrong, generates a configuration loading error signal and sends the configuration loading error signal to the configuration recovery unit. When the configuration recovery unit 20 obtains the configuration loading error signal, it obtains the first command sequence input by the user through the external debugging interface 300, and releases the password protection of the configuration write control of the configuration recovery unit 30 according to the first command sequence to obtain the configuration information input by the user, and sends the configuration information to the interface unit 10 through the multiplexing unit 50, so that the interface unit 10 processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0072] In one possible implementation, see Figure 6The power-on control unit 40 also includes: a power-on signal detection module 41, a power-on address and enable generation module 42 connected to the power-on signal detection module 41, and a power-on completion detection module 43 connected to the power-on signal detection module 41. The power-on signal detection module 41 is used to obtain the power-on signal and detect the power-on enable of the power-on signal; the power-on address and enable generation module 42 is used to generate a read address signal and a read enable signal for loading the user configuration when the power-on enable is detected, so that the user configuration check and storage unit 20 loads the user configuration according to the read address signal and the read enable signal; the power-on completion detection module 43 is used to obtain a configuration loading completion signal after the user configuration check and storage unit 20 completes the loading of the user configuration, and detect the configuration loading completion signal. Exemplarily, the power-on control unit 40 obtains the power-on signal and detects the power-on enable of the power-on signal. When the power-on enable is detected, a read address signal and a read enable signal for loading the user configuration are generated, so that the user configuration check and storage unit 20 loads the user configuration according to the read address signal and the read enable signal. When the user configuration check and storage unit 20 generates a configuration loading completion signal, the power-on control unit 40 obtains the configuration loading completion signal and determines whether the current configuration loading completion signal has an error bit according to a preset check bit. If not, the configuration loading completion signal is fed back. If so, error information containing the error bit is fed back, and the correct backup data is read through the backup storage space. When the user configuration check and storage unit 20 generates a user configuration loading error, the configuration recovery unit 30 obtains a configuration loading error signal and obtains a first command sequence input by the user through the external debugging interface 300, and removes the password protection for the configuration write control of the configuration recovery unit 30 according to the first command sequence to obtain the configuration information input by the user, and sends the configuration information to the interface unit 10 through the multiplexing unit 50, so that the interface unit 10 processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0073] The present application also provides a method for recovering from a failed user configuration. Figure 7 As shown, the recovery method is applied to the above-mentioned user configuration failure recovery system, including the following steps:
[0074] Step S10: When a configuration loading error signal is obtained, a first command sequence input by a user is obtained through an external debugging interface.
[0075] In this step, the Flash includes a storage area for storing user configurations. The user configuration check and storage unit loads the user configuration, and when the user configuration is loaded incorrectly, a configuration loading error signal is generated and sent to the configuration recovery unit. When the configuration recovery unit obtains the configuration loading error signal, a configuration recovery enable signal is generated and the first command sequence input by the user is obtained through the external debugging interface. The first command sequence is used to remove password protection and carries a password.
[0076] Step S20: Unlock the password protection of the configuration write control of the configuration recovery unit according to the first command sequence to obtain the configuration information input by the user, and send the configuration information to the interface unit so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0077] In this step, the interface unit stores a preset data analysis and conversion algorithm, which may be an existing publicly available data analysis algorithm and timing conversion circuit.
[0078] This embodiment can restore the user configuration in a timely and safe manner, improve the user experience, and solve the problem that after the user configuration becomes invalid, the accurate user configuration cannot be obtained and only the factory configuration can be run, which seriously affects the user experience.
[0079] In one possible implementation, see Figure 8 , step S20 further includes:
[0080] Step S201: determining whether the first command sequence is a command sequence for removing password protection;
[0081] Step S202: when the first command sequence is a command sequence for removing password protection, obtaining a preset recovery configuration password, and matching the password carried by the first command sequence with the recovery configuration password;
[0082] Step S203: When the password carried by the first command sequence matches the recovery configuration password, a password protection release enable signal is generated;
[0083] Step S204: According to the configuration recovery enable signal and the password protection release enable signal, the configuration information input by the user is obtained, and the configuration information is sent to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
[0084] This embodiment requires that password protection be released when restoring the configuration, so that user configuration can be restored safely and reliably, preventing others from maliciously tampering with the user configuration, thereby improving the user experience.
[0085] The embodiment of the present application also provides a chip, which includes the above-mentioned user configuration failure recovery system. The chip (Integrated Circuit, IC) is also called a chip, and the chip can be but is not limited to a SOC (System on Chip, chip-level system) chip, a SIP (system in package, system-level packaging) chip. The chip obtains the first command sequence input by the user through the external debugging interface when a configuration loading error signal is obtained, and the configuration write control of the configuration recovery unit is deactivated according to the first command sequence to obtain the configuration information input by the user, and the configuration information is sent to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area, updates the user configuration, and can solve the problem that after the user configuration fails, the accurate user configuration cannot be obtained, and only the factory configuration can be run, which seriously affects the user experience. The password protection needs to be deactivated when the configuration is restored, which has the effect of high security and reliability. The configuration information needs to be written into the user configuration after data analysis and conversion processing, which has the effect of high accuracy.
[0086] The embodiment of the present application also provides an electronic device, which includes a device body and a chip as described above provided in the device body. The electronic device may be, but is not limited to, a weight scale, a body fat scale, a nutrition scale, an infrared electronic thermometer, a pulse oximeter, a human body composition analyzer, a mobile power supply, a wireless charger, a fast charger, a car charger, an adapter, a display, a USB (Universal Serial Bus) docking station, a stylus, a true wireless headset, a car central control screen, a car, a smart wearable device, a mobile terminal, and a smart home device. Smart wearable devices include, but are not limited to, smart watches, smart bracelets, and cervical massagers. Mobile terminals include, but are not limited to, smart phones, laptops, tablet computers, and POS (point of sales terminal). Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart sweepers, and smart lights. The electronic device obtains a first command sequence input by the user through an external debugging interface when a configuration loading error signal is obtained, and removes the password protection of the configuration write control of the configuration recovery unit according to the first command sequence to obtain the configuration information input by the user, and sends the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration. This can solve the problem that after the user configuration becomes invalid, the accurate user configuration cannot be obtained and only the factory configuration can be run, which seriously affects the user experience. The password protection needs to be removed when the configuration is restored, which has the effect of high security and reliability. The configuration information needs to be written into the user configuration after data analysis and conversion processing, which has the effect of high accuracy.
[0087] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A recovery system for user configuration failure, It is characterized in that include: An interface unit, used to connect to Flash, wherein the interface unit stores a preset data analysis and conversion algorithm, and the Flash includes a storage area for storing the user configuration; A user configuration checking and storage unit connected to the interface unit, used to load the user configuration and generate a configuration loading error signal when the user configuration is loaded incorrectly; A configuration recovery unit is respectively connected to the external debugging interface, the interface unit and the user configuration checking and storage unit, and is used for obtaining a first command sequence input by the user through the external debugging interface when the configuration loading error signal is obtained, and for releasing the password protection of the configuration write control of the configuration recovery unit according to the first command sequence to obtain the configuration information input by the user, and sending the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
2. The user configuration failure recovery system according to claim 1, It is characterized in that The configuration recovery unit also includes: a configuration recovery control module connected to the user configuration checking and storage unit, and configured to generate a configuration recovery enabling signal and obtain a first command sequence input by a user through the external debugging interface when the configuration loading error signal is obtained; a password protection module, connected to the configuration recovery control module, and configured to determine whether the first command sequence is a command sequence for removing password protection, and when the first command sequence is a command sequence for removing password protection, obtain a preset recovery configuration password, and match the password carried by the first command sequence with the recovery configuration password, and when the password carried by the first command sequence matches the recovery configuration password, generate a password protection removal enable signal; The configuration recovery write control module is connected to the password protection module and the configuration recovery control module respectively, and is used to obtain the configuration information input by the user when the configuration recovery enable signal and the password protection release enable signal are obtained, and send the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data analysis and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
3. The user configuration failure recovery system according to claim 1, It is characterized in that The configuration information at least includes a second command sequence for modifying the configuration, a configuration address, and configuration data; the interface unit also includes: a data parsing module, configured to parse the second command sequence, the configuration address and the configuration data to obtain a command enable signal; A data conversion module, configured to obtain the command enable signal and convert the command enable signal into a corresponding Flash operation timing sequence, so as to control the Flash to write the configuration data into the storage area according to the Flash operation timing sequence and the configuration address, and update the user configuration.
4. The user configuration failure recovery system according to claim 1, wherein, the user configuration check and storage unit further includes: a sector latch flag judgment module, configured to read a sector latch flag from the Flash and judge whether the sector latch flag is correct; a user configuration loading module, configured to generate the configuration loading error signal when the sector latch flag is incorrect; and load the corresponding user configuration when the sector latch flag is correct, and generate a configuration loading completion signal after the loading is completed.
5. The user configuration failure recovery system according to claim 4, wherein, the user configuration failure recovery system further includes: a power-on control unit, connected to the user configuration check and storage unit; a multiplexing unit, respectively connected to the power-on control unit, the configuration recovery unit, and the interface unit.
6. The user configuration failure recovery system according to claim 5, wherein, the power-on control unit further includes: a power-on signal detection module, configured to obtain a power-on signal and detect the power-on enable of the power-on signal; a power-on address and enable generation module, configured to generate a read address signal and a read enable signal for loading the user configuration when the power-on enable is detected, so that the user configuration check and storage unit loads the user configuration according to the read address signal and the read enable signal; a power-on completion detection module, configured to obtain the configuration loading completion signal and detect the configuration loading completion signal after the user configuration check and storage unit completes loading the user configuration.
7. A method for recovering user configuration failure, applied to the user configuration failure recovery system according to any one of claims 1-6, wherein, the method for recovering user configuration failure includes: when obtaining a configuration loading error signal, obtaining a first command sequence input by a user through an external debug interface; removing the password protection for the configuration writing control of the configuration recovery unit according to the first command sequence to obtain the configuration information input by the user, and sending the configuration information to the interface unit, so that the interface unit processes the configuration information based on a data parsing and conversion algorithm and writes the processed configuration information into the storage area to update the user configuration.
8. According to the method for recovering user configuration failure according to claim 7, wherein, the "when obtaining a configuration loading error signal" includes: generating a configuration recovery enable signal; The configuration write control of the configuration restoration unit is de - password - protected according to the first command sequence to obtain the configuration information input by the user, and the configuration information is sent to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration, including: Determine whether the first command sequence is a command sequence for de - password - protection; When the first command sequence is a command sequence for de - password - protection, obtain the preset restoration configuration password, and match the password carried by the first command sequence with the restoration configuration password; When the password carried by the first command sequence matches the restoration configuration password, generate a de - password - protection enable signal; According to the configuration restoration enable signal and the de - password - protection enable signal, obtain the configuration information input by the user, and send the configuration information to the interface unit, so that the interface unit processes the configuration information based on the data parsing and conversion algorithm, and writes the processed configuration information into the storage area to update the user configuration.
9. A chip, characterized in that, it includes the restoration system for user configuration failure according to any one of claims 1 - 6 above.
10. An electronic device, characterized in that, it includes a device main body and the chip as described in claim 9 above provided on the device main body.