4.1 I/O Transactions

The ATECC608A-TNGLoRaWAN uses the I2C protocol to communicate with a host microcontroller. Security commands are sent to the device and responses are received from the device within a transaction that is constructed in the following way:

Table 4-1. I/O Transaction Format
ByteNameMeaning
0CountNumber of bytes to be transferred to (or from) the device in the group, including the count byte, packet bytes and checksum bytes. Therefore, the count byte must always have a value of (N+1), where N is equal to the number of bytes in the packet plus the two checksum bytes. For a group with one count byte, 50 packet bytes and two checksum bytes, the count byte must be set to 53. The maximum size group (and value of count) is 155 bytes and the minimum size group is four bytes. Values outside this range will cause the device to return an I/O error.
1 to (N-2)PacketCommand, parameters and data or response. See Section Command Packets for general command packet information or Section Device Commands for specific parameters for each command.
N-1, NChecksumCRC-16 verification of the count and packet bytes. The CRC polynomial is 0x8005. Prior to the start of the CRC calculation, the CRC register is initialized to zero. After the last bit of the count and packet have been transmitted, the internal CRC register must have a value that matches the checksum bytes in the block. The first CRC byte transmitted (N-1) is the Least Significant Byte of the CRC value, so the last byte of the group is the Most Significant Byte of the CRC.

The ATECC608A-TNGLoRaWAN is designed to have the count value in the input group consistent with the size requirements that are specified in the command parameters. If the count value is inconsistent with the command opcode and/or parameters within the packet, the ATECC608A-TNGLoRaWAN responds in different ways depending upon the specific command. The response may either include an error indication or some input bytes may be silently ignored.