SLAAEB3A May   2023  – July 2024 MSPM0G3507 , MSPM0L1106 , MSPM0L1306

PRODUCTION DATA  

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Hardware Connection
  6. 3Software Structure and Important Functions
    1. 3.1 System Initialization
    2. 3.2 Low-Level Command Control
    3. 3.3 High-Level Function
  7. 4Test Result of Important Functions
    1. 4.1 Read Alarm Status
    2. 4.2 Read Safety Status
    3. 4.3 Read PF Status
    4. 4.4 Read Current
    5. 4.5 Read All Temperatures
    6. 4.6 Read All Voltages
  8. 5References
  9. 6Revision History

High-Level Function

Combined with the predefined commands integrated in BQ76952, this sample code provides several functions to operate BQ76952 to help the customer read the voltage, current, temperature directly, and the status. The major functions are listed in Figure 3-7.

 Measurement Commands of
                    BQ769x2 Figure 3-7 Measurement Commands of BQ769x2

These APIs use some of the commands mentioned to complete specific functions based on BQ76952 over I2C.

The ReadAlarmStatus function can be used to retrieve the alarm bits. The Alarm status command is 0x62 and can be read and write. When a masked flag transitions from low to high, a corresponding bit is latched in 0x62. The host can read the status and clear those latched bits by writing the 0x62 with a 1.

In the ReadSafetyStatus function, the BQ76952 device integrates a broad suite of protections for battery management and provides the capability to enable individual protections, as well as to select which protections result in autonomous control of the FETs. Flags showing which safety faults can be present are available through the 0x03 Safety Status A, 0x05 Safety Status B, and 0x07 Safety Status C commands, and the presence of a fault can generate an interrupt to a host processor on the ALERT pin. The ReadSafetyStatus function reads the 0x03, 0x05, and 0x07 registers in sequence, and triggers the protection bit if there is any flag in the read back value of three registers. For more details of the bit description, see the device-related TRM.

In the ReadRFStatus function, the BQ76952 device integrates a suite of checks on battery operation and status that can trigger a Permanent Fail (PF) if conditions are considered so serious that the pack must be permanently disabled. When a Permanent Fail occurs, the BQ76952 device can be configured to provide a flag in related PF Status registers.

The ReadAllTemperatures function can report the most recent temperature measurement corresponding to the pins TS1, TS2 and TS3, and update them to an array of float type data. On the EVM there are two different thermistors. One is connected to the TS1 pin. The other is connected to the TS3 pin.

The ReadPassQ function can report a 64-bit value from the 0x0076 DASTATUS6() subcommand, which includes the integer and fractional portion of accumulated passed charge in user Amp-hours, and the number of seconds over which passed charge.

Finally, the ReadAllVoltages function is included to iteratively read all of the voltages. The function uses the direct command to read various voltage information taking in the measurement command shown in Table 4-6, then placing them into the CellVoltage array. Once the function iterates through all of the cell voltages, the Stack_Voltage, Pack_Voltage, and LD_Voltage are read and placed in the respective variables.

The bit-transaction details of these examples are documented in the next sections.

All of the read results are saved in these parameters in the protocol file (Figure 3-8).

 Read Results of
                    BQ769x2 Figure 3-8 Read Results of BQ769x2