SLUAA11B February   2020  – August 2021 BQ769142 , BQ76922 , BQ76942 , BQ76952

 

  1.   Trademarks
  2. 1Direct Commands
    1. 1.1 Alarm Enable - 0x66
    2. 1.2 Cell 1 Voltage - 0x14
    3. 1.3 Internal Temperature - 0x68
    4. 1.4 CC2 Current - 0x3A
  3. 2Subcommands
    1. 2.1 DEVICE_NUMBER - 0x0001
    2. 2.2 MANUFACTURING STATUS - 0x0057
    3. 2.3 FET_ENABLE - 0x0022
    4. 2.4 RESET - 0x0012
  4. 3Reading and Writing RAM Registers
    1. 3.1 Read 'Enabled Protections A'
    2. 3.2 Enter CONFIG_UPDATE Mode
    3. 3.3 Write 'Enabled Protections A'
    4. 3.4 Write 'VCell Mode'
    5. 3.5 Exit CONFIG_UPDATE Mode
  5. 4I2C With CRC
  6. 5SPI With CRC Examples
    1. 5.1 Direct Command Example: Alarm Enable - 0x66
    2. 5.2 Direct Command Example: Cell 1 Voltage - 0x14
    3. 5.3 Subcommand Example: Device Number - 0x0001
    4. 5.4 Subcommand Example: FET_ENABLE - 0x0022
    5. 5.5 Subcommand Example: RESET - 0x0012
    6. 5.6 RAM Register Read Example: Enabled Protections A
    7. 5.7 RAM Register Write Example: Enabled Protections A
  7. 6Simple Code Examples
  8. 7References
  9. 8Revision History

Subcommands

Subcommands use a different format from direct commands and are accessed indirectly using the 7-bit command address space. They also provide the capability for block transfers. To issue a subcommand, the command address is written to 0x3E/0x3F. If data is to be read back, it will be populated in the 32-byte transfer buffer which uses addresses 0x40 - 0x5F. Multiple examples follow.

The timing required for the device to fetch data depends on the specific subcommand and any other processing underway within the device, so it will vary during operation. The approximate times for each subcommand are shown in the Technical Reference Manual. There are two approaches for addressing this timing when reading data from a subcommand:

  • The simplest approach is to use a 2 ms wait time after writing to 0x3E/0x3F before reading the result from the transfer buffer.
  • A second approach is described in Chapter 3 of the Technical Reference Manual. This approach is to read from 0x3E/0x3F until the subcommand has completed operation. If the value returned is 0xFF, this indicates the subcommand has not completed operation yet. When the subcommand has completed, the value returned will match the command that was written. This response only applies to subcommands that return data to be read back.

Certain subcommands write data to a register and must be followed by a write to 0x60/0x61 with the checksum and length. This only applies to the FET_Control(), REG12_Control(), CB_Active_Cells(), and CB_SET_LVL() subcommands. Examples for calculating checksum and length are provided in the next section since this is also required when writing to RAM registers.