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: A read of data written failed comparison.

Part Number: BQ34Z100-G1
Other Parts Discussed in Thread: BQSTUDIO, EV2400, BQ34Z100, BQEVSW

I just spent a long time trying to configure a BQ34Z100-G1 gas gauge by changing a few parameters, e.g. Voltage Divider and CC Gain. Whatever value I entered, it reported "A read of data written failed comparison". I tried sending the UNSEAL and UNSEAL_FULL_ACCESS commands first, and of course switching everything off and back on. Always I got the same report.

In frustration I tried a second board, which as far as I know is identical to the first. It worked first time! These are both brand new parts from the same batch and the boards have had full anti-static precautions taken. The circuit is of my own design, but apart from different component values for my specific battery, is copied from Texas Instruments example schematic. My configuration tool is Battery Management Studio (bqStudio) 1.3.54.1. I'm hoping this isn't a chip failure which would not bode at all well for production: I'm assuming it's some sort of configuration problem.

Can anyone suggest why one chip works and another doesn't? Is there anything I should / should not have done, or can someone suggest how to diagnose the problem please? Thanks for any help.

For information, I've attached a csv capture of the bad I2C data. It's split into two bursts because my 'scope doesn't have sufficient record length / resolution to capture it all in one hit.

FIRST BURST OF DATA:
Tektronix MSO2024B, version v1.56, serial number C021227
Bus Definition: I2C
Time Repeat Start Direction Address Data Missing Ack
-4.00E-06   Write AA 61 00  
1.60E-02   Write AA 3E 68  
3.20E-02   Write AA 3F 00  
6.36E-02   Write AA 40 7F 71 27 D4 94 08 99 F9 FB 50 00 00 00 00 82 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
7.80E-02   Write AA 60 B5  
SECOND BURST OF DATA:
Tektronix MSO2024B, version v1.56, serial number C021227
Bus Definition: I2C
Time Repeat Start Direction Address Data Missing Ack
-4.00E-06   Write AA 61 00  
1.50E-02   Write AA 3E 68  
3.10E-02   Write AA 3F 00  
6.20E-02   Write AA 40  
6.23E-02 X Read AB 7F 71 27 D4 94 08 99 F9 FB 50 00 00 00 00 13 88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
7.90E-02   Write AA 60  
7.93E-02 X Read AB 0  
  • It looks like the Voltage Divider did not update in with the Write command. The usual culprit is that the cell voltage is lower than the Flash Update OK Cell Voltage. Make sure the IT is not enabled and the Flash Update parameter should be ignored. I would not worry about writing the Voltage Divider parameter and just calibrate the voltage and allow the gauge to update the parameter in the data flash. Are you using the EV2400 communications adapter? If so, then you should upgrade the firmware on it to v18 to add some I2C interface improvements.
  • Hello TEC,

    Thanks for your prompt reply.

    Browsing other FAQs it would appear that the only way to disable IT is to import and write a default srec (see screenshot below). I've done that (Import defaults + write all), but still can't change many (perhaps all) parameters, including Flash Update OK Cell Voltage. In fact I get a verify error when writing the default srec.

    I tried to attach my gg file, but not sure if it worked because all I see in my browser are grey blobs.

    Thanks also for the EV2400 upgrade tip. Now I don't get any error entries in log files.

    BQ34Z100-G1_DataMemory.gg.zip

  • Update Status = 04 in the gg file, so the gauge will still consider IT to be enabled and this could prevent the flash updates. If you want to import the gg file back into the device, then I would edit the gg file with Notepad and set Update Status = 00. You can then try importing it into the gauge after programming the default srec. You should than calibrate the gauge to get the voltage into a good operating voltage range.
  • Hello.Please give advice. We use 34z100 in conjunction with the Arduino to read data via I2C interface. Is it possible to read the parameter Design Energy Scale? Sorry for bad English.
  • Yes. See app note below:
    www.ti.com/.../slua790.pdf
    thanks
    Onyx
  • Thank you Onyx, we have this Datasheet. We can read the commands listed in the commands table dataset SLUSBZ5B - State of Charge, Voltage, Current, Remaining Capacity, etc., because in some datasheets are command codes and addresses at which to execute the query.. the table data flash summary (SLUSBZ5B, p. 25) indicates that for the parameter Design Energy Scale subclass ID=48 (0x30), offset=30. But to consider this parameter we have does not work..Please, Tell me what command and what register it is possible to consider the parameter Design Energy Scale

  • I found a solution, thanks. Register 5E
  • see the subclass id and data length. Bqstudio has this info. To view this format go to windows->preferences->all global settings->show advanced views.

    thanks

    Onyx

  • Hello Onyx. Thanks for the help. Let me ask a few more questions. I use the EV2300 to work with the bq34z100 (the markings on the chip 34Z100  59K G4  D2ZE). Start bqStudio 1.31.54.1, choose in the list bq34Z100, and the program displays the message: "The detected device is not compatible with this application!
    Some actions could cause the device to lose communication permanently and enter an unrecoverable state.
    Proceed at your own risk.
    Select OK to continue, Cancel to close the application". Click OK and start the program.
    Enter the required data in the Data Memory Menu (Gas Gauging, Configuration etc)..Put the Design Energy Scale parameter, for example equal to 10. Reading this register using the menu Advanced Comm I2C, the program shows the correct value in hexadecimal. Run the program bq Evaluation Software version 0.9.90, error messages does not arise. But all the parameters mentioned previously in bqStudio 1.31.54.1 displayed is not correct. Read through the I2C menu Pro, parameter Design Energy Scale - read correctly..Change to menu Data Flash, re-read the menu Pro I2C - parameter remained unchanged..
    Why is this happening, and which version bqStudio better to use the BQ34Z100 chip? Why bqStudio 1.31.54.1 at startup displays a message about the incompatibility, and why the same parameters in different versions bqSudio have different meanings? Thanks again for the help, waiting for an answer.

  • Hi Alexey,

    I am not sure what is going on with your system, but to be absolutely sure if the parameter you changed actually did change, cycle power to the chip, i.e disconnect and reconnect you battery and then use bqEVSW or bqstudio to read the parameter you change. If it actually changed, then it means your action was successful. By the way, bqstudio is supposed to automatically detect the device. You are not supposed to see that message. if you see it, then it means you most likely have an older firmware version on your ic. You will need to update the iC to the most recent firmware version. link below

    thanks

    Onyx

  • Hi Onyx. Thank you very much for the help. Updated the firmware to version Bq34Z100-G1, BqStudio now runs correctly, the chip is automatically detected, the error does not occur. The parameters are read correctly.
  • Hi,

    I think I've done what you suggested: import defaults (update status = 0 at this point), write all, export file so that I can open it in notepad. Update status was already 0, but overwrote it anyway. Save the file, import into bqstudio and write all.

    I still get a read after write error, and when I read all, the update status comes back as 4.

    The same thing happens if I just try to change update status in bqstudio.

    Looking at the bq34z100 data sheet slusbz5b, the only values allowed for update status are 2, 4, 5 and 6. Also it should only be updated during a learning cycle, or when IT_ENABLE() subcommand is received. I sent this command, but it still won't let me change update status to 0.

  • Did you program the default srec file and the ChemID into the pack before importing the modified gg file? The default srec file has to be programmed to the device to reset IT.
  • If I've understood correctly, then yes, I've programmed the default srec and Chem ID. Please see the screenshots attached.

    Having messed up yesterday and locked myself out of the thread, I've gone back to an earlier post to try to continue. You asked for a screen shot of the registers page. Please see below.

    Screenshots.zip

  • The screenshots show that the flash is not updating. Please provide a screenshot of the full screen with the Registers screen. (main screen)
  • Sorry, I think I hit the "resolved my issue" by mistake.

    Screenshot attached as requested.
  • I think I've locked myself out of this thread, I can't attach a screenshot.