5.1.1 Counter
Command
The Counter
command reads the binary count value from one
of the two monotonic counters located on the device within the Configuration zone. The
maximum value that the counter may have is 2,097,151. Any attempt to count beyond this
value will result in an error code. The counter is designed to never lose counts even if
the power is interrupted during the counting operation. In some power loss conditions,
the counter may increment by a value of more than one.
For the ATECC608A-TNGLoRaWAN, the counters are not attached to any keys but may still be used by the system. Each count is set to its default value and can count to the maximum value.
Opcode |
Mode |
KeyID | Description |
---|---|---|---|
0x24 | 0x00 | 0x00 00 | Reads the value of Counter[0] |
0x00 01 | Reads the value of Counter[1] | ||
0x01 | 0x00 00 | Increments the value of Counter[0] | |
0x00 01 | Increments the value of Counter[1] |
Name | Size | Description |
---|---|---|
Count | 4 bytes | Counter value in binary if the command succeeds. |
Response | 1 byte | Error code if the command fails. |