Part Number:BQ34Z100-G1
Once the QEN bit has been set, is it possible to change values in the Data Memory?
I have been struggling for weeks now trying to piece together how to use this device from scattered bits of sometimes inaccurate information. For example: 7.3.3.1 Accessing Data Flash (SLUSBZ5B-JANUARY 2015-REVISED JULY 2016) on step 8 states:
“8. The new value for new_Pack_Configuration_MSB can be written by writing to the specific offset location. For example, to write 1-byte new_Pack_Configuration_MSB to Pack Configuration (offset=0) located at 0x40, use command (wr 0x4B new_Pack_Configuration_MSB)”
WHY would it work writing to 0x4B?...is this yet another diversionary TYPO?
During my many attempts at a learning session to create a Golden File, I did enable IT.
In the previously mentioned document under: 7.3.1.2.15 IT ENABLE: 0x0021 it states: “Once set, [QEN] cannot be cleared. This command is only available when the fuel gauge is UNSEALED and is typically enabled at the last step of production after the system test is completed.”
Is this similar to the I2C/HDQ one-shot only feature?...no going back? Does it physically blow a fuse that even a complete firmware update cannot return you from? Am I hosed if I enable IT before completely configuring the Data Memory?
I have carefully attempted to change the default “LION” to “NiMH” in the Data Memory with no success as of yet.
Following is a log sequence of a recent attempt:------------
Advanced Comm Transaction Log
TimeStamp , Read/Write , Address , Register , Length , Data ,
2018-07-06 02:11:08 931 , Wr , aa , 00 , 2 , 14 04
2018-07-06 02:11:22 200 , Wr , aa , 00 , 2 , 72 36
2018-07-06 02:11:37 558 , Wr , aa , 61 , 1 , 00
2018-07-06 02:12:04 684 , Wr , aa , 3e , 1 , 30
2018-07-06 02:12:18 870 , Wr , aa , 3f , 1 , 01
2018-07-06 02:12:31 390 , Rd , aa , 40 , 32 , 62 71 33 34 7A 31 30 30 2D 47 31 0B 54 65 78 61 73 20 49 6E 73 74 2E 04 4C 49 4F 4E 00 00 00 00
2018-07-06 02:13:02 605 , Rd , aa , 58 , 5 , 4C 49 4F 4E 00
2018-07-06 02:13:24 776 , Rd , aa , 60 , 1 , E3
2018-07-06 02:14:19 561 , Wr , aa , 58 , 4 , 4E 69 4D 48
2018-07-06 02:14:36 356 , Wr , aa , 60 , 1 , C9
2018-07-06 02:14:44 042 , Rd , aa , 60 , 1 , E3
2018-07-06 02:14:59 451 , Rd , aa , 40 , 32 , 62 71 33 34 7A 31 30 30 2D 47 31 0B 54 65 78 61 73 20 49 6E 73 74 2E 04 4E 69 4D 48 00 00 00 00
------------------
Following are my notes that accompany the log file:-------
Example trial: Change “LION” to “NiMH” for Device Chemistry; Subclass ID 30, block 1, offset 23, length 5
[*] = 0x6ea -> 0xea (partial CheckSum)
[62 71 33 34 7A 31 30 30 2D 47 31 0B 54 65 78 61 73 20 49 6E 73 74 2E 04] 4C 49 4F 4E 00 00 00 00 ---> E3 [old]
LION = 0x32
[62 71 33 34 7A 31 30 30 2D 47 31 0B 54 65 78 61 73 20 49 6E 73 74 2E 04] 4E 69 4D 48 00 00 00 00 ----> C9 [new?]
NiMH = 0x4c
(wr 0x00 0x14 0x04) -- 1st 2 bytes to UNSEAL
(wr 0x00 0x72 0x36) -- 2nd 2 bytes
(wr 0x61 0x00) -- BlockDataControl()
(wr 0x3e 0x30) -- DataFlashClass()
(wr 0x3f 0x01) -- block offset DataFlashBlock()
(rd 0x40 0x20) -- shows full 32 byte page
(rd 0x58 0x05) -- only the 5 bytes
(rd 0x60 0x01) -- read the CheckSum
(wr 0x58 4E 69 4D 48) -- write "NiMH"
(wr 0x60 0xC9) -- write the new CheckSum
(rd 0x60 0x01) -- read the CheckSum
(rd 0x40 0x20) -- show full 32 byte page
------
This component has already been designed into our battery fuel gauge circuit and I have been tasked with implementing the firmware. There is a fine-line between being challenged and frustrated….this project has been both.
Am I simply not calculating the CheckSum properly? The documentation suggests that when I write a correct CheckSum to 0x60 that the 32 byte buffer @ 0x40 will be written to flash. I have clearly shown the ability to change the values within the buffer, but am unable to change the CheckSum value and get things changed in Data Memory.
Any insight into how to make things work will be greatly appreciated.
Best regards,
-Steve