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.
Tool/software:
Using BQ34Z100 fuel gauge. I am trying to update the value of design capacity. I follow all the steps in the documentation and successfully change the value in the flash. The problem is that when I access Design capacity through extended command 0x3C, it still shows the default value 1000, instead of the one I have saved in flash. Here are the steps I follow while trying to update the design capacity value:
1) Unseal and full access mode
- 0x00, 0x14, 0x04
- 0x00, 0x72, 0x36
- Writing 0xffff to 0x00
- Writing 0xffff to 0x01
2) Enter the calibration mode
- 0x002D (to enable calibration mode)
- 0x0081 (to enter the calibration mode)
3) Enable block data control
- 061, 0x00
4) Select the correct subclass
- 0x3E, 0x30
5) Select the correct data flash block
- 0x3F
- offset/32 = 0
6) Reading what is the already saved value (by navigating to the correct block and offset)
7) Writing the updated value, which is 800, so writing 0x03 and 0x20.
- Writing one byte to [0x40 + (offset % 32)] and the other byte to [0x40 + (offset % 32) + 1]
8) Calculating and updating the checksum
9) Exit calibration mode
- 0x0080
10) Reset the device
- 0x0041
11) Seal the device
- 0x00, 0x20, 0x00
Where subclass = 0x30 (48) and offset is 0x0B (11).
Flags are checked while entering the unseal, full access and calibration mode to ensure the correct modes.
Result = able to update values in the flash, it verifies that the checksum and update process is correct.
Problem = accessing design capacity through the extended command 0x3C still shows the default value, 1000.
Hi,
You do not need to enter calibration mode to edit data flash parameters not related to calibrating the ADCs.
Device should be unsealed, unsealed full access, prior to changing DF parameters.
Is using BQstudio and an EV2400 an option?
This docuemntation should help.
Using I2C Communications With the bq34110 bq35100 and bq34z100-G1 Series of Gas
Are you reading back the design capacity to verify after writing to the gauge?
Regards,
Diego
Hi,
Thank you for the reply.
I have now removed the calibration-mode part and am entering the unsealed mode and then full access mode but the Design Capacity available through the extended commands still has its default value.
I am now using the BQstudio where I unseal, enter full access mode and then change the DF value of design capacity. Then I reset the device and the new value of design capacity gets successfully saved in the flash. But reading the design capacity through extended commands in the BQstudio still results in the default value.
The gauge communication document says something about ROM gauging and updating the cfg-bit. But BQ34Z100 does not have any such cfg-bit. Is there something else that needs to be updated after value update in the flash? So that Read Only Design capacity value read via extended commands becomes equal to one in the flash?
I am now using the BQstudio so I am reading back the correct values.
Thanks!