Software Examples
www.ti.com
26
SLAU597E–March 2015–Revised January 2018
Submit Documentation Feedback
Copyright © 2015–2018, Texas Instruments Incorporated
MSP432P401R SimpleLink™ Microcontroller LaunchPad™ Development Kit
(MSP
‑
EXP432P401R)
Figure 20. Snapshot of Serial Terminal Connected to Running Fuel Gauge Demo
3.4.3 Firmware Overview
See the Quick Start Guide for bq27441-G1 and the bq27441-G1 Technical Reference Manual for detailed
description of the Battery Fuel Gauge usage.
The demo program begins by initializing a number of configuration parameters in the bq27441-G1 to
match the target battery. Four important parameters are Design Capacity, Design Energy, Terminate
Voltage, and Taper Rate. Values are determined based on the target battery properties and bq27441-G1
documentation.
Next, the host MSP432P401R MCU clears the BIE (Battery Insert Enable) bit in the fuel gauge operation
configuration register. When BIE is cleared, the battery detection relies on the host to issue a
BAT_INSERT subcommand to indicate battery presence, bypassing the J6 BIN jumper on the BOOSTXL-
BATPAKMKII BoosterPack plug-in module that the fuel gauge relies on for battery detection by default
when BIE is set (J6 shorted = battery inserted; J6 open = battery removed). This is done to ensure that
the demo application works whether or not J6 is connected.
In end user applications, a switch or the host MCU is more likely to control the BIN state of the fuel gauge
depending on battery connection. However, this is not implemented on the BoosterPack plug-in module
and a jumper is used to manually toggle between battery insertion and removal.
When the bq27441-G1 has been configured properly, the main loop repeatedly reads back
DESIGN_CAPACITY, REMAINING_CAPACITY, STATE_OF_CHARGE, TEMPERATURE, VOLTAGE,
and AVERAGE_CURRENT from the fuel gauge. Results are formatted and transmitted through
Application/User UART.