ATSHA204A
Security Commands
sequence, the device retains the contents of the two SRAM registers (for example TempKey and RNG
seed).
Normally, all command sequences must complete within tWATCHDOG if they require a state that is stored in
the SRAM registers. The system software can use this idle mode mechanism between commands to
implement a longer command sequence than can be completed during a single watchdog interval.
8.5
8.5.1
8.5.2
Command Sequence
Command Packets
The command packet is broken down as shown in the following table:
Table 8-3. Command Packets
Byte # Name
Meaning
0
Command
Command Flag (see Word Address Values for the I2C mode of operation and I/O
Flags for Single Wire Interface mode). Not included in Count or CRC field.
1
Count
Packet size: Includes Count, Opcode, Param1, Param2, Data and CRC. Does not
include Command Flag.
2
Opcode ATSHA204A operation being called.
3
Param1 First Parameter. One byte always present.
4 – 5 Param2 Second Parameter. Two bytes always present.
Data
Optional Data based on Command being called.
N-1to N
Checksum
CRC-16. The CRC polynomial is 0x8005. Includes Count, Opcode, Param1,
Param2 and Data. Does not include Command Flag.
After the ATSHA204A receives all the bytes in a block, the device transitions to the busy state and
attempts to execute the command. Neither status nor results can be read from the device when it is busy.
During this time, the device’s I/O interface ignores all SDA transitions regardless of the I/O interface
selected. The command execution delays are listed in Section Read Operations within the Data Zone.
If an insufficient number of bytes are sent to the device when it is in one-wire mode, the device
automatically transitions to the low-power sleep state after the tTIMEOUT interval. In I2C mode, the device
continues to wait for the remaining bytes until the watchdog timer limit, tWATCHDOG, is reached or a Start/
Stop condition is received by the device.
In the individual command descriptions in Table 8-8 through Table 8-41, the size column describes the
number of bytes in the parameter documented in each particular row. If the input block size for a
particular command is incorrect, then the device responds differently depending upon the command. It
may not return an error indication in all circumstances (see Section Status/Error Codes).
Command Opcodes, Short Descriptions and Execution Times
During parsing of the parameters and the subsequent execution of a properly received command, the
device is busy and can not respond to transitions on the pins. The interval during which the device is busy
varies depending upon the command and its parameter values, the state of the device, the environmental
conditions and other factors according to the following table.
© 2018 Microchip Technology Inc.
DS40002025A-page 44