bq20z80-V101
www.ti.com
SLUS625D–SEPTEMBER 2004–REVISED OCTOBER 2005
DATA FLASH
CAUTION:
Care should be taken when mass programming the data flash space using
previous verisons of data flash memory map files (such as *.gg files) to ensure
all public locations are updated correctly.
Data Flash can only be updated if SBS.Voltage( ) or SBS.PackVoltage( ) ≥ DF:Flash Update OK Voltage. Data
flash reads and writes are verified according to the method detailed in the 2nd Level Safety section of this data
sheet.
Note: Data Flash updates are disabled when SBS.SafetyStatus( ) [PF] is set.
Access
In different security modes, the data flash access conditions change. See SBS.ManufacturerAccess( ) for further
details.
SECURITY MODE
BootROM
NORMAL DATA FLASH ACCESS
N/A
R/W
R/W
R
Full Access
Unsealed
Sealed
Data Flash Interface
The bq20z80 data flash is organized into subclasses where each data flash variable is assigned an offset within
its numbered subclass. For example: the DF:Pre-chg Temperature threshold location is defined as:
•
•
•
Class = Charge Control
SubClass = Pre-Charge Config = 33
Offset = 2
Note: Data Flash commands are NACK'ed if SBS.OperationStatus( ) [SS=1].
Each subclass can be addressed individually by using the SBS.DataFlashClass( ) command and the data within
each subclass is accessed by using the SBS.DataFlashClassSubClassx( ) commands (0x78..0x7f).
Reading and Writing subclass data are block operations which are 32 Bytes long but data can be written in
shorter block sizes. The final block in the subclass can be shorted than 32 bytes so care must be taken as all
bytes are overwritten correctly. None of the values written are bounded by the bq20z80 and the values are not
rejected by the gas gauge. Writing an incorrect value may result in hardware failure due to firmware program
interpretation of the invalid data. The data written is persistent, so a Power On Reset does resolve the fault.
Reading a SubClass
Information required:
•
•
•
SubClassID
Number of bytes in the subclass
Variable Offset
Procedure:
1. Write the SubClassID using the SMBus Word Write protocol.
–
–
Command = SubClassAccess command as specified in the data sheet (eg; Command 0x77)
Word = SubClassID
2. Read a block of data using SMBus Block Read protocol.
–
–
Command = DataFlashClassSubClassx as specified in the data sheet (eg; Command 0x78)
If a subclass has more than 32 bytes, then to get the next 32 bytes use Command =
ReadSubClassCommand+1 (e.g. Command 0x79)
42