ATSHA204A
Security Commands
Table 8-37. Output Parameter
Name
Size Notes
Response 1 or 32 The SHA-256 digest if Mode<0> = 1; otherwise, 0x00 for success or an error code.
8.5.17
UpdateExtra Command
The UpdateExtra command is used to update the values of the two extra bytes within the Configuration
zone (location 84 and 85) after the Configuration zone has been locked. It can also be used to quickly
decrement the usage counters attached to a key when appropriate.
If Mode<1> is set, then the command implements a fast decrement of the limited use counters that may
be associated with a particular key. If the slot indicated by the “NewValue” parameter does not contain a
key for which limited use is implemented or enabled, then the command returns silently without taking
any action. If the indicated slot contains a limited use key which does not have any uses remaining, then
the command returns an error; otherwise, one of the remaining usage bits is cleared. The command does
not modify Config.UpdateCount for the slot in question.
If the mode parameter indicates UserExtra at address 84:
• If the current value in UserExtra (byte 84 of Configuration zone) is zero, then UpdateExtra writes
this byte with the LS byte of NewValue and returns success.
• If the current value in UserExtra is non-zero, then the command returns an execution error.
If the mode parameter indicates selector at address 85:
• If SelectorMode (byte 19 of the Configuration zone) is non-zero and Selector (byte 85 of the
Configuration zone) is zero, then this command writes Selector with the LSB of NewValue and
return success. Once written to a non-zero value, it is then locked against further updating.
• If SelectorMode has a value of zero, indicating that no check of the current Selector should be
made, then this command always updates Selector and always succeeds.
Table 8-38. Input Parameters
Name
Size Notes
Opcode UpdateExtra 1 0x20.
Param1 Mode
Bits 7 – 2: Must be zero.
Bit 1:
1
0 = Update Config byte 84 or 85
1 = Ignore bit 0 and decrement the limited use counter associated with
the key in slot “NewValue”
Bit 0:
If zero, update Config byte 84.
If one, update Config byte 85.
Param2 NewValue
Data —
LSB: Value to optionally be written to location 84 or 85 in Configuration zone.
2
MSB: Must be 0x00.
0—
© 2018 Microchip Technology Inc.
DS40002025A-page 63