A method of updating a computer program stored in an electrically erasable programmable read-only memory having a plurality of inputs and a plurality of locations, each location having an address, the electrically erasable programmable read-only memory is partitioned into an unprotected partition and a protected partition, comprising the steps of:
- (a) coupling a central processing unit to the electrically erasable programmable read-only memory via an address bus and a data bus;
- (b) providing a first transfer vector in the protected partition of the electrically erasable programmable read-only memory;
- (c) providing a second transfer vector in the unprotected partition of the electrically erasable programmable read-only memory, the second transfer vector contains an address of a location of the beginning of the computer program, the first transfer vector contains an address of a location in the electrically erasable programmable read-only memory where the second transfer vector is stored;
- (d) initiating an update of the computer program stored in the electrically erasable programmable read-only memory by storing a new version of the computer program in memory locations in the electrically erasable programmable read-only memory that do not contain the old version of the computer program, such that if an error occurs while updating, the old version of the computer program stored in the electrically erasable programmable read-only memory is not affected and the central processing unit can still access the old version of the computer program stored in the electrically erasable programmable read-only memory;
- and
- (e) after the new version of the computer program is stored in the electrically erasable programmable read-only memory, updating the second transfer vector to contain the starting address where the new version of the computer program is stored in the electrically erasable programmable read-only memory, such that the amount of time required to update the second transfer vector is constant and independent of the amount of time required to store the new version of the computer program in the electrically erasable programmable read-only memory thereby minimizing a window of vulnerability to errors during firmware updates.