The present application is based on, and claims priority from, Taiwan Application Serial Number 94129364, filed Aug. 26, 2005, the disclosure of which is hereby incorporated by reference herein in its entirety.
1. Field of Invention
The invention relates to a method for supporting flash memory and, in particular, to a method for supporting unrecognizable flash memory.
2. Related Art
Since the invention of flash memory in the late 1980s, it has been widely applied. For example, mobile phones, smart phones, personal digital assistants, and digital cameras all use flash memory as their storage memory. As these electronic products require a lot of flash memory, they promote the technological development of flash memory.
Unfortunately, a flash memory with an unrecognizable identification (ID) often causes problems, because all the current flash memory controllers need to know the ID of the flash memory in order to find a corresponding program to operate the memory. Whenever a new kind of flash memory is used, the operating system usually has trouble supporting it. This problem cannot be resolved by the system code because the code is stored in the flash memory. Therefore, it is not operable until the flash ID is recognized.
Currently, there are two solutions. One is to add a serial electrically-erasable programmable read-only memory (serial EEPROM) to support a flash memory with an unknown ID. The other method is to directly modify the internal read-only memory (ROM) code to support the flash memory. Regardless, either method increases cost and wastes time.
It is therefore imperative to provide a method for supporting an unrecognizable flash memory.
In view of the foregoing, it is an objective of the invention to provide a method for supporting an unrecognizable flash memory in order to support the flash memory with an unknown ID.
A preferred embodiment of the invention includes at least the steps of: sending a parameter table comprising strings for error checking to a specified address (device 0/block 0/page 0), checking if an identification is unknown, reading the specified address (device 0/block 0/page 0) in the flash memory to determine its cycle if the identification is unknown, checking if the strings for error checking are correctly read, and accessing the system code of the flash memory. Recognizing a flash memory with an unknown ID using this method enables one to obtain immediate support without increasing cost.
These and other features, aspects and advantages of the invention will become apparent by reference to the following description and accompanying drawings which are given by way of illustration only, and thus are not limitative of the invention, and wherein:
The present invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements.
When checking the type of the flash memory 102, the computer 100 first sends a parameter table to a specified address (device 0/block 0/page 0) to the flash memory 102. The parameter table includes commands, addresses, and data. The parameter table is then used to check the ID of the flash memory 102. If the ID of the flash memory 102 can be identified as one in the ID list of the ROM 105, then it is not an unknown ID and the ROM 105 determines the type of the flash memory 102. If the ID of the flash 102 is different from any one in the ID list of the flash memory 105, then it is an unknown ID and the ROM 104 directly checks the address (device 0/block 0/page 0) of the flash memory 102. Since the commands in the parameter table of the flash memory 102 are roughly the same, the type of the flash memory 102 can be determined by reading the address cycle of the parameter table in the flash memory 102.
For example, suppose there is a flash memory 102 with an unknown ID and an address cycle of 3. First, the computer 100 sends a parameter table to a specified address (device 0/block 0/page 0) of the flash memory 102. The ID of the flash memory 102 is checked. Since the ID of the flash memory 102 is different from any one in the ID list of the ROM of the flash memory controller 103, the ID of the flash memory 102 is thus determined to be an unknown ID. Therefore, the ROM 104 directly tests the specified address (device 0/block 0/page 0) of the flash memory 102 and determines that the address cycle of the parameter table of the flash memory 102 is 3, thereby determining the type of the flash memory 102.
To confirm the correctness of the operation, the parameter table includes strings for error checking. They are used for checking sums or cyclic redundancy checks (CRC) to avoid erroneous determinations.
Reference is made simultaneously to
The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
94129364 | Aug 2005 | TW | national |