ATAES132-TH-EQ Atmel, ATAES132-TH-EQ Datasheet - Page 144

no-image

ATAES132-TH-EQ

Manufacturer Part Number
ATAES132-TH-EQ
Description
EEPROM AES 32Kbit EE SPI
Manufacturer
Atmel
Datasheet

Specifications of ATAES132-TH-EQ

Rohs
yes
Maximum Clock Frequency
10 MHz
Operating Supply Voltage
6 V
Maximum Operating Temperature
- 40 C to + 85 C
Mounting Style
SMD/SMT
Package / Case
TSSOP-8
Interface Type
SPI
Factory Pack Quantity
2300
Appendix M. Block Checksum
M.1.
An Atmel CRC-16 checksum is used to verify the integrity of blocks communicated to and from the ATAES132.
The host sends ATAES132 extended commands to the device in a block of at least four bytes. The ATAES132 responses are
returned to the host in a block of at least four bytes. The command and response blocks are constructed in the following
manner:
The Atmel CRC-16 polynomial is 0x8005. The initial register value should be 0x0000. After the last bit of the count and packet
has been transmitted, the internal CRC register should have a value that matches that in the block. The first checksum byte
transmitted (N-2) is the most significant byte of the CRC value and last byte of the block is the least significant byte of the
CRC.
Checksum Function
Byte #
0
1 to (N-3)
N-2, N-1
/** \This function calculates a 16-bit CRC.
void CalculateCrc(uint8_t length, uint8_t *data, uint8_t *crc)
{
}
* \param[in] count number of bytes in data buffer
* \param[in] data pointer to data
* \param[out] crc pointer to calculated CRC (high byte at crc[0])
*/
uint8_t counter;
uint8_t crcLow = 0, crcHigh = 0, crcCarry;
uint8_t polyLow = 0x05, polyHigh = 0x80;
uint8_t shiftRegister;
uint8_t dataBit, crcBit;
for (counter = 0; counter < length; counter++) {
}
crc[0] = crcHigh;
crc[1] = crcLow;
Name
Count
Packet
Checksum
for (shiftRegister = 0x80; shiftRegister > 0x00; shiftRegister >>= 1) {
}
dataBit = (data[counter] & shiftRegister) ? 1 : 0;
crcBit = crcHigh >> 7;
// Shift CRC to the left by 1.
crcCarry = crcLow >> 7;
crcLow <<= 1;
crcHigh <<= 1;
crcHigh |= crcCarry;
if ((dataBit ^ crcBit) != 0) {
}
crcLow ^= polyLow;
crcHigh ^= polyHigh;
Meaning
Number of bytes to be transferred to the device in the block, including count, packet and
checksum. This byte will always have a value of N.
Command, parameters and data, or response. Data is transmitted in the byte order shown in
command definitions in Section 7.
Atmel CRC-16 verification of the count and packet bytes.
Atmel ATAES132 Preliminary Datasheet
8760A−CRYPTO−5/11
144

Related parts for ATAES132-TH-EQ