The data memory values in BQ76942 are accessed in
similar fashion to subcommands, using the address for a data value rather than the
subcommand address. For example, to write the Calibration:Voltage:Cell 1 Gain
to a value of 12410 (0x307A), determine the register address from the Data Memory Summary
Table, which shows this address is 0x9180. Then the data is written as shown below:
- Write lower byte of address to 0x3E (0x80 in this example).
- Write upper byte of address to 0x3F (0x91 in this example).
- Write the data memory value in little endian format into the transfer
buffer (0x40 to 0x5F). Note: up to 32 bytes of data memory can be written in one block
write. In this example, write 0x7A to 0x40, write 0x30 to 0x41.
- Write the checksum of data written (0x44 in this example) into 0x60,
and the length of data (0x06 in this example) into 0x61.
- The data can be verified by reading it back. Write the lower byte of
address to 0x3E (0x80), write the upper byte of address to 0x3F (0x91).
- Read the length of response from 0x61. The transfer buffer will be
populated with a 32-byte block of data, so length will be 36-bytes, or 0x24 for this
example.
- Read buffer starting at 0x40 for the length of data. The new value
for Calibration:Voltage:Cell 1 Gain is seen in 0x40 (0x7A) and 0x41
(0x30).
- Read the checksum at 0x60 and verify it matches the data read for
the full transfer buffer.
Note: 0x61 provides the length of the buffer data + 4 (that is, length of buffer data + length of 0x3E and 0x3F + length of 0x60 and 0x61).
The checksum is calculated over 0x3E and 0x3F and the buffer data, it does not include the checksum or length in 0x60 and 0x61.
The configuration settings for the BQ76942 device
are shown in the following sections.