Patent ID: 6810347
Filing Date: 2004-10-26
Classification: G06F,G07C

Abstract:
A method of counting power-on events accumulated throughout a device's lifetime, comprising:(a) representing the accumulated count with a data word; (b) computing an error correction code (â€˜ECCâ€™) associated with said data word, said ECC serving to validate said data word; (c) storing two versions of an initial value of said data word and its associated ECC in a non-volatile memory; and (d) whenever the device is powered on: (e) retrieving both versions of said data word and its associated ECC from the non-volatile memory; (f) validating each version of said data word with its associated ECC; (g) selecting among valid versions of the retrieved data word one having a higher count; and (h) subsequently responsive to a next predefined event: (i) incrementing the selected version of the retrieved data word by one count; (j) computing an associated ECC for the incremented selected version of the retrieved data word; and (k) backing up the incremented selected version of the retrieved data word and its ECC by replacing the version in the non-volatile memory not selected at last retrieving; (l) repeating (h)-(k) if power is not turned off; and (m) repeating (d)-(l) if power has just been turned on.