Field of the Invention
The invention relates to a method of updating the contents of the electronic memory of an electronic apparatus, where the up-to-date memory contents are transmitted to the memory of the electronic apparatus from a data processing system which has the up-to-date memory contents and is connected to the electronic apparatus via a serial interface.
Background Information
IBM Technical Disclosure Bulletin, vol. 37, no. 03, March 1994, page 503 describes a conventional method of updating the erasable programmable read-only memory of an electronic device. With this conventional method, an additional erasable programmable read-only memory module is used which initiates communication with a data processing system connected to it for updating the memory contents of the first erasable programmable read-only memory module. Then a new program code is loaded into a large buffer (which may be RAM) via the additional read-only memory module, and the one read-only memory module is also erased. Then the new program code is loaded from the large buffer into the one read-only memory module.
Summary of the Invention
An object of the present invention is to provide a method of updating the contents of an electronic memory. The contents of an electronic memory designed as an erasable programmable read-only memory of an electronic apparatus can also be updated.
This object is achieved according to the present invention with a method where program code corresponding to the program code and the program code loaded into the random-access memory are loaded into a random-access memory provided with the erasable programmable read-only memory of the electronic apparatus, and the program code loaded into the random-access memory is activated, thus initiating communication between this memory and the data processing system. Initiation of communication causes the erasable programmable read-only memory to be erased, and the up-to-date memory contents are loaded from the memory of the data processing system into the erasable programmable read-only memory, and the data processing system causes a RESET to occur.
An advantage of the method according to the present invention is that the contents of an erasable programmable read-only memory can be updated with it even when loaded with all or part of the program code of the electronic apparatus. This does not require the replacement of the respective erasable programmable read-only memory in the electronic apparatus, nor is any other hardware measure necessary to update the memory contents in the method according to the present invention.
In an exemplary embodiment of the method according to the present invention, an EPROM with at least one area that can be excluded from erasing is used as the erasable programmable read-only memory, and communication between the EPROM and the data processing system takes place using a subprogram that is stored in the area of the EPROM that can be excluded from erasing. The advantage of this method is that, in a state in which the EPROM has already been erased and the RAM has also been unloaded due to a power failure, for example, communication from the electronic apparatus or the EPROM to the data processing system can be established with the help of the program stored in the area excluded from erasing, so that the method of updating the memory contents of the EPROM can also be readily begun again even in the above-mentioned state of the memory of the electronic apparatus.
Brief Description of the Drawings
FIGS. 1-6 show a schematic sequence of a method according to the present invention.
Detailed Description of the Invention
FIG. 1 shows a personal computer 1 as the data processing system in whose memory area 2 there is loaded a code 3, among other things, which is provided for reprogramming an erasable programmable read-only memory 4, designed as a flash EPROM, of an electronic apparatus 5; electronic apparatus 5 may be, for example, a protection apparatus for detecting faults in electronic power supply equipment. Memory area 2 of personal computer 1 also contains a random-access memory (RAM) 6. Electronic apparatus 5 is also equipped with a RAM 7. The other electronic parts of electronic apparatus 5, such as a processor, are not shown in FIG. 1 or the following figures.
At the start of the sequence of the method according to the present invention as illustrated in FIG. 1, communication is initiated between personal computer 1 and erasable programmable read-only memory 4 of electronic apparatus 5, wherein electronic apparatus 5 is identified and the baud rate is set.
FIG. 2 illustrates how, in the next step after initiating communication, a program code containing the commands for the sequential program of electronic apparatus 5 is loaded from RAM 6 of personal computer 1 into RAM 7 of electronic apparatus 5. A check is also performed.
FIG. 3 shows that after loading the program code from RAM 6 of personal computer 1 into RAM 7 of electronic apparatus 5, the code in RAM 7 is activated. Then, as shown in FIG. 4, communication is initiated between RAM 7 of electronic apparatus 5 and personal computer 1, in the course of which a check is performed to determine whether RAM 7 of apparatus 5 has been loaded properly. Once this has been verified, the memory contents of EPROM 4 of electronic apparatus 5 are erased.
Then, as illustrated in FIG. 5, the up-to-date memory contents or code 3 is loaded from personal computer 1 into EPROM 4 of electronic apparatus 5, so that the storage contents of electronic apparatus 5 are updated with regard to EPROM 4.
Finally, as shown in FIG. 6, a command from personal computer 1 concludes the updating operation by generating a reset signal.