Data storage device repair method
Controlling the power supply of the solid-state data storage device through the power management circuit, forcing the SSD controller to stay in the read-only memory mode, realizing automatic data storage device repair without disassembly or being sent to the repair station, solving solid-state data The problem of the storage device being unable to start or being identified improves repair efficiency and convenience.
Patent Information
- Application Number
- CN202010106818.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-16
- Filing Date
- 2020-02-20
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-02-20
AI Technical Summary
The prior art cannot automatically execute repair programs without disassembling and installing the solid-state data storage device, resulting in the solid-state data storage device being unable to start normally or be identified, and it needs to be sent to a repair station for debugging or updating.
Through the power management circuit, determine whether the normal signal of the SSD controller is received. If not, re-power and stop powering to the non-volatile memory, so that the SSD controller stays in read-only memory mode, download the debugging program independently, execute and Upload the error message and download the update program to complete the fix.
It realizes automatic execution of the repair program of the data storage device without disassembly or being sent to the repair station, greatly improving the repair time and convenience.
Smart Images

Figure CN113127264B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a repair method, and in particular to a data storage device repair method capable of making the data storage device enter a read-only memory mode to automatically execute a repair program. Background Art
[0002] With the development of technology, it is a trend that solid-state data storage devices (SSD) will become the mainstream in the market. This is due to its several advantages, such as fast reading and writing speeds, super strong shock resistance, extremely low power consumption, etc. However, despite these excellent data storage device characteristics, it is still inevitable that it will not be able to start normally or be recognized in some cases. For example, the deadlock caused by firmware damage or firmware program errors will cause the computer host to be unable to recognize the solid-state data storage device or cause the solid-state data storage device to be unable to start normally. The existing practice is to take out the solid-state data storage device and force the solid-state data storage device to enter the initial mode through hardware processing, so that the solid-state data storage device is reconnected to the computer host, and then debug or upgrade to achieve the purpose of repair. However, these actions require the user to take out the solid-state data storage device and send it to a maintenance station for processing. Therefore, how to provide an action that can still repair the solid-state data storage device without disassembling the solid-state data storage device or sending the solid-state data storage device to a maintenance station will be the problem to be emphasized and the focus of solution in this case. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a data storage device repair method, which is applicable to a data storage device. The data storage device includes a solid-state data storage device (SSD) controller, a power management circuit, a non-volatile memory, and a reset circuit. The data storage device repair method includes: the power management circuit determines whether a normal signal sent by the SSD controller is received within a predetermined time; if not, the power management circuit re-supplies power to the data storage device, but stops supplying power to the non-volatile memory.
[0004] In one embodiment of the present invention, after the power management circuit re-powers the data storage device but stops powering the non-volatile memory, it further includes: the SSD controller completes the execution of the read-only memory program within the first buffer time, but the SSD controller cannot read the startup program within the second buffer time, causing the SSD controller to remain in the read-only memory (ROM) mode.
[0005] In one embodiment of the present invention, wherein the data storage device is coupled to a host, after the step in which the SSD controller stays in ROM mode, it further includes: the SSD controller downloads a debugging program from the host in ROM mode; the SSD controller executes the debugging program to generate error information; the SSD controller uploads the error information to the host; and the SSD controller downloads an update program from the host and executes the update program to complete the repair of the data storage device.
[0006] An embodiment of the present invention further provides a data storage device repair method, which is applicable to a data storage device, wherein the data storage device includes an SSD controller, a power management circuit, a non-volatile memory and a reset circuit. The data storage device repair method includes: the power management circuit determines whether a normal signal sent by the SSD controller is received within a predetermined time; if not, the power management circuit pulls down the enable port of the SSD controller to a low level through the repair port; and the power management circuit re-powers the data storage device.
[0007] In one embodiment of the present invention, after the power management circuit pulls down the enable port of the SSD controller to a low level through the repair port, the method further includes: the SSD controller completes the execution of the read-only memory program within the first buffer time, but the SSD controller cannot read the startup program within the second buffer time, causing the SSD controller to remain in ROM mode.
[0008] In one embodiment of the present invention, wherein the data storage device is coupled to a host, after the step in which the SSD controller stays in ROM mode, it further includes: the SSD controller downloads a debugging program from the host in ROM mode; the SSD controller executes the debugging program to generate error information; the SSD controller uploads the error information to the host; and the SSD controller downloads an update program from the host and executes the update program to complete the repair of the data storage device.
[0009] The data storage device repair method provided by the embodiment of the present invention has a first implementation mode that performs a power shielding action on the non-volatile memory, so that the SSD controller of the data storage device cannot load the startup program or the startup loading program from the non-volatile memory within a preset time, thereby forcing the SSD controller to stay in ROM mode and execute the data storage device repair method of the present invention on the data storage device. The second implementation mode is that the power management circuit pulls down the enable port of the data storage device to a low level through the repair port. Since the enable port is at a low level, the SSD controller will only execute the read-only memory program (ROM Code) and will not load the startup program when the data storage device is powered on again. Thereby, the SSD controller is forced to stay in ROM mode and execute the data storage device repair method of the present invention on the data storage device. In this way, the data storage device can automatically execute the data storage device repair program without being disassembled or sent to a maintenance station, so as to greatly improve the time and convenience spent on processing the data storage device repair.
[0010] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 2 is a schematic diagram of a system architecture of a data storage device according to an embodiment of the present invention.
[0012] Figure 2 The present invention is a flowchart of a method for a data storage device to enter a read-only memory (ROM) mode according to an embodiment of the present invention.
[0013] Figure 3 It is a timing diagram of a data storage device entering a ROM mode according to an embodiment of the present invention.
[0014] Figure 4 The present invention is a flowchart of a method for repairing data in a ROM mode in a data storage device according to an embodiment of the present invention.
[0015] Figure 5 is a schematic diagram of a system architecture of a data storage device according to another embodiment of the present invention.
[0016] Figure 6 FIG. 4 is a flow chart of a method for a data storage device to enter a ROM mode according to another embodiment of the present invention.
[0017] Figure 7 FIG. 4 is a timing diagram of a data storage device entering a ROM mode according to another embodiment of the present invention.
[0018] Figure 8 It is a flowchart of a method for repairing data in a ROM mode of a data storage device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0019] The method for a data storage device to enter a read-only memory (ROM) mode and the method for a data storage device to perform data repair in the ROM mode provided in the embodiments of the present invention can be applied to portable data storage devices such as solid-state data storage devices (SSDs) or other electronic products that use non-volatile memories such as flash memories (Nand Flash) as data storage devices.
[0020] The initialization of the data storage device mainly includes two stages. The first stage is that the system-on-chip control circuit of the data storage device executes the read-only memory program (ROM Code), and the second stage is to load and execute the boot program (Boot Code) to load and execute the firmware (Firmware). If the initialization is successfully completed, the data storage device enters the standby state. The data storage device repair method provided by the embodiment of the present invention mainly monitors the initialization process of the data storage device. If the data storage device is successfully initialized and enters the standby state (Ready), the system-on-chip control circuit of the data storage device will send a normal signal to the power manager, and there is no need to start the data storage device repair (Restore) program of the present invention. Otherwise, the data storage device repair program of the present invention is started.
[0021] The method for the data storage device of the present invention to enter the ROM mode can be divided into two implementation methods. The first implementation method is to perform a power masking action on the non-volatile memory. Since the power is masked, the non-volatile memory cannot operate normally, which will cause the SSD controller of the data storage device to be unable to load the boot program or boot loader from the non-volatile memory within the preset time. In this way, the SSD controller avoids loading a problematic boot program or firmware and causing the data storage device to be unable to operate normally, thereby achieving the purpose of the present invention. The implementation method is as follows: First, the SSD controller commands the power management circuit to reset the power supply, then the power management circuit supplies power to the SSD controller, allowing the SSD controller to execute the ROM Code, and then the power management circuit supplies power to the reset circuit. Finally, the power management circuit supplies power to the non-volatile memory. Since the power management circuit does not supply power to the non-volatile memory in time, the non-volatile memory cannot operate in time, which causes the SSD controller to be unable to load the BootCode / Boot Loader from the non-volatile memory in time, thereby forcing the SSD controller to only execute the ROM Code, or stay in ROM mode. Since the ROMCode can function normally, the data storage device repair method of the present invention can be executed on the data storage device.
[0022] The second implementation method is that the power management circuit pulls down the enable port of the data storage device to a low level through the repair port, then resets all power supplies of the data storage device, and then re-powers the data storage device. Since the enable port is at a low level, during the stage of re-powering the data storage device, the system single chip control circuit only executes the ROM Code and does not load the Boot Code / Boot Loader. Since the ROM Code can operate normally, the method of performing data repair on the data storage device in ROM mode of the present invention can be executed on the data storage device at this time.
[0023] First, the first implementation method should be explained. Figure 1 , Figure 11 is a schematic diagram of a system architecture of a data storage device according to an embodiment of the present invention. The data storage device 10 can be connected to a host 20 and process host commands from the host 20, such as data reading or data writing. The data storage device 10 mainly includes an SSD controller 110, a power management circuit 120, a non-volatile memory 140, and a reset circuit 150. The SSD controller 110 is internally provided with a read-only memory (ROM) 130 and has a status port SP, and the power management circuit 120 has a monitoring port MP. In addition, the power line of the SSD controller 110 can be coupled to the power management circuit 120. The signal line and the power line of the non-volatile memory 140 can be respectively coupled to the SSD controller 110 and the power management circuit 120. The signal line and the power line of the reset circuit 150 can be respectively coupled to the SSD controller 110 and the power management circuit 120. The SSD controller 110 mainly includes a central processing unit (CPU), a general purpose input and output (GPIO) interface, a host communication interface, and a non-volatile memory communication interface. The read-only memory 130 stores a read-only memory program. The non-volatile memory 140, such as a flash memory, stores the Boot Code / BootLoader. The power management circuit 120 preferably transmits data / signals with the SSD controller 110 through the GPIO interface. The status port SP and the monitoring port MP can be constructed on the GPIO interface or can be independent data ports. It should be noted that the power management circuit 120 can be in the form of an integrated circuit, or it can be in the form of a discrete component, or it can be integrated into the SSD controller 110. In addition, the reset circuit 150 can be in the form of an integrated circuit, or it can be in the form of a discrete component, or it can be integrated into the SSD controller 110.
[0024] Figure 2 is a flow chart of a method for a data storage device to enter a ROM mode according to an embodiment of the present invention, Figure 3 FIG. 1 is a timing diagram of a data storage device entering ROM mode according to an embodiment of the present invention. In step S202, the power management circuit 120 determines whether it receives a normal signal GOOD from the SSD controller 110 within a predetermined time T(G). Figure 3 The waveform of GPIO_GOOD (drawn by a chain line) indicates that the SSD controller 110 can load and execute the boot program normally, and can load and execute the firmware normally. This normal signal GOOD is, for example, a high-level signal. In other words, the SSD controller 110 can transmit the normal signal GOOD to the power management circuit 120 through the status port SP, and the power management circuit 120 can receive the normal signal GOOD through the monitoring port MP. The monitoring port MP and the status port SP mentioned here, for example, use a GPIO interface.
[0025] As mentioned above, in the first stage of initialization, such as Figure 3 As shown by the waveform of Core Power and the waveform of Flash Power, after the power management circuit 120 sequentially supplies power to the SSD controller 110 and the non-volatile memory 140, there is a first buffer time T(R) between supplying power to the SSD controller 110 and the non-volatile memory 140. The SSD controller 110 can preferably complete the execution of the ROM Code within the first buffer time T(R), and the SSD controller 110 can preferably complete the execution of the Boot Code / Boot Loader within the second buffer time T(B). Then, the power management circuit 120 supplies power to the reset circuit 150, as shown by the waveform of RESET, and the SSD controller 110 can preferably send a normal signal GOOD to the power management circuit 120 within the predetermined time T(G).
[0026] In step S204, the power management circuit 120 supplies power to the data storage device 10 again, but stops supplying power to the non-volatile memory 140. If the power management circuit 120 does not receive the normal signal GOOD from the SSD controller 110 within the predetermined time T(G), it may stop supplying power to the SSD controller 110, the non-volatile memory 140, and the reset circuit 150 immediately or after the buffer time T(Restore), and then supply power to the SSD controller 110 and the reset circuit 150 again, but stop supplying power to the non-volatile memory 140, or perform a power shielding operation on the non-volatile memory 140. After supplying power to the SSD controller 110, the SSD controller 110 can preferably complete the execution of the ROM Code within the first buffer time T(R). Since the non-volatile memory 140 is not supplied with power, the non-volatile memory 140 cannot operate, and the SSD controller 110 cannot read the Boot Code / Boot Loader within the second buffer time T(B), so that the SSD controller 110 stays in the ROM mode. In addition, the power management circuit 120 may also supply power to the non-volatile memory 140 after the second buffer time T(B), so that the SSD controller 110 remains in the ROM mode, but the non-volatile memory 140 can operate normally.
[0027] See also Figure 4 , Figure 41 is a flow chart of a method for repairing data in ROM mode of a data storage device according to an embodiment of the present invention. In step S402, the SSD controller 110 downloads a debugging program from the host 20 in ROM mode. In step S404, the SSD controller 110 executes the debugging program to generate error information. In step S406, the SSD controller 110 uploads the error information to the host device 20. After receiving the error information uploaded from the SSD controller 110, the host device 20 analyzes the error information to generate an update program. In step S408, the SSD controller 110 downloads the update program from the host 20 and executes the update program to complete the repair of the data storage device 10. The update program is preferably the updated Boot Code / Boot Loader or firmware, and the SSD controller 110 preferably stores the updated Boot Code / Boot Loader or firmware in the non-volatile memory 140. Thereby, the data storage device 10 can automatically execute the data storage device repair procedure without disassembly or delivery to a repair station, thereby greatly improving the time and convenience of processing the data storage device repair.
[0028] Next, the second implementation method will be described. Figure 5 , Figure 5 1 is a schematic diagram of the system architecture of a data storage device according to another embodiment of the present invention. The data storage device 30 can be connected to the host 20 and process host commands from the host 20, such as data reading or data writing. The data storage device 30 mainly includes an SSD controller 310, a power management circuit 320, a non-volatile memory 340 and a reset circuit 350, wherein the SSD controller 310 is internally provided with a read-only memory (ROM) 330 and has a status port SP and an enable port EP, and the power management circuit 320 has a monitoring port MP and a repair port RP. It should be noted that since the architecture of the data storage device 30 is substantially the same as that of the data storage device 10, the similar parts have been described in detail in the aforementioned embodiment, and will not be repeated here, and only the key points will be summarized. The power management circuit 320 preferably transmits data with the SSD controller 310 through a GPIO interface, and the enable port EP and the repair port RP can be constructed on the GPIO interface or can be independent data ports.
[0029] Figure 6 is a flow chart of a method for a data storage device to enter a ROM mode according to another embodiment of the present invention, Figure 7 FIG. 1 is a timing diagram of a data storage device entering ROM mode according to another embodiment of the present invention. In step S602, the power management circuit 320 determines whether it receives a normal signal GOOD from the SSD controller 310 within a predetermined time T(G). Figure 7The waveform of GPIO_GOOD (drawn by a chain line) indicates that the SSD controller 310 can load and execute the boot program normally, and can load and execute the firmware normally. In other words, the SSD controller 310 can transmit the normal signal GOOD to the power management circuit 320 through the status port SP, and the power management circuit 320 can receive the normal signal GOOD through the monitoring port MP.
[0030] In step S604, the power management circuit 320 pulls down the enable port EP of the SSD controller 310 to a low level through the repair port RP. Figure 7 This is indicated by the waveform of #GPIO_ROM, which means that the SSD controller 310 will only execute the ROM Code and will not load the Boot Code / Boot Loader. Furthermore, if the power management circuit 320 does not receive the normal signal GOOD from the SSD controller 310 within the predetermined time T(G), it can pull down the enable port EP of the SSD controller 310 to a low level through the repair port RP immediately or after the buffer time T(Restore).
[0031] In step S606, when the repair port RP is activated, the power management circuit 320 supplies power to the data storage device 10 again. Figure 7 As shown, the power management circuit 320 stops supplying power to the SSD controller 310, the non-volatile memory 340 and the reset circuit 350 after the buffer time T (Restore), and then supplies power to the SSD controller 310, the non-volatile memory 340 and the reset circuit 350 again. After supplying power to the SSD controller 310, the SSD controller 310 can preferably complete the execution of the ROM Code within the first buffer time T (R). Since the SSD controller 310 determines that the enable port EP is at a low level, regardless of whether the power management circuit 320 supplies power to the non-volatile memory 340, the SSD controller 310 cannot read the Boot Code / Boot Loader within the second buffer time T (B), causing the SSD controller 310 to remain in ROM mode. In other words, the SSD controller 310 will only execute the ROM Code, and will not load the Boot Code / Boot Loader.
[0032] See also Figure 8 , Figure 8It is a flow chart of a method for repairing data in ROM mode according to another embodiment of the present invention. In step S802, the SSD controller 310 downloads a debugging program from the host 20 in ROM mode. In step S804, the SSD controller 310 executes the debugging program to generate an error message. In step S806, the SSD controller 310 uploads the error message to the host device 20. After receiving the error message uploaded from the SSD controller 310, the host device 20 analyzes the error message to generate an update program. In step S808, the SSD controller 310 downloads the update program from the host 20 and executes the update program to complete the repair of the data storage device 30. The update program is preferably the updated Boot Code / Boot Loader or firmware, and the SSD controller 310 preferably stores the updated Boot Code / Boot Loader or firmware in the non-volatile memory 340. Thereby, the data storage device 30 can automatically execute the data storage device repair procedure without disassembly or delivery to a maintenance station, thereby greatly improving the time and convenience of processing the data storage device repair.
[0033] In summary, the data storage device repair method provided by the embodiment of the present invention has a first implementation mode that performs a power shielding action on the non-volatile memory, so that the SSD controller of the data storage device cannot load the startup program or the startup loading program from the non-volatile memory within the preset time, thereby forcing the SSD controller to stay in ROM mode and execute the data storage device repair method of the present invention on the data storage device. The second implementation mode is that the power management circuit pulls down the enable port of the data storage device to a low level through the repair port. Since the enable port is at a low level, the SSD controller will only execute the ROM Code and will not load the startup program when the data storage device is powered on again. Thereby, the SSD controller is forced to stay in ROM mode and execute the data storage device repair method of the present invention on the data storage device. In this way, the data storage device can automatically execute the data storage device repair program without being disassembled or sent to a maintenance station, so as to greatly improve the time and convenience spent on processing the data storage device repair.
[0034] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes by using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A method for repairing a data storage device, It is characterized in that Applicable to a data storage device, the data storage device includes a solid state data storage device (SSD) controller, a power management circuit, a non-volatile memory and a reset circuit, the data storage device repair method includes: The power management circuit determines whether a normal signal sent by the solid-state data storage device controller is received within a predetermined time; If not, the power management circuit restarts power to the data storage device but stops powering the non-volatile memory; Wherein, after the step of stopping the power supply to the non-volatile memory, the method further includes: The solid-state data storage device controller completes execution of a read-only memory program within a first buffer time, but the solid-state data storage device controller cannot read a startup program within a second buffer time, causing the solid-state data storage device controller to remain in a read-only memory (ROM) mode; The data storage device is coupled to a host, and after the step of the solid-state data storage device controller staying in the read-only memory mode, the method further comprises: The solid-state data storage device controller downloads a debugging program from the host in the read-only memory mode; The solid-state data storage device controller executes the debugging program to generate an error message; The solid-state data storage device controller uploads the error information to the host; and The solid-state data storage device controller downloads an update program from the host and executes the update program to complete the repair of the data storage device.
2. A method for repairing a data storage device, It is characterized in that Applicable to a data storage device, the data storage device includes a solid state data storage device (SSD) controller, a power management circuit, a non-volatile memory and a reset circuit, the data storage device repair method includes: The power management circuit determines whether a normal signal sent by the solid-state data storage device controller is received within a predetermined time; If not, the power management circuit pulls down an enable port of the solid-state data storage device controller to a low level through a repair port; and The power management circuit re-powers the data storage device; Wherein, after the step of pulling the enabling port down to a low level, the method further comprises: The solid-state data storage device controller completes execution of a read-only memory program within a first buffer time, but the solid-state data storage device controller cannot read a startup program within a second buffer time, causing the solid-state data storage device controller to remain in a read-only memory (ROM) mode; The data storage device is coupled to a host, and after the solid-state data storage device controller stays in the read-only memory mode, the method further comprises: The solid-state data storage device controller downloads a debugging program from the host in the read-only memory mode; The solid-state data storage device controller executes the debugging program to generate an error message; The solid-state data storage device controller uploads the error information to the host; and The solid-state data storage device controller downloads an update program from the host and executes the update program to complete the repair of the data storage device.
