The length byte for all MAC commands will include the 2-byte command, the 1-byte checksum, the 1-byte length,
and 1 to 32 bytes of data. This means the minimum length value is 5 for a valid block (no length or checksum is
used for command only writes, so block of zero size is not necessary). For proper write command validation, the
checksum and length must be written in order (word access triggered).
12.2 Manufacturer Access Control (MAC)
The Manufacturer Access Control (MAC) system provides method for accessing subcommands to read and write
data, and to control the device state.
The subcommands are set by a valid word access to either the
ManufacturerAccess()
or
MACSubcmd()
commands. For subcommands without data arguments, setting the subcommand alone will trigger execution.
For subcommands with data the
MACData()
,
MACDataChecksum()
and
MACDataLength()
are used to write
the subcommand arguments and trigger execution of the subcommand, or to read and validate the response
after setting the subcommand. These can be accessed either in a single I2C transaction or split into multiple
transactions as long as the access starts with the lowest address and ends at the highest, without other
unrelated commands interleaved.
For subcommands with a data response, it is recommended to read back the
MACSubcmd()
registers to
confirm the
MACData()
information comes from the intended command. There is no read back verification for
subcommands that execute without any data arguments.
Example: Send a MAC
Gauging()
to enable IT via
MACSubcmd().
1. With Impedance Track disabled, send
Gauging()
(0x0021) to
MACSubcmd()
a. I
2
C Write, start address = 0x3E (or 0x00). Data = 21 00 (data must be sent in Little Endian).
2. IT is enabled,
ManufacturingStatus()[GAUGE_EN]
= 1.
Example: Read
Chemical ID()
(0x0006) via
MACSubcmd().
1. Send
Chemical ID()
to
MACSubcmd().
a. I
2
C Write, start address = 0x3E (or 0x00). Data sent = 06 00 (data must be sent in Little Endian).
2. Read the result from
MACSubcmd()
and
MfgMACData()
.
a. I
2
C Read, start address = 0x3E length = 36 bytes. First 4 bytes of the response will be 06 00 10 12.
b. The first two bytes "06 00" is the MAC command (for verification).
c. The second two bytes "10 12" are the Chem ID in Little Endian. That is, 0x1210 for ChemID 1210.
d. The last two bytes of the 36-byte block will be the checksum and length. The length in this case will be
6. The checksum is 0xFF – (sum of the first length – 2 bytes). The length and checksum are used to
validate the block response.
It is recommended to send “command only” operations to
ManufacturerAccess()
on 0x00 and 0x01, as this
works with legacy devices as well as newer devices and also can reset any legacy compatibility options in effect;
whereas, some legacy devices use 0x3E and 0x3F for other purposes. The 0x3E and 0x3F can always be used
for reads. When no legacy devices are expected to be present, 0x3E and 0x3F
MACSubcmd()
can safely be
used to optimize command execution.
To support detection of legacy devices, a request for the MAC subcommands DEV and VERSION written
to 0x00 and 0x01 will cause the
ControlStatus()
read to report 0xFFA5. This token indicates that the
device supports MAC on the 0x3E–0x61 command range and to go there for the response. In addition, the
MACDataLengh()
minimum valid value is 5 to allow some devices to have legacy support triggers when writing
other values from 0–4 to this command.
Table 12-2. MACSubcmd() Command List
Command
Function
Access
Format
Data Read on
MACData()
Not Available in
SEALED Mode
Type
Units
0x0001
DeviceType
R
Block
√
—
hex
—
0x0002
FirmwareVersion
R
Block
√
—
hex
—
0x0003
HardwareVersion
R
Block
√
—
hex
—
0x0004
IFChecksum
R
Block
√
—
hex
—
0x0005
StaticDFSignature
R
Block
√
—
hex
—
I2C Commands
72
BQ28Z610-R2
Copyright © 2022 Texas Instruments Incorporated