Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
NON-VOLATILE STORAGE METHOD
Document Type and Number:
WIPO Patent Application WO/2001/082305
Kind Code:
A1
Abstract:
The invention relates to a method of updating data stored in a non-volatile memory having first and second data storage sectors (A and B), one of which contains an updated version of the data stored in the other sector. In the method, the validity of the data in the first and second sectors is checked, and the sector having the more recent valid data is selected. The data is then read from the selected sector and that data is written into an associated RAM. The stored data in the RAM is then updated, and data from the sector not selected is erased. Data is then read from the RAM, and that data is written into the non-selected sector.

Inventors:
APPLETON IAN KENNETH (GB)
Application Number:
PCT/GB2001/001846
Publication Date:
November 01, 2001
Filing Date:
April 25, 2001
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
UBINETICS LTD (GB)
APPLETON IAN KENNETH (GB)
International Classes:
G11C16/10; G11C16/22; (IPC1-7): G11C16/10; G11C16/22
Foreign References:
US5818755A1998-10-06
US5745425A1998-04-28
Other References:
PATENT ABSTRACTS OF JAPAN vol. 1999, no. 12 29 October 1999 (1999-10-29)
Attorney, Agent or Firm:
Pratt, David Martin (Withers & Rogers Goldings House 2 Hays Lane London SE1 2HW, GB)
Download PDF:
Claims:
Claims
1. A method of updating data stored in a nonvolatile memory having first and second data storage sectors, one of which contains an updated version of the data stored in the other sector, the method comprising the steps of : a) checking the validity of the data in the first and second sectors; b) selecting the sector having the more recent valid data; c) reading the data from the selected sector and writing that data into an associated RAM; d) updating the data stored in the RAM e) erasing data from the sector not selected in step b); and f) reading data from the RAM and writing that data into said nonselected sector.
2. A method as claimed in claim 1, wherein steps a) to c) are carried out on power up of apparatus associated with the nonvolatile memory, and steps d) to f) are carried out on power down of said apparatus.
3. A method as claimed in claim 1 or claim 2, wherein the data stored in each of the sectors is constituted by user data, checksums and a sequence number, and wherein the step of checking the validity of the data in the sectors is carried out using the checksums.
4. A method as claimed in claim 3, wherein the sector selection step is carried out by reading the sequence numbers associated with the data in the first and second sectors, and by selecting the sector having the larger sequence number unless only one sector contains valid data, in which case that sector is selected.
5. A method as claimed in claim 3 or claim 4, wherein the erasing step is carried out by reading the sequence numbers associated with the data in the first and second sectors, and selecting the sector having the smaller sequence number unless only one sector contains valid data, in which case the other sector is selected.
6. A method as claimed in any one of claims 1 to 5, further comprising an initial step of storing a valid version of the data in one of the sectors prior to the first power up of the apparatus associated with the nonvolatile memory.
7. A method as claimed in claim 6, wherein the initial storage step is an initial programming step.
8. A computer readable storage medium having a computer programme recorded thereon, the programme carrying out a method of updating data stored in a nonvolatile memory having first and second data storage sectors, one of which contains an updated version of the data stored in the other, the method comprising the steps of : a) checking the validity of the data in the first and second sectors; b) selecting the sector having the more recent valid data; c) reading the data from the selected sector and writing that data into an associated RAM; d) updating the data stored in the RAM; e) erasing data from the sector not selected in step b); and f) reading data from the RAM and writing that data into said nonselected sector.
9. A computer readable storage medium as claimed in claim 8, wherein a flash ROM constitutes said medium.
Description:
Non-volatile Storage Method This invention relates to a non-volatile storage method, and in particular to a method of updating data stored in a non-volatile memory such as a memory chip of a mobile telephone.

In many products, it is necessary to store data in a non-volatile memory. There are two main types of non-volatile memory device, namely an electrically erasable programmable read only memory (EEPROM) and a flash ROM. The first of these consists of a series of small data units that can be written to independently, each unit being sized to store only one or two bytes. A flash ROM, on the other hand, consists of a set of sectors, each of which can be erased or written to independently, but each sector can contain several thousand bytes. The disadvantage of an EEPROM is that it is very limited in its storage capacity, and the disadvantage of a flash ROM is that it is generally not possible to re-programme data in a given sector without first erasing that sector. Because of its superior storage capability, a flash ROM is generally used in a mobile telephone and in a digital t. v. set-top decoder.

A mobile telephone incorporates a memory chip (a flash ROM) for storing calibration data such as transmit power requirements and other radio parameters, together with personal data, such as personal telephone numbers and ringing options. From time to time, it is necessary to update part of the data stored by such a memory chip, whilst preserving the rest of the data in its original form.

When a flash ROM is used in such a product, frequent updating is required. As mentioned above, however, it is necessary to erase an entire sector of a flash ROM before updated data can be saved to that sector. As it can take up to half a second to erase a sector of a flash ROM, problems can arise if there is a power interruption during the erase procedure. In particular, all the user data can be lost if such a power interruption occurs.

The present invention provides a method of updating data stored in a non-volatile memory having first and second data storage sectors, one of which contains an updated version of the data stored in the other sector, the method comprising the steps of :- a) checking the validity of the data in the first and second sectors; b) selecting the sector having the more recent valid data; c) reading the data from the selected sector and writing that data into an associated RAM; d) updating the data stored in the RAM e) erasing data from the sector not selected in step b); and f) reading data from the RAM and writing that data into said non-selected sector.

Preferably, steps a) to c) are carried out on power up of apparatus associated with the non-volatile memory, and steps d) to f) are carried out on power down of said apparatus.

In a preferred embodiment, the data stored in each of the sectors is constituted by user data, checksums and a sequence number; the step of checking the validity of the data in the sectors is carried out using the checksums, the sector selection step is carried out by reading the sequence numbers associated with the data in the first and second sectors, and by selecting the sector having the larger sequence number unless only one sector contains valid data, in which case that sector is selected; and the erasing step is carried out by reading the sequence numbers associated with the data in the first and second sectors, and selecting the sector having the smaller sequence number unless only one sector contains valid data, in which case the other sector is selected.

Preferably, the method further comprises an initial step of storing a valid version of the data in one of the sectors prior to the first power up of the apparatus associated with the non-volatile memory. Advantageously, the initial storage step is an initial programming step.

The invention further provides a computer readable storage medium having a computer programme recorded thereon, the programme carrying out a method of updating data

stored in a non-volatile memory having first and second data storage sectors, one of which contains an updated version of the data stored in the other, the method comprising the steps of :- a) checking the validity of the data in the first and second sectors; b) selecting the sector having the more recent valid data; c) reading the data from the selected sector and writing that data into an associated RAM; d) updating the data stored in the RAM; e) erasing data from the sector not selected in step b); and f) reading data from the RAM and writing that data into said non-selected sector.

Preferably, a flash ROM constitutes said medium.

The invention will now be described in greater detail, by way of example, with reference to the drawings, in which:- Figure 1 is a schematic diagram showing the arrangement of sectors in a flash ROM; Figure 2 is a flow diagram showing two sectors of a flash ROM, and illustrating the sector validation and selection process on power up; Figure 3 is a flow diagram similar to that of Figure 2, but illustrating the updating process carried out on power down; and Figure 4 is a diagram showing the data organisation in the flash ROM and in an associated RAM device.

Referring to the drawings, Figure 1 is a schematic diagram showing a flash ROM having N + 1 sectors, labelled sector 0, sector 1..... sector N. Each of the sectors can be configured to store up to 64 kilobytes of data. The flash ROM forms part of a mobile telephone handset (not shown), and the method of the invention utilises the top two A and B of these sectors, both of which have a storage capacity of 64 kilobytes. The remaining sectors of the flash ROM contain programme data including the programme for updating and controlling the data stored in the first and second sectors.

Prior to the mobile telephone being first used, default calibration data such as transmit power requirements, and default user options such as ringing options are programmed into the sector A of the flash ROM, at the same time as the programming data is input into the remaining sectors of the flash ROM. When the mobile telephone is turned off, all this data is written to the sector B of the flash ROM. Of course, this data may have been amended by the user while the telephone was powered up, in which case the data stored in the sector B would be an updated version of that stored in the sector A. For example, user data such as'phone book information (that is to say telephone numbers input by the user of the mobile telephone) may have been added. Consequently, the flash ROM contains two versions of the calibration and user data, one of which is later than the other. Subsequently, therefore, in the event of data in a given sector being corrupted, or completely lost, there will be a previous version of this data available in the other sector.

The process of updating the calibration and user data in the two sectors A and B will now be described with reference to Figures 2 and 3. When the mobile telephone is turned on, the validity of the data in the two sectors A and B (see Figure 2) is checked using the associated checksums, in parallel steps la and lb. The results of the validity checks are then output to a sector selection step 2 which selects that set of valid data from steps la and lb which has the higher sequence number, the sequence numbers having been ascertained directly from the sectors A and B in steps 3a and 3b.

Obviously, if there is only one valid set of data, that set is selected. Following the sector selection step, the output 5 is used to control a memory copy operation 4, to read data from the selected sector A or B (step 6a or 6b), and to write that data directly into the RAM of the mobile telephone (step 7).

During the use of the mobile telephone, the RAM copy of the data is updated as required. At the end of a session of use, when the mobile telephone is about to be powered down, the RAM data has to be written to the flash ROM. Referring to Figure 3, the first step in this process is to check the validity of the data in the first and second sectors A and B using the associated checksums, in parallel steps lla and lib. The results of the validity checks are then output to a sector selection step 12 which selects

that set of valid data from the steps 1 la and 1 lb which has the lower sequence number, the sequence numbers having been ascertained directly from the sectors A and B in steps 13a and 13b. Obviously, if there is only one valid set of data, the other set is selected. The data in the chosen sector is then erased, and the output 15 is used to control a memory copy operation 14 to read data from the RAM (step 16) and to write that data to that sector (step 17a or 17b).

Figure 4 is a diagram illustrating the correspondence between data storage areas in the flash ROM and in the RAM of the mobile telephone. Thus, as shown at the left-hand side of Figure 4, the flash ROM has an array of file names and indexes stored in the sectors containing programme data. The indexes give the off-set of the start of each file within the sectors A and B used for non-volatile storage, and point to RAM copies of this data shown on the right-hand side of the figure. The programme data includes access functions provided to read a file from the flash ROM and to write it to the RAM copy, and to read data from the flash ROM sectors on power up and to write data to the flash ROM sectors on power down.

The method of the invention allows a flash ROM to be used for non-volatile data storage in applications where it is important to preserve the integrity of the data stored.

The use of a flash ROM in this way removes the need for a separate EEPROM for such applications. Moreover, as mentioned above, the technique protects against loss of all the non-volatile data if the power supply is interrupted during the sector erase phase or the re-programming phase.

It will be apparent that use of the invention is not limited to flash ROM for mobile telephones, and can be used in any application where it is necessary to store data in a non-volatile memory.