Secret management function commands, Wire bus system, Bit net address (rom id) – Rainbow Electronics DS2784 User Manual

Page 30

Advertising
background image

DS2784: 1-Cell Stand-Alone Fuel Gauge IC with Li+ Protector and SHA-1 Authentication

SECRET MANAGEMENT FUNCTION COMMANDS


CLEAR SECRET [5Ah]

. This command sets the 64-bit secret to all 0s (0000 0000 0000 0000h). The host must

wait t

EEC

for the DS2784 to write the new secret value to EEPROM. See Figure 12 for command timing.


COMPUTE NEXT SECRET WITHOUT ROM ID [30h].

This command initiates a SHA-1 computation of the MAC

and uses a portion of the resulting MAC as the next or new secret. The hash operation is performed with the
current 64-bit secret and the 64-bit challenge. Logical 1s are loaded in place of the ROM ID. 64 bits of the output
MAC are used as the new secret value. The host must allow t

SHA

after issuing this command for the SHA

calculation to complete, then wait t

EEC

for the DS2784 to write the new secret value to EEPROM. See Figure 10 for

command timing.

COMPUTE NEXT SECRET WITH ROM ID [33h].

This command initiates a SHA-1 computation of the MAC and

uses a portion of the resulting MAC as the next or new secret. The hash operation is performed with the current 64-
bit secret, the 64-bit ROM ID and the 64-bit challenge. 64 bits of the output MAC are used as the new secret value.
The host must allow t

SHA

after issuing this command for the SHA calculation to complete, then wait t

EEC

for the

DS2784 to write the new secret value to EEPROM. See Figure 10 for command timing.

LOCK SECRET [60h].

This command write protects the 64-bit secret to prevent accidental or malicious overwrite

of the secret value. The secret value stored in EEPROM becomes “final”. The host must wait t

EEC

for the DS2784 to

write the lock secret bit to EEPROM. See Figure 12 for command timing.

Table 10. Secret Loading Function Commands

COMMAND HEX

FUNCTION

Clear Secret

5A

Clears the 64-bit Secret to 0000 0000 0000 0000h.

Compute Next Secret Without
ROM ID

30

Generates new global secret.

Compute Next Secret With
ROM ID

33

Generates new unique secret.

Lock Secret

60

Sets lock bit to prevent changes to the secret.

1-Wire BUS SYSTEM

The 1-Wire bus is a system that has a single bus master and one or more slaves. A multidrop bus is a 1-Wire bus
with multiple slaves, while a single-drop bus has only one slave device. In all instances, the DS2784 is a slave
device. The bus master is typically a microprocessor in the host system. The discussion of this bus system consists
of five topics: 64-bit net address, CRC generation, hardware configuration, transaction sequence, and 1-Wire
signaling.

64-BIT NET ADDRESS (ROM ID)

Each DS2784 has a unique, factory-programmed 1-Wire net address that is 64 bits in length. The term net address
is synonymous with the ROM ID or ROM code terms used in the DS2502 and other 1-Wire documentation. The first
eight bits of the net address are the 1-Wire family code (32h). The next 48 bits are a unique serial number. The last
eight bits are a cyclic redundancy check (CRC) of the first 56 bits (see

). The 64-bit net address and the

1-Wire I/O circuitry built into the device enable the DS2784 to communicate through the 1-Wire protocol detailed in
this data sheet.

Figure 6

Figure 6. 1-Wire Net Address Format

8-BIT CRC

48-BIT SERIAL NUMBER

8-BIT FAMILY

CODE (32H)

MSb

LSb

30 of 38

Advertising