# US 9,870,316 B2 · Bidirectional counter in a flash memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,870,316 B2
- Document ID: US9870316B2
- Status: Granted
- Kind: B2
- Application number: 15/243,359
- Filed: 2016-08-22
- Published: 2017-01-05
- Granted: 2018-01-16
- Earliest claimed: 2014-04-30
- Assignees: Proton World International N.V.
- Applicants: Proton World International N.V.
- Inventors: Ronny Van Keer; Guillaume Docquier
- Web page: https://patentgrep.com/patent/US9870316B2

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 9/3001: {Arithmetic instructions}
- G11C 16/105: {Circuits or methods for updating contents of nonvolatile memory, especially with 'security' features to ensure reliable replacement, i.e. preventing that old data is lost before new data is reliably written}
- H03K 21/403: {Arrangements for storing the counting state in case of power supply interruption}
- H03K 23/56: Reversible counters (H03K23/52 {and H03K23/548} take precedence)
- G06F 2212/7207: management of metadata or control data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11C: STATIC STORES (semiconductor memory devices H10B)
- H03K: PULSE TECHNIQUE (measuring pulse characteristics G01R; modulating sinusoidal oscillations with pulses H03C; transmission of digital information H04L; discriminator circuits detecting phase difference between two signals by counting or integrating cycles of oscillation H03D3/04; automatic control, starting, synchronisation or stabilisation of generators of electronic oscillations or pulses where the type of generator is irrelevant or unspecified H03L; coding, decoding or code conversion, in general H03M)

## Abstract

A method of storing a counter in at least two non-volatile memory pages, including: a step of initializing a page with an initial value and then, on each update of the counter value, a step of storing an update value and an opcode associated with this value, selected from a set of opcodes, the current value of the counter being given by application of the successive update operations to the initial value of the page.

## Claims

### Claim 1

A method, comprising:
assigning at least two non-volatile memory pages of a memory to store counter value information;
storing an initial counter value in a page of the at least two non-volatile memory pages;
for each update of the stored initial counter value, storing an update value and an opcode associated with the update value in the page of the at least two non-volatile memory pages; and
determining a current counter value based on the stored initial value, stored update values and stored opcodes.

### Claim 2 (depends on 1)

The method of claim 1, comprising:
when the page is full,
calculating the current counter value; and
storing the calculated current counter value as an initial counter value in another page of the at least two non-volatile memory pages.

### Claim 3 (depends on 1)

The method of claim 1, comprising:
initializing the at least two non-volatile memory pages to a first state.

### Claim 4 (depends on 1)

The method of claim 1 wherein the opcodes are selected from a set of opcodes comprising an addition opcode and a subtraction opcode.

### Claim 5 (depends on 1)

The method of claim 1 wherein the opcodes are selected from a set of opcodes comprising an erase code.

### Claim 6 (depends on 1)

The method of claim 1 wherein the opcodes are selected from a set of opcodes comprising a code to cancel a previous operation.

### Claim 7 (depends on 1)

The method of claim 1 wherein a page comprises one of 32, 64, 128, 256, 512, 1,024, and 2,048 bytes.

### Claim 8

An apparatus, comprising:
a non-volatile memory; and
circuitry, which, in operation:
assigns at least two pages of the non-volatile memory to store counter value information;
stores an initial counter value in a page of the at least two pages;
for each update of the stored initial counter value, stores an update value and an opcode associated with the update value in the page of the at least two pages; and
determines a current counter value based on the stored initial value, stored update values and stored opcodes.

### Claim 9 (depends on 8)

The apparatus of claim 8 wherein when the page is full, the circuitry, in operation:
calculates the current counter value; and
stores the calculated current counter value as an initial counter value in another page of the at least two pages.

### Claim 10 (depends on 8)

The apparatus of claim 8 wherein the circuitry, in operation, selectively initializes the at least two pages to a first state.

### Claim 11 (depends on 8)

The apparatus of claim 8 wherein the circuitry, in operation, selects opcodes from a set of opcodes comprising an addition opcode and a subtraction opcode.

### Claim 12 (depends on 8)

The apparatus of claim 8 wherein the circuitry, in operation, selects opcodes from a set of opcodes comprising an erase code.

### Claim 13 (depends on 8)

The apparatus of claim 8 wherein the circuitry, in operation, selects opcodes from a set of opcodes comprising a code to cancel a previous operation.

### Claim 14 (depends on 8)

The apparatus of claim 8 wherein the non-volatile memory is a flash memory.

### Claim 15 (depends on 14)

The apparatus of claim 14, comprising:
a near-field communication router including the flash memory.

### Claim 16

A system, comprising:
means for routing near-field communications; and
means for maintaining a counter value in a plurality of pages of a non-volatile memory by:
storing an initial counter value in a page of the plurality of pages;
for each update of the stored initial counter value, storing an update value and an opcode associated with the update value in the page of the plurality of pages; and
determining a current counter value based on the stored initial value, stored update values and stored opcodes.

### Claim 17 (depends on 16)

The system of claim 16 wherein when the page is full, the means for maintaining the counter value:
calculates the current counter value; and
stores the calculated current counter value as an initial counter value in another page of the plurality of pages.

### Claim 18 (depends on 16)

The system of claim 16 wherein the means for maintaining the counter value selectively initializes the plurality of pages to a first state.

### Claim 19

A non-transitory computer-readable medium whose contents cause a counter to perform a method, the method comprising:
storing an initial counter value in a first page of a plurality of pages of a non-volatile memory;
updating the stored initial counter value one or more times by, for each update, storing an update value and an opcode associated with the update value in the first page of the plurality of pages of the non-volatile memory; and
when the first page is full,
calculating a current counter value based on the stored initial counter value, the stored update values and the stored opcodes; and
storing the calculated current counter value as an initial counter value in a second page of the plurality of pages.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19 wherein the method comprises selecting the opcodes from a set of opcodes including at least one of an addition opcode and a subtraction opcode.

### Claim 21 (depends on 19)

The non-transitory computer-readable medium of claim 19 wherein the non-volatile memory is a flash memory of a near-field communication device.
