1. Technology Field
The present invention generally relates to a program code loading and accessing method, and more particularly, to a method of loading and accessing a program code in a rewritable non-volatile memory module, and a memory controller and a memory storage apparatus using the same.
2. Description of Related Art
Along with the widespread of digital cameras, cell phones, and MP3 in recently years, the consumers' demand to storage media has increased drastically. Rewritable non-volatile memory is one of the most adaptable storage media to portable electronic products (for example, cell phones, personal digital assistants (PDAs), and notebook computers) due to its many characteristics such as data non-volatility, low power consumption, small volume, non-mechanical structure, and fast access speed. Thus, in recent years, the flash memory industry has become a major part of the electronic industry.
Conventionally, the firmware code (program code) of a flash memory controller in a flash memory storage apparatus is stored in a programmable read-only memory (PROM, therefore is not updatable) inside the flash memory controller and is loaded into a static random access memory (SRAM) inside the flash memory controller to be executed when the flash memory controller is in operation. However, along with the increases in the size, complexity, and revision rate of firmware codes, firmware codes should be updatable and correctable. In order to reduce the sizes of storage apparatuses and conveniently update and correct firmware codes, some techniques have been developed for directly storing a firmware code into a NAND flash memory module of a memory storage apparatus and loading the firmware code into a SRAM of a memory controller when the flash memory storage apparatus is started. Since no additional PROM is disposed, the size and fabrication cost of the memory storage apparatus can be effectively reduced.
However, more bit errors may be detected in data stored in flash memory along with the increase in circuit integrity and the reduction in device size. In order to avoid such situation that a firmware code cannot be successfully loaded and accordingly the system cannot be started caused by too many bit errors, two (or more) program code copies of the firmware code are usually stored in a flash memory of the flash memory storage apparatus. If the entire first program code copy cannot be successfully read, the memory controller tries to load the entire second program code copy. However, if the entire second program code copy is still not successfully loaded, the flash memory storage apparatus cannot be started. Thereby, a more reliable firmware code loading method is desired.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.
USPTO Backgrounds
USPTO Backgrounds