SLUUBD4A April 2016 – November 2022 BQ27220
Issuing a Control() (Manufacturer Access Control or MAC) command requires a 2-byte subcommand. The subcommand specifies the particular MAC function desired. The Control() command allows the system to control specific features of the fuel gauge during normal operation and additional features when the device is in different access modes, as described in Table 3-2. On this device, Control() commands may also be sent to ManufacturerAccessControl(). Any subcommand that has a data response will be read back on MACData().
Reading the Control() registers will always report the CONTROL_STATUS() data field except after the DEVICE_NUMBER() and FW_VERSION() subcommands. After these subcommands, CONTROL_STATUS() will report the value 0xFFA5 one time before reverting to the normal data response. This is a flag to indicate that the data response has been moved to MACData(). Writing a 0x0000 to Control() is no longer necessary to read the CONTROL_STATUS(), although it is okay if it is done.
When executing commands that require data (such as data flash writes), the subcommand can be written to either Control() or ManufacturerAccessControl() registers; however, it is recommended to write using the ManufacturerAccessControl() registers as this allows performing the full command in a single I2C transaction.
CNTL/MAC FUNCTION | SUBCOMMAND CODE | SEALED ACCESS? | DESCRIPTION |
---|---|---|---|
CONTROL_STATUS | 0x0000 | Yes | Ignored by the gauge (in previous devices would enable CONTROL_STATUS() read) |
DEVICE_NUMBER | 0x0001 | Yes | Reports the device type (for example: 0x0320) |
FW_VERSION | 0x0002 | Yes | Reports the firmware version block (device, version, build, and so on) |
BOARD_OFFSET | 0x0009 | Yes | Invokes the board offset correction |
CC_OFFSET | 0x000A | Yes | Invokes the CC offset correction |
CC_OFFSET_SAVE | 0x000B | Yes | Saves the results of the offset calibration process |
OCV_CMD | 0x000C | Yes | Requests the fuel gauge to take an OCV measurement |
BAT_INSERT | 0x000D | Yes | Forces BatteryStatus()[BATTPRES] bit set when Operation Config B [BIEnable] bit = 0 |
BAT_REMOVE | 0x000E | Yes | Forces BatteryStatus()[BATTPRES] bit clear when Operation Config B [BIEnable] bit = 0 |
SET_SNOOZE | 0x0013 | Yes | Forces CONTROL_STATUS()[SNOOZE] bit to 1 |
CLEAR_SNOOZE | 0x0014 | Yes | Forces CONTROL_STATUS()[SNOOZE] bit to 0 |
SET_PROFILE_1 | 0x0015 | Yes | Select CEDV Profile 1 |
SET_PROFILE_2 | 0x0016 | Yes | Select CEDV Profile 2 |
SET_PROFILE_3 | 0x0017 | Yes | Select CEDV Profile 3 |
SET_PROFILE_4 | 0x0018 | Yes | Select CEDV Profile 4 |
SET_PROFILE_5 | 0x0019 | Yes | Select CEDV Profile 5 |
SET_PROFILE_6 | 0x001A | Yes | Select CEDV Profile 6 |
CAL_TOGGLE | 0x002D | No | Toggles OperationStatus()[CALMD] |
SEALED | 0x0030 | No | Places the fuel gauge in SEALED access mode |
RESET | 0x0041 | No | Resets device |
EXIT_CAL | 0x0080 | No | Instructs the fuel gauge to exit CALIBRATION mode |
ENTER_CAL | 0x0081 | No | Instructs the fuel gauge to enter CALIBRATION mode |
ENTER_CFG_UPDATE | 0x0090 | Yes | Enter CONFIG UPDATE mode |
EXIT_CFG_UPDATE_REINIT | 0x0091 | Yes | Exit CONFIG UPDATE mode and re-initialize |
EXIT_CFG_UPDATE | 0x0092 | Yes | Exit CONFIG UPDATE mode without re-initialize |
RETURN_TO_ROM | 0xF00 | No | Places the device in ROM mode |
An example using the DEVICE_NUMBER() subcommand: