| CPC G06F 3/064 (2013.01) [G06F 3/0604 (2013.01); G06F 3/0652 (2013.01); G06F 3/0673 (2013.01)] | 18 Claims |

|
1. A monotonic counter, comprising a controller and a plurality of storage blocks,
wherein each of the storage blocks comprises a first unit for storing at least one count base bit, a second unit for storing at least one flag bit, a third unit for storing at least one check bit, and a plurality of count storage units for sequentially storing at least one data bit of count data, and at any time when the monotonic counter is in operation, there is one of the plurality of storage blocks serving as a working storage block for counting,
wherein the controller comprises:
interrupt recording circuitry for recording an interrupt occurring in the monotonic counter; and
logic determination circuitry for determining, upon determining that the monotonic counter with the interrupt has been powered on and reset, whether the count storage units of the working storage block are all full or not, and in response to determining that the count storage units of the working storage block are not all full, writing preset data again in one of the count storage units of the working storage block into which the data bit of the count data is stored last,
wherein the writing of the preset data again comprises supplementarily writing or rewriting the preset data.
|