Data Memory Interface; Accessing The Data Memory; Device Access Modes; Sealing And Unsealing Data Memory Access - Texas Instruments BQ27220 Technical Reference Manual

Hide thumbs Also See for BQ27220:
Table of Contents

Advertisement

www.ti.com

3.1 Accessing the Data Memory

The Data Memory contains initialization, default, cell status, calibration, configuration, and user information. Most
Data Memory parameters reside in volatile RAM initialized by associated parameters from ROM. However, some
Data Memory parameters are directly accessed from ROM and do not have an associated RAM copy. The Data
Memory can be accessed in several different ways, depending in which mode the fuel gauge is operating and
what data is being accessed.
Commonly accessed Data Memory locations frequently read by a system are conveniently accessed through
specific instructions already described in Chapter 5, Extended Data Commands. These commands are available
when the fuel gauge is either in UNSEALED or SEALED mode. Most Data Memory locations, however, are
only accessible in the UNSEALED mode by use of the evaluation software or by Data Memory block transfers.
These locations should be optimized and/or fixed during the development and manufacturing processes. They
become part of a golden image file and then can be written to multiple battery packs. Once established, the
values generally remain unchanged during end-equipment operation.
To access Data Memory locations individually, the block containing the desired Data Memory location(s)
must be transferred to the command register locations, where they can be read to the system or changed
directly. This is accomplished by sending the set-up command BlockDataControl() (0x61) with data 0x00. Up
to 32 bytes of data can be read directly from the BlockData() (0x40 through 0x5F), externally altered, then
rewritten to the BlockData()command space. Alternatively, specific locations can be read, altered, and rewritten
if their corresponding offsets index into the BlockData() command space. Finally, the data residing in the
command space is transferred to Data Memory, once the correct checksum for the whole block is written to
BlockDataChecksum() (0x60). Occasionally, a Data Memory class is larger than the 32-byte block size. In this
case, the BlockData() command designates in which 32-byte block the desired locations reside. The correct
command address is then given by 0x40 + offset modulo 32. For an example of this type of Data Memory
access, see
Section
3.3.
Reading and writing subclass data are block operations up to 32 bytes in length. During a write, if the data length
exceeds the maximum block size, then the data is ignored. None of the data written to memory is bounded by
the fuel gauge—the values are not rejected by the fuel gauge. Writing an incorrect value may result in incorrect
operation due to firmware program interpretation of the invalid data. The written data is not persistent, so a POR
does resolve the fault.

3.2 Device Access Modes

The fuel gauge provides two access modes, UNSEALED and SEALED, that control the Data Memory access
permissions. The default access mode of the fuel gauge is UNSEALED, so the system processor must send a
SEALED subcommand after a gauge reset to utilize the data protection feature.

3.3 Sealing and Unsealing Data Memory Access

The fuel gauge implements a key-access scheme to transition from SEALED to UNSEALED mode. Once
SEALED via the associated subcommand, a unique set of two keys must be sent to the fuel gauge via the
Control() command to return to UNSEALED mode. The keys must be sent consecutively, with no other data
being written to the Control() register in between. When in SEALED mode, the OperationStatus[SEC] bits
(SEC1,SEC0) are set to 11; but when the Sealed to Unsealed keys are correctly received by the fuel gauge, the
SLUUBD4A – APRIL 2016 – REVISED NOVEMBER 2022
Submit Document Feedback
Copyright © 2022 Texas Instruments Incorporated

Data Memory Interface

Data Memory Interface
Chapter 3
BQ27220
27

Advertisement

Table of Contents
loading

Table of Contents