ATSHA204A
Security Commands
• OTP
If the OTP zone is unlocked, then this command returns an error. Once locked, if OTP mode is not
set to legacy, then all words can be read. If OTP mode is legacy, then only four byte reads are
permitted and addresses of a zero or one returns an error.
Table 8-33. Input Parameters
Name Size Notes
Opcode Read
1 0x02
Param1 Zone
0 = 4 bytes are read
Bit 7:
1
1 = 32 bytes are read. Must be zero if reading from OTP zone in Legacy
mode.
Bits 6-2: All bits must be zero.
Bits 1-0: Select among Config, OTP, or Data. See Section Zone Encoding.
Param2 Address 2 Address of first word to be read within the zone. See Section Address Encoding.
Data —
0—
Table 8-34. Output Parameter
Name
Size
Notes
Contents
4 or 32 The contents of the specified memory location.
8.5.15.1 Read Operations within the Data Zone
Read operations within the Data zone depend upon the state of IsSecret and EncryptRead according to
the following table:
Table 8-35. Read Operation Permission
IsSecret EncryptRead Description
Clear text reads are always permitted from this slot.
0
0
Slots set to this state should never be used as key storage.
Either 4 or 32 bytes may be read at a time.
0
1
Prohibited. No security is guaranteed for slots using this code.
Reads are never permitted from this slot.
1
0
Slots set to this state can still be used for key storage.
Reads from this slot are encrypted using the encryption algorithm documented in the
Read command description (See Section Read Command).
1
1
The encryption key is in the slot specified by ReadKey. 4-byte reads and writes are
prohibited.
If reading the Data zone and the EncryptRead bit is set in the corresponding SlotConfig word, then the
following actions are taken to encrypt the data:
• All of the TempKey register bits must be properly set as follows, or this command returns an error:
TempKey.Valid == 1
TempKey.GenData == 1
© 2018 Microchip Technology Inc.
DS40002025A-page 61