The present invention relates to a memory rewriting apparatus which controls rewriting of data stored in a memory, such as rewritable nonvolatile memory, of a portable terminal, such as a portable telephone and a PDA.
In a portable terminal, a memory (e.g. a flash memory) is divided into a plurality of storage areas. In the storage areas, a boot program, which is started up when the portable terminal is in the initial state, various system programs, fonts, colored illustrations, other various data and the like are stored respectively. These programs and data are read into a main memory and used according to instructions from a CPU.
A flash memory is a medium which electrically stores data on semiconductor devices thereof. The manner how the flash memory deals with data is the same as a RAM for personal computers. However, the flash memory can keep data without power, whereas the RAM loses its content when the power is turned off. Also, the flash memory can be downsized. Furthermore, its content can be erased collectively, and it realizes high-speed data writing. Meanwhile, a rechargeable battery, which is designed to be charged and discharged repeatedly, is generally used for a portable terminal as a power source. In the case where the rechargeable battery is used, the basic functions of the portable terminal, such as communication and text data input, become impossible when the battery runs out of the power. However, if the flash memory is used as a memory for storing data, the data in the memory is not to be lost even in the above case. Also, in the case of rewriting only one bit of data, a frequency of data rewriting can be decreased by using the flash memory, because the flash memory can be accessed randomly just as the RAM, whereas all the bits have to be erased for rewriting only one bit when an EEPROM is used. As a result, necessary power for data rewriting can be saved. The flash memory is effective for reducing power consumption especially for the case where the rechargeable battery is used, because the discharge time of the rechargeable battery is limited.
Sometimes there is a need to rewrite only specific data in a memory. In this case, if the flash memory is used, it is possible to individually rewrite the data in each one of memory blocks, which have been allocated as storage areas. Therefore, the flash memory is suitable for rewriting only specific data that requires rewriting. Recently, malfunction of a portable terminal has often become a problem. This malfunction results from bugs in system programs for operating the portable terminal (e.g. a portable telephone) and the inconsistency of data caused by the difference among data versions, and so on. Especially when considering this fact, there is a need for rewriting only such system programs or data which cause the malfunction.
Based on the above background, the flash memory is often used as a memory in a portable terminal for storing various data.
Meanwhile, distributors of portable terminals sometimes offer upgrade service to users who hold portable terminals which do not function properly. Through this service, system programs or data with problems are upgraded to normal ones.
For rewriting programs or data in the flash memory, the portable terminal is to be connected to a general-purpose computer with a serial interface, and upgrade information (programs and data) is to be transmitted to the portable terminal to upgrade and rewrite the data stored in the flash memory. For performing this rewriting, the battery in the portable terminal is used as the power source. However, the following problems may occur during the rewriting.
Usually, the portable terminal includes means for detecting the remaining battery charge. The amount of the detected battery charge is notified to the user by displaying the amount with a battery level indicator and so on. Before performing the upgrade, the user or the provider of the service checks the amount of the remaining battery charge, and if it seems to be not sufficient for the upgrade, the upgrade would be performed after recharging the battery.
However, if recharging is needed to secure sufficient battery charge before the upgrade, the user can not receive the service immediately. At worst, the upgrade does not finish until a few hours after the user goes to the store, or until the next day. This disappoints expectations by the user who wishes to use the portable terminal with upgraded performance realized by the newest version of data or programs as soon as possible. Of course, this is not a preferable situation for manufacturer of the portable terminal as well.
Meanwhile, even if the amount of the remaining battery charge seems to be sufficient, it is often hard to figure out how many memory areas have to be upgraded, because the versions of the data and the programs stored in the flash memory differ with each model of the portable terminal. Also, the amount of the battery power consumption depends on the amount of the data which is to be upgraded, and on rewriting performance, such as the rewritable amount of the data per unit electric power. In some portable terminals, the means for detecting the remaining battery charge can just roughly show the remaining charge level, and the user can not know the remaining amount of the battery charge exactly. This causes a problem that data rewriting stops in the middle because of a shortage of battery charge. When this happens, the portable terminal can come to complete standstill. Also, if a boot program is rewritten halfway through, the portable terminal may not work properly because of an inconsistency among data and programs, even after recharging the battery.
As described above, there are cases where the data rewriting stops in the middle because of a shortage of battery charge, even if there seemed to be sufficient remaining battery charge before the rewriting starts.
In view of the above problems, the present invention aims to provide a memory rewriting apparatus which can rewrite data stored in a memory of a portable terminal without stopping in the middle.
The object can be achieved by a memory rewriting apparatus which rewrites data stored in a memory of a portable terminal, comprising: a remaining charge obtaining unit operable to obtain an amount of remaining charge in a battery of the portable terminal; a storage unit operable to store, in advance, estimated battery consumption by the portable terminal for rewriting the data; and a judging unit operable to judge whether the memory storing the data is rewritable by comparing the amount of the remaining charge to the estimated battery consumption.
According to the stated construction, the memory rewriting apparatus does not rewrite data stored in a memory regardless of an amount of charge of a battery included in a portable terminal, but can detect current amount of remaining battery charge and rewrite the data only when the amount is sufficient for the rewriting. This realizes a rewriting process in which an amount of the remaining battery charge is taken in consideration. As a result, the rewriting of data in a memory included in the portable terminal can be completed without stopping in the middle. This prevents the inconsistency among data, and ensures proper operations of the portable terminal after finishing the rewriting.
The memory rewriting apparatus may start the rewriting only when the amount of remaining charge is sufficient for completing the rewriting.
According to the stated construction, the memory rewriting apparatus does not equally rewrite all pieces of data in the memory including pieces of data which do not require the rewriting, but can detect the current amount of remaining battery charge and selectively rewrite only pieces of data which are rewritable with the amount of remaining battery charge. This speeds up the rewriting process.
The memory rewriting apparatus may further comprise: a notification unit operable to notify an operator when the amount of remaining charge is not sufficient for completing the rewriting.
According the stated construction, the memory rewriting apparatus can inform the operator in the case where the current amount of the battery charge is not sufficient for rewriting the data in the memory. This enables the operator to deal with the case where the remaining battery charge is not sufficient, by changing or recharging the battery.
The memory in the portable terminal may be divided into a plurality of memory areas, the judging unit may check versions of pieces of data respectively stored in the memory areas, may judge whether a memory area storing a piece of data which requires the rewriting is a rewritable memory area by comparing the amount of remaining charge to an estimated battery consumption for rewriting the piece of data, and may perform the rewriting of the piece of data in a case where the memory area is the rewritable memory area.
According to the stated construction, the battery consumption for rewriting can be minimized. As a result, the rewriting of data in the memory included in the portable terminal can be completed without stopping in the middle even in the case where the current amount of the remaining battery charge is not sufficient. Also, the rewriting is not to be performed on pieces of data which do not necessarily require the rewriting. This speeds up the rewriting process.
The memory in the portable terminal may be divided into a plurality of memory areas, and when there are two or more memory areas that require the rewriting, the judging unit may check versions of pieces of data stored in the memory areas, may perform the judgment by comparing the remaining charge to a total amount of battery consumptions for rewriting all memory areas which respectively store pieces of data requiring the rewriting, and may perform the rewriting only in a case where all the memory areas which store the pieces of data requiring the rewriting are rewritable.
According to the stated construction, all pieces of the data which require the rewriting can be rewritten. This prevents the inconsistency among data caused by the deference among data versions.
The present invention is especially effective in a case where at least one of the pieces of data stored in the memory is a boot program.
This is because that if the rewriting is not completed in the case where a piece of data stored in the memory is a boot program, an update mode can not be started and the following rewriting process can not be performed.
The following specifically describes a memory rewriting apparatus which is an embodiment of the present invention. Note that although a memory rewriting apparatus for rewriting data in a portable telephone is described in the embodiment, the present invention can be applied not only to portable telephones but also to other portable terminals.
Overall Construction
As
As
The portable telephone 20 includes a control unit 201, a flash memory 202, a remaining charge detection unit 203, and a battery 204.
Detailed Construction
Portable Telephone 20
The control unit 201 included in the portable telephone 20 controls a rewriting process of data within the flash memory 202 according to transmission content from the memory rewriting apparatus 1. The control unit 201 includes a CPU and a memory, and also includes programs for controlling the rewriting. When receiving an update command from the memory rewriting apparatus 1, the control unit 201 performs the rewriting according to the program.
In the flash memory 202, a plurality of memory areas are formed by allocating physical addresses, and each memory area stores data individually.
The remaining charge detection unit 203 detects the amount of currently remaining battery charge of the battery 204. Generally, a portable telephone includes a unit which has the same function as the remaining charge detection unit 203, and the unit can be used alternatively.
The battery 204 is not limited to any kind of battery. For instance, a lithium-ion secondary battery may be used.
Memory Rewriting Apparatus 1
The transfer data control unit 101 has a function of transmitting the update command which notifies the portable telephone 20 that an update of various data stored in the memory of portable telephone 20 is to be executed, and a function of transmitting various data for the update.
The update data information storage unit 102 stores update data information which indicates the newest version number of the data stored in each memory area of the flash memory 202, corresponding to the model of the portable telephone 20.
As
The update memory area specification unit 103 specifies data in which memory area among 202A, 202B, 202C, 202D, 202E included in the flash memory 202, is to be rewritten and updated. This specification is performed with reference to the above-described update data information. The update memory area specification unit 103 refers to the newest version of each data, and specifies an area in which the version of data is not the newest as an area to be rewritten.
The battery information obtaining unit 104 obtains the detected current amount of remaining battery charge (mAh) in the portable telephone 20.
The rewritability judging unit 105 judges whether data stored in the above-described specified area can be rewritten, by comparing the amount of remaining battery charge obtained by the battery information obtaining unit 104 to the amount of the battery power consumption for rewriting each data. The rewritability judging unit 105 performs this comparison by reading the battery consumption information stored in the battery consumption information storage unit 106.
Note that the data transmission and data reception between the portable telephone 20 and the memory rewriting apparatus 1 are performed via the serial interface. Therefore, the data is transmitted and received as serial data via a serial communication control unit, which is not shown in figures.
<Operations>
The following is the operation of the memory rewriting apparatus 1. The memory rewriting apparatus 1 performs the memory rewriting process as follows.
In step S1, the transfer data control unit 101 transmits an update command to the portable telephone 20. Then, the update memory area specification unit 103 receives the model name and the newest version number of the data stored in each area. These are transmitted by the portable telephone 20 in response to the update command. Also, the battery information obtaining unit 104 receives the amount of the remaining battery charge (step S2).
Based on the model name and the newest version number of the data stored in each area, which are received in step S2, the update memory area specification unit 103 refers to the above-described update data information, and specifies a memory area which requires the updated (step S3).
Next, the rewritability judging unit 105 calculates the amount of battery charge required for updating the data in the specified memory area (step S4). This calculation is performed with use of the values read from the battery consumption information stored in the battery consumption information storage unit 106.
The rewritability judging unit 105 compares the value of the battery consumption calculated in step S4 to the current amount of the remaining battery charge obtained in step S2. In the case the where the remaining battery charge is sufficient (“YES” in step S5), the update data information for the memory area specified in step S3 is read from the update data information storage unit 102, and transmitted to the portable telephone 20. Also, the memory area which should be updated is specified (step S6). The memory rewriting is performed in response to the data transmission and the memory area specification, according to instructions from the control unit 201.
In the case where the remaining battery charge is not sufficient (“NO” in step S5), it is decided that the data in the memory area specified in step S3 is not to be rewritten, and as
For instance, in the case where the memory area 202B is specified in step S3 as the area which needs an update, the amount of the battery consumption for updating the area is 4.0 mAh (*1 in
In the case where the memory area 202A and 202C are specified in step S3 as the areas which need an update, the amount of the battery consumption for updating the areas are 1.0 mAh and 4.0 mAh respectively (*2 and *3 in
In response to the operation of the memory rewriting apparatus 1 described above, the control unit 201 included in the portable phone 20 operates as follows.
In step S11, when receiving the update command from the transfer data control unit 101, the control unit 201 suspends normal functions for receiving and transmitting, and reads programs for rewriting from the boot area of the memory area in order to set an update mode.
When the update mode is set, the control unit 201 transmits the model name of the portable telephone 20, the version number of the data in each memory area, and the current amount of the remaining battery charge (step S12). Note that the amount of the remaining battery charge is detected by the remaining charge detection unit 203 at regular intervals, and the detected newest value is to be transmitted.
After transmitting the model name, the version number of the data in each memory area, and the current amount of the remaining battery charge, the control unit 201 waits for a new data for the update and the specification of the memory area which is to be updated, which are transmitted from the memory rewriting apparatus 1 (step S13). When receiving the new data and the specification, the control unit 201 starts the rewriting of data in the specified memory area (step S14). When the rewriting process finishes, the control unit 201 changes the mode back to the normal mode for receiving and transmitting (step S15), and then finishes the update process.
The following is the description of the operations for rewriting data stored in a flash memory by the memory rewriting apparatus 1 in the case where the memory rewriting apparatus 1 is for a distributor's use.
In this case, the memory rewriting apparatus 1 is realized by programs which run on OS of a general-purpose computer. The memory rewriting apparatus 1 obtains the model name of the customer's portable telephone 20, the version number of the data in each memory area, and the current amount of the remaining battery charge. Then, the memory rewriting apparatus refers to the previously-stored newest version number of data corresponding to the data stored in each memory area in the customer's portable phone 20, and specifies the data (memory area) which should be rewritten.
Also, the memory rewriting apparatus 1 calculates the amount of the battery consumption for rewriting each data to the new data.
Then, the memory rewriting apparatus 1 compares the current amount of the remaining battery charge to the calculated total value of the battery consumption, and rewrites the data in all the specified areas to the newest version of the data only when sufficient battery charge for this operation is remaining. When the remaining battery charge is not sufficient, the memory rewriting apparatus 1 displays the warning message for recommending the operator to recharge the battery, change the battery, and so on.
<Supplementary Explanations>
(1) In the description above, the memory area which is to be rewritten is basically specified when the version of the data in the memory area is not the newest one. However, the data which is closely connected to the other data may be specified as data which is to be rewritten at the same time, even if the version of the data itself is the newest one. This prevents the inconsistency between data which can occur when only particular data is rewritten.
(2) In the description above, the memory rewriting apparatus 1 compares the current amount of the remaining battery charge to the total value of the battery consumption, and rewrites the data in all the specified areas to the newest version of the data. However, the present invention is not limited to this. The memory rewriting apparatus 1 may compare the current amount of the remaining battery charge to each amount of battery consumption for rewriting data in each memory area. The memory rewriting apparatus 1 may rewrite only areas which are rewritable with the remaining battery. As to areas which are not rewritable with the remaining battery, the memory apparatus 1 displaying a warning message which says that the memory areas are not rewritable, and recommend the operator to recharge the battery, change the battery, and so on.
(3) The judgment in step S5, by which the rewritability judging unit 105 compares the value of the battery consumption calculated in step S4 to the current amount of the remaining battery charge obtained in step S2, may be performed in such a manner that the rewritability judging unit 105 judges whether the current amount of the remaining battery charge is larger than the value of the battery consumption by a predetermined value (e.g. 1 mAh).
(4) In the above-described embodiment, the notification to the operator is performed only when the rewriting is not possible. However, the present invention is not limited to this. The notification may also be performed when the rewriting finishes.
(5) The control programs for controlling the rewriting of memory, which are stored in the control unit 201, may be stored in a flash memory.
(6) In the above-described embodiment, a flash memory is taken as an example of a memory for storing data. However, a rewritable nonvolatile memory other than the flash memory may be used.
The present invention is applicable to an apparatus which controls rewriting of various data in a memory of a portable terminal.
Number | Date | Country | Kind |
---|---|---|---|
2002-70980 | Mar 2002 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP03/00640 | 1/24/2003 | WO | 6/13/2005 |