Datasheet

Sector Trailer (Block 3)
The sector trailer block contains the two secret keys (Key A and Key B), as well as the access conditions for the four
blocks. It has the following structure:
For more information in using Keys to access the clock contents, see Accessing Data Blocks further below.
Data Blocks (Blocks 0..2)
Data blocks are 16 bytes wide and, depending on the permissions set in the access bits, can be read from and written
to. You are free to use the 16 data bytes in any way you wish. You can easily store text input, store four 32-bit integer
values, a 16 character uri, etc.
Data Blocks as "Value Blocks"
An alternative to storing random data in the 16 byte-wide blocks is to configure them as "Value Blocks". Value blocks
allow performing electronic purse functions (valid commands are: read, write, increment, decrement, restore, transfer).
Each Value block contains a single signed 32-bit value, and this value is stored 3 times for data integrity and security
reasons. It is stored twice non-inverted, and once inverted. The last 4 bytes are used for a 1-byte address, which is
stored 4 times (twice non-inverted, and twice inverted).
Data blocks configured as "Value Blocks" have the following structure:
Manufacturer Block (Sector 0, Block 0)
Sector 0 is special since it contains the Manufacturer Block. This block contains the manufacturer data, and is read-
only. It should be avoided unless you know what you are doing.
16 Block Sectors
16 block sectors are identical to 4 block sectors, but with more data blocks. The same structure described in the 4
block sectors above applies.
Sector Trailer Bytes
--------------------------------------------------------------
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[ Key A ] [Access Bits] [ Key B ]
Value Block Bytes
--------------------------------------------------------------
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[ Value ] [ ~Value ] [ Value ] [A ~A A ~A]
Sector Block Bytes Description
------ ----- ----- ----------
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
© Adafruit Industries https://learn.adafruit.com/adafruit-pn532-rfid-nfc Page 17 of 42