SLUA790 November   2016 BQ34110 , BQ34Z100-G1 , BQ35100

 

  1.   Using I2C Communications With the bq34110, bq35100, and bq34z100-G1 Series of Gas Gauges
    1.     Trademarks
    2. 1 Example 1: Reading Cell Voltage
    3. 2 Example 2: Reading the Firmware Version
      1. 2.1 Standard I2C Commands
      2. 2.2 Extended I2C Commands
      3. 2.3 Control Subcommands
      4. 2.4 Data Flash Access for the bq34z100-G1
    4. 3 Data Flash Access for the bq34110 and bq35100
    5. 4 Summary
    6. 5 Glossary: Control-Bit-Sequence Definitions

Data Flash Access for the bq34110 and bq35100

Find the data flash address for the data that you want to read or change. Use the Operation Config A register on the bq35100 for this example. The parameter is located at 0z41b1 and it occupies 1 byte and can be found in the Technical Reference Manual (TRM) or on the bqStudio Data Memory screen.

Use the Advanced Comm section to read the data flash.

Start Register 3E, Bytes to Write b1 41 (data flash address)

Start Register 40, Number of Bytes to Read 01

The Operation Config A register is 80 in this example.

fig11_slua790.pngFigure 11. Data Flash Access Commands to Read the Operation Config A

Change the Operation Config A register to 0x82 to change to End-of Service mode.

Use the Advanced Comm section to write the data flash.

Start Register 3E, Bytes to Write b1 41 (data flash address)

Start Register 40, Byte to Write 82 (new data)

Start Register 60, Byte to Write 8b (checksum)

Start Register 61, Byte to Write 05 (length of data written)

The checksum is calculated by adding the starting address and the data in hexadecimal and the taking the inverse of the last byte. In the example, the checksum calculation will be 41 + b1 + 82 = 174. Inverse the last byte. 74 => 8b

The Length of Data Written is set to the number of bytes + 4. In this example it is set to 1 + 4 = 5.

fig12_slua790.pngFigure 12. Data Flash Access Commands to Change the Operation Config A