This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

bq34z100-g1 flash access

Other Parts Discussed in Thread: BQSTUDIO, BQ34Z100, BQ34Z100-G1

Hi,

In the document (SLUSBZ5, p21) of the gauge, an example is given to access "Terminate Voltage". In the data flash summary  table the name is "Cell Terminate Voltage" and not "Terminate Voltage" and the offset is 53 and not 48. Also the following explanations are not clear for me :

Occasionally, a data flash class will be larger than the 32-byte block size. In this case, the DataFlashBlock()
command is used to designate which 32-byte block in which the desired locations reside. The correct command
address is then given by 0x40 + offset modulo 32. For example, to access Terminate Voltage in the Gas
Gauging class, DataFlashClass() is issued 80 (0x50) to set the class. Because the offset is 48, it must reside in
the second 32-byte block. Hence, DataFlashBlock() is issued 0x01 to set the block offset, and the offset used to
index into the BlockData() memory area is 0x40 + 48 modulo 32 = 0x40 + 16 = 0x40 + 0x10 = 0x50; for example,
to modify [VOLTSEL] in Pack Configuration from 0 to 1 to enable the external voltage measurement option.

About Key Programming, p40, the 16-byte key begins at the offset 0x08 (subclass ID 112) in the Data Flash Summary. Also I don't understand in the following paragraph, the command location 0x4C when I expect 0x48.

When the device's SHA-1/HMAC internal engine is used, authentication keys are stored as plain-text in memory.
A plain-text authentication key can only be written to the device while the IC is in UNSEALED mode. Once the IC
is UNSEALED, a 0x00 is written to BlockDataControl() to enable the authentication data commands. Next,
subclass ID and offset are specified by writing 0x70 and 0x00 to DataFlashClass() and DataFlashBlock(),
respectively. The device is now prepared to receive the 16-byte plain-text key, which must begin at command
location 0x4C. The key is accepted once a successful checksum has been written to BlockDataChecksum() for
the entire 32-byte block (0x40 through 0x5F), not just the 16-byte key.

With bqstudio, in using the tool Advanced Comm I2C, what does it mean in the transaction log window, when command is displayed in red characters ?

Mickael White

  • Mickael,

    All parameters on the bq34z100-G1 are cell based and Terminate Voltage and Cell Terminate Voltage refer to the same value. It was a mistake to use different names. The offset is 53 for the Cell Terminate Voltage on the bq34z100-G1, the 48 offset was for the previous device, the bq34z100. This is a documentation mistake and I will have it corrected.

    There are 32 bytes per page in the memory, so an offset of 53 will be on the second page and it will be the 21 and 22 bytes. (53-32=21)

    Convert the SubClass HEX. 80 = 50H

    Use the Write I2C Byte section of the I2C Pro.

    • I2C Command 61, Byte 00 (Enable Flash x’fer command)
    • I2C Command 3E, Byte 50 (SubClass address)
    • I2C Command 3F, Byte 01 (Index to the 2nd page in memory)

    Use the Read I2C Data Block section to read the flash.

    • I2C Command 40, Read Data Size 32

    Skip the first byte and then the 21st and 22nd bytes are 0b b8. 0bb8H = 3000 decimal. My Cell Terminate Voltage is set to 3000mV.

    Tom

  • Tom,

    Thank you for the answer to my first question. It's all right.

    And the commands to get the Cell Terminate Voltage alone, are also all right, in my example is 1750mV (0x06D6), location 0x40 + offset 0x15 (21)

    TimeStamp , Read/Write , Address , Register , Length , Data ,
    2015-11-23 04:57:07 219 , Wr , AA , 61 , 1 , 00
    2015-11-23 04:57:22 142 , Wr , AA , 3E , 1 , 50
    2015-11-23 04:57:33 251 , Wr , AA , 3F , 1 , 01
    2015-11-23 04:57:45 486 , Rd , AA , 55 , 2 , 06 D6

    Mickael