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

Low-Level Command Control

Figure 3-5 lists the basic BQ769x2 register control functions based on the Inter-Integrated Circuit (I2C) Driver Library (I2C_communication.h) for M0.

 Basic Communication
                    Functions Figure 3-5 Basic Communication Functions

These functions are used for MSPM0 to write and read the registers of the BQ device in byte. Referring to the BQ769x2 Technical Reference Manual and data sheet, direct commands, subcommands, and reads and writes to RAM registers can be realized on the register control functions. Figure 3-6 lists the prototype of functions.

 Basic Functions of
                    BQ769x2 Figure 3-6 Basic Functions of BQ769x2

Direct Commands, Command-Only Subcommands, and Subcommands with data are predefined functions available to simplify communication with the battery monitor.

The input parameters for the Direct Commands function are the command, the data, and the type. There are two types: read and write. The user can read data from the command address and store data in the Rx state of the global variable to be read for the read type. The user can write data to the command address for the write type.

For Command-Only Subcommands functions, the input parameter is the subcommand such as shut down and reset. This function formats the transfer array then writes the array to hex 3E, where the monitor then operates based on the command.

The Subcommands with data differs from the command-only subcommands because there is data associated with each command, whether functioning to read the data or write data. The input parameters are similar to the BQ769x2 SetRegister function, but the last input is typed instead. This input can either be the defined macros R for read, W for write, or W2 for write two bytes.

The input parameters for the BQ769x2 SetRegister function are the data memory register address, the data memory intended to write, and the data length in bytes. First write hex 3E for the initial write for subcommands in direct memory, and then write to register hex 60 for the checksum to enter the data transmitted was correct. Finally, there are different cases for the three varying data lengths.

A complete list of commands is found in the BQ76952 Technical Reference Manual.