CN110780724A - Method for resetting flash memory device executed by storage controller of host - Google Patents

Method for resetting flash memory device executed by storage controller of host Download PDF

Info

Publication number
CN110780724A
CN110780724A CN201910786451.5A CN201910786451A CN110780724A CN 110780724 A CN110780724 A CN 110780724A CN 201910786451 A CN201910786451 A CN 201910786451A CN 110780724 A CN110780724 A CN 110780724A
Authority
CN
China
Prior art keywords
reset
firmware
reset command
command
flash memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910786451.5A
Other languages
Chinese (zh)
Inventor
张为
赵创
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
Original Assignee
Tianjin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University filed Critical Tianjin University
Priority to CN201910786451.5A priority Critical patent/CN110780724A/en
Publication of CN110780724A publication Critical patent/CN110780724A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/24Resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention relates to a method of resetting a flash memory device performed by a memory controller of a host, comprising the steps of: upon receiving a hardware reset command from the processor, driving the memory controller to perform less than a maximum number of normal reset operations; when the normal reset is unsuccessful, the drive memory controller performs a forced reset. Determining whether the forced reset is successful, and replying a message of success/failure of hardware reset to the microprocessor; after receiving the reset command from the host side, the microprocessor determines whether the reset command is a conventional reset command or a forced reset command; when the reset command is a normal reset command, reading first firmware from the storage unit through the access interface, and covering second firmware of the RAM with the first firmware; when the reset command is a forced reset command, the third firmware is acquired from the electronic device outside the flash memory, and the second firmware of the RAM is rewritten with the third firmware.

Description

Method for resetting flash memory device executed by storage controller of host
Technical Field
The invention belongs to the field of flash memories, and particularly relates to a flash memory device and a method for resetting the flash memory device by using the same.
Background
The storage mode of the flash memory is based on a Floating Gate (Floating Gate) technology, and one MOS transistor consists of two overlapped gates: the first is completely surrounded by oxide and the second is connected to the outside. The oxide layer between the outside connected gate and the other gate is equivalent to form an electronic isolation strip, so that the electrons in the gate can be kept for a long time. The process of charging and discharging this isolated portion is called writing (program) and erasing (erase). The potential Vth inside the isolated part is changed due to charging and discharging, which is a typical operating principle of a MOS transistor. When a voltage is applied to a memory cell, we can respectively handle two situations: we identify a "1" when the voltage we apply is higher than Vth, and a "0" otherwise. Flash memory devices typically include NOR flash memory devices and NAND flash memory devices. NOR flash devices are random access, and a host accessing a NOR flash device can provide any address to the device on its address pins and immediately retrieve data stored at that address on the device data pins. While NAND flash memory devices are serial access.
NAND flash memory devices typically read or program several pages of data from memory cells at a time. Sometimes firmware stored in a RAM (random access memory) of a NAND flash memory device for operating an access interface connected to a memory cell may contain an error bit and must be updated with a copy stored in the NAND memory cell through a reset process. However, firmware stored in the NAND memory cell may be damaged, thereby causing deadlock during reset. Therefore, methods for resetting a flash memory device and apparatuses using the same to solve the above-described problems are needed.
Disclosure of Invention
The invention aims to provide a method for resetting a flash memory device to avoid the problem of deadlock caused in the resetting process, and the technical scheme is as follows:
a method of resetting a flash memory device performed by a storage controller of a host, comprising at least the steps of:
(1) upon receiving a hardware reset command from the processor, driving the memory controller to perform less than a maximum number of normal reset operations;
(2) when the normal reset is unsuccessful, the drive memory controller performs a forced reset. And determining whether the forced reset is successful, and replying a message of success/failure of hardware reset to the microprocessor.
(3) After receiving the reset command from the host side, the microprocessor determines whether the reset command is a conventional reset command or a forced reset command;
(4) when the reset command is a normal reset command, reading first firmware from the storage unit through the access interface, and covering second firmware of the RAM with the first firmware;
(5) when the reset command is a forced reset command, the third firmware is acquired from the electronic device outside the flash memory, and the second firmware of the RAM is rewritten with the third firmware.
Drawings
Fig. 1 is a system architecture of an electronic device.
FIG. 2 is a flow chart of a method of conventionally resetting a flash memory device by a memory controller.
FIG. 3 is a flow chart of a method of forcing a reset of a flash memory device by a memory controller.
FIG. 4 is a flow chart of a method of resetting a flash memory device by a microprocessor.
Detailed Description
FIG. 1 is an electronic device system architecture for use with the present invention. Electronic devices may be equipped with digital cameras, mobile phones, consumer electronics devices, and the like. The flash memory device includes a memory controller and a memory unit. System architecture electronics include a host side and a memory controller that communicate with each other through a flash interface. The flash memory interface may be a UFS (universal flash storage) interface, an eMMC (embedded multimedia card) interface, or the like. UFS and eMMC are common flash storage specifications that may lead to higher data transfer speeds and higher reliability for flash storage, and may not require the use of different types of flash memory cells for different adapters. The host side may include an interconnect layer associated with the memory controller. The host side may also contain an access interface to communicate with the processor of other electronic devices through the access interface using standard protocols, such as USB (universal serial bus), ATA (advanced technology attachment), SATA (serial ATA), PCI-E (peripheral component interconnect express), or others.
The microprocessor of the memory controller may communicate with the memory unit via the access interface using a DDR (double data rate) protocol, such as ONFI. The microprocessor may be a general purpose processor or MCU. The microprocessor loads firmware from the memory unit and stores it in the RAM at system boot. When UFS or eMMC commands and data are received from the host, the microprocessor executes the relevant code to write the data to the specified address of the memory cell and reads the data from its specified address through the indicated access interface. The access interface uses a number of electrical signals, including data lines, clock signals, and control lines, to coordinate the transfer of commands and data between the microprocessor and the memory unit. The data lines are used to transmit commands, addresses and data. The control lines are used to issue control signals such as CE (chip enable), ALE (address latch enable), CLE (command latch enable), WE (write enable), and the like.
Since flash memory has been operating for some time, firmware stored in RAM may be corrupted. In some implementations, the processing unit may issue a hardware reset command for updating firmware of the DRAM using firmware of the memory unit. However, if the firmware of the memory location has been corrupted, the hardware reset will cause a deadlock. Deadlock can therefore be avoided with the reset method of the present invention.
1. FIG. 2 is a method performed by a memory controller of a host to conventionally Reset a Normal Reset flash memory device, comprising the steps of:
(1) receiving a hardware reset command from a processor through a host side access interface;
(2) the controller at the host side starts a counter; .
(3) The controller of the host side drives the interconnection layer of the host side to send a normal reset command to the memory controller;
(4) receiving a result of the normal reset from the controller through the interconnect layer;
(5) the memory controller passes through the interconnect layer on the host side and determines whether the normal reset was successful based on the result.
When the conventional reset fails, performing step (6) the controller at the host side increases the counter by 1;
when the normal reset is successful, the go step (7) loop ends and the host side controller replies with a message through the host side access interface indicating that the hardware reset has been successful to the processor.
Step (8) is then performed to determine whether the counter value equals or exceeds the threshold value. When the counter value does not exceed the threshold, the next iteration of the loop is performed. When the counter value equals or exceeds the threshold, the cycle ends and the controller on the host side drives the interconnect layer on the host side to send a force Reset Super Reset command to the memory controller.
2. FIG. 3 is a method performed by a host storage controller to force a reset of a flash memory device, comprising the steps of:
(1) and when the conventional reset fails, starting forced reset. The controller at the host side drives the interconnection layer at the host side to send a forced reset command to the storage controller;
(2) receiving a result of the forced reset from the memory controller through the interconnect layer;
(3) the memory controller determines whether the forced reset is successful according to a result of the normal reset through an interconnection layer of the host side.
And (4) when the forced reset fails, replying a message indicating that the hardware reset has failed to the processor through the host side access interface.
And (5) when the forced reset is successful, replying a message indicating that the hardware reset is successful to the processor through the host side access interface.
The conventional reset command of step (3) of fig. 2 and the forced reset command of step (1) of fig. 3 may be distinguished by different reset type flags of the same UFS or eMMC command. For example, a reset type flag of "O" of the UFS or eMMC command indicates a conventional reset command. A reset type flag of UFS or eMMC command "1" indicates a forced reset command.
3. FIG. 4 is a flow chart of a method performed by a microprocessor of a memory controller for resetting a flash memory device, the process of which is as follows:
(1) receiving a reset command over an interconnect layer;
(2) the microprocessor judges whether the reset command is a conventional reset command or a forced reset command;
(3) when the received UFS or eMMC command is a normal reset command, executing boot code of an area of the ROM to read firmware from the storage unit and write firmware to the RAM;
(4) when the received UFS or eMMC command is a forced reset command, executing an activation code of an area of the ROM, wherein the activation code is used for acquiring firmware from electronic equipment outside the flash memory;
in step (4) of fig. 3, the firmware may be downloaded from a download site connected to the internet or a LAN (local area network), or may be acquired from another memory. The microprocessor also drives the access interface to program the fetched firmware into the memory unit to replace the original firmware.
(5) After rewriting the firmware of the RAM, it is determined whether the rewritten firmware is correct. The firmware may contain a CRC (cyclic redundancy check) code, in which case the microprocessor may use a decoder to check the CRC code of the firmware in the RAM to determine if the firmware is correct.
And (5) when the overlaid firmware is correct, performing step (6) to drive the interconnection layer to reply a message that the reset is successful to the host side. And (5) when the covered firmware is incorrect, performing the step (7) to drive the No path layer to reply a reset failure message to the host side.

Claims (1)

1. A method of resetting a flash memory device performed by a storage controller of a host, comprising at least the steps of:
(1) upon receiving a hardware reset command from the processor, driving the memory controller to perform less than a maximum number of normal reset operations;
(2) when the normal reset is unsuccessful, the drive memory controller performs a forced reset. And determining whether the forced reset is successful, and replying a message of success/failure of hardware reset to the microprocessor.
(3) After receiving the reset command from the host side, the microprocessor determines whether the reset command is a conventional reset command or a forced reset command;
(4) when the reset command is a normal reset command, reading first firmware from the storage unit through the access interface, and covering second firmware of the RAM with the first firmware;
(5) when the reset command is a forced reset command, the third firmware is acquired from the electronic device outside the flash memory, and the second firmware of the RAM is rewritten with the third firmware.
CN201910786451.5A 2019-08-23 2019-08-23 Method for resetting flash memory device executed by storage controller of host Pending CN110780724A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910786451.5A CN110780724A (en) 2019-08-23 2019-08-23 Method for resetting flash memory device executed by storage controller of host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910786451.5A CN110780724A (en) 2019-08-23 2019-08-23 Method for resetting flash memory device executed by storage controller of host

Publications (1)

Publication Number Publication Date
CN110780724A true CN110780724A (en) 2020-02-11

Family

ID=69383376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910786451.5A Pending CN110780724A (en) 2019-08-23 2019-08-23 Method for resetting flash memory device executed by storage controller of host

Country Status (1)

Country Link
CN (1) CN110780724A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0581012A (en) * 1991-09-25 1993-04-02 Nec Corp Firmware rewrite system for information processor
JPH10149317A (en) * 1996-11-20 1998-06-02 Nec Corp Information processor
KR20000043070A (en) * 1998-12-28 2000-07-15 김영환 Micro processor having variable reset address
KR20130011186A (en) * 2011-07-20 2013-01-30 엘에스산전 주식회사 A method for downloading firmware of module for plc
TW201835771A (en) * 2017-03-16 2018-10-01 美商高通公司 Methods and apparatuses for copying a data page in an unmanaged flash memory device
US20190073134A1 (en) * 2017-09-01 2019-03-07 Silicon Motion, Inc. Methods for resetting a flash memory device and apparatuses using the same

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0581012A (en) * 1991-09-25 1993-04-02 Nec Corp Firmware rewrite system for information processor
JPH10149317A (en) * 1996-11-20 1998-06-02 Nec Corp Information processor
KR20000043070A (en) * 1998-12-28 2000-07-15 김영환 Micro processor having variable reset address
KR20130011186A (en) * 2011-07-20 2013-01-30 엘에스산전 주식회사 A method for downloading firmware of module for plc
TW201835771A (en) * 2017-03-16 2018-10-01 美商高通公司 Methods and apparatuses for copying a data page in an unmanaged flash memory device
US20190073134A1 (en) * 2017-09-01 2019-03-07 Silicon Motion, Inc. Methods for resetting a flash memory device and apparatuses using the same

Similar Documents

Publication Publication Date Title
EP1700207B1 (en) Flash memory system startup operation
US10984882B2 (en) Run-time memory device failure detection enhancement
US10901656B2 (en) Memory system with soft-read suspend scheme and method of operating such memory system
US8352672B2 (en) Memory system with nonvolatile memory
US8392794B2 (en) Non-volatile memory device and data processing method thereof
US20190227926A1 (en) Method for managing flash memory module and associated flash memory controller and electronic device
TW202008171A (en) Data writing method and storage controller
US7944747B2 (en) Flash memory device and method for programming flash memory device having leakage bit lines
KR20170090177A (en) Memory system, semiconductor memory device and operating method thereof
CN113741798A (en) Data storage device and operation method thereof
US20190073134A1 (en) Methods for resetting a flash memory device and apparatuses using the same
TWI550625B (en) Memory management method, memory storage device and memory controlling circuit unit
CN110780724A (en) Method for resetting flash memory device executed by storage controller of host
US20210383863A1 (en) Nonvolatile memory device and method of programing with capability of detecting sudden power off
CN114822664A (en) Risk assessment method based on data priority, storage device and control circuit
CN111831210B (en) Memory management method, memory control circuit unit and memory storage device
KR102157672B1 (en) Semiconductor apparatus and method of operating the same
CN110764947B (en) Data writing method and memory controller
US10732894B2 (en) Method of writing in a non-volatile memory device and corresponding non-volatile memory device
CN112732199A (en) Data access method, memory control circuit unit and memory storage device
KR20210103234A (en) Controller and operating method thereof
US11934254B2 (en) Memory device with embedded firmware repairing mechanism
CN113946469B (en) Data error correction processing method and device for solid state disk
US20240028506A1 (en) Mapping table re-building method, memory storage device and memory control circuit unit
US20240094952A1 (en) System and storage device for executing read command using read recovery level and methods of operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200211