@@ -110,6 +110,8 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
110
110
\x00 <\x00 <\x00 <\x00 \x1c \x00 "
111
111
112
112
"""
113
+ Configuration Zone Bytes
114
+
113
115
Serial Number (Bytes 0-3 and 8-12), Revision Number (Bytes 4-7)
114
116
AES Enable (Byte 13), I2C Enable (Byte 14), Reserved (Byte 15)
115
117
I2C Address (Byte 16), Reserved (Byte 17); Count Match (Byte 18)
@@ -120,6 +122,15 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
120
122
Reserved (Bytes 75-83), User Extra (Bytes 84-85)
121
123
Lock Config (Bytes 86-89), Chip Options (Bytes 90-91)
122
124
X509 (Bytes 92-95), Key Config (Bytes 96-127)
125
+
126
+ I2C Config
127
+
128
+ HEX DEC BIN Description
129
+ Byte 14: C0 192 1100 0000
130
+ ^xxx xxxx Bit 0 (MSB): 0:Single Wire, 1:I2C; Bit 1-7: Set by Microchip
131
+ Byte 16: C0 192 0010 0000 Default 7 bit I2C Address: 0xC0>>1: 0x60 ATECC608A-MAHDA
132
+ Byte 16: 6A 106 0110 1010 Default 7 bit I2C Address: 0x6A>>1: 0x35 ATECC608A-TNGTLS
133
+ Byte 16: 20 32 0010 0000 Default 7 bit I2C Address: 0x20>>1: 0x10 ATECC608A-UNKNOWN
123
134
"""
124
135
CFG_TLS_HEX = bytes (
125
136
bytearray .fromhex (
@@ -146,15 +157,6 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
146
157
assert CFG_TLS == CFG_TLS_HEX
147
158
assert bytearray (CFG_TLS )[16 ] == 0x20 #
148
159
149
- """I2C Config
150
- HEX DEC BIN Description
151
- Byte 14: C0 192 1100 0000
152
- ^xxx xxxx Bit 0 (MSB): 0:Single Wire, 1:I2C; Bit 1-7: Set by Microchip
153
- Byte 16: C0 192 0010 0000 Default 7 bit I2C Address: 0xC0>>1: 0x60 ATECC608A-MAHDA
154
- Byte 16: 6A 106 0010 0000 Default 7 bit I2C Address: 0x6A>>1: 0x35 ATECC608A-TNGTLS
155
- Byte 16: 20 32 0010 0000 Default 7 bit I2C Address: 0x20>>1: 0x10 ATECC608A-UNKNOWN
156
- """
157
-
158
160
# Convert I2C address to config byte 16 and update CFG_TLS
159
161
_CFG_BYTES = bytearray (CFG_TLS )
160
162
_CFG_BYTE_16 = hex (_I2C_ADDR << 1 )
0 commit comments