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.

BQ41Z50: Upgrade golden image to the latest firmware

Part Number: BQ41Z50
Other Parts Discussed in Thread: BQSTUDIO

Tool/software:

Hi TI Team. 

We have a battery pack that uses the BQ41Z50 that we have successfully run a learning cycle on and built a golden image from FW version 0.01 build 12.

We would like to now create a new golden image that uses the latest V0.01 build 12 FW released April 25th without having to re-run the learning cycle and redo all the settings. 

I tried simply adding the new firmware to the encrypted path assuming BQ Studio would create a combined image with the existing packs FS and add it to the new firmware image. 

But when I program the new combined image, the Chem ID is changed, settings etc, so it looks like we are losing all of our data. 

Is there a method to upgrade the Firmware to the latest without losing all our existing work?

Thank you. 

  • Hello Trevor,

    The best method is to export the .gg file of the old version you had, along with manually noting the chemID you used than flashing the new firmware onto the system import the .gg file and manually updating the chemID.

    Thank you,
    Alan

  • Hi Alan,

    Is ChemID the only parameter that is not stored in the GG file?  Is all the calibration data from the learning process saved to the GG file?    I want to make sure none of the learning data is lost since the Chem ID is lost.  Are there any other parameters stored in the filesystem that are lost?

  • Thanks Alan.

    There is an error when trying to manually update the chemID to 2068 with BQ41Z50 FW Version 0.01 build 21. "Error code = 1709. The chemistry signature does not match signature calculated by firmware" 

    I am using bqStudio version 1.3.27 and the latest chemistry version 1157.

    The chem ID 2068 does work on the previous FW V0.01 Build 12. 

  • Hello Trevor,

    Can you verified that you Ra table has updated? If that is the case than you programmed the chemID and the error code is most likely a mistake on our end within the system.

    *Image shows default values

    Thank you,
    Alan 

  • Hi Alan, The RA table does update after the reported failed update of the 0x2068 Chem ID. The reported chem ID after the failed update is incorrectly reporting 0xFDAC. 

    A bigger issue is after flashing the new firmware then importing the .gg file from the previous build the whole app seems to break. 

    Voltages are not measuring correctly (Cell 2 is reporting 63V), alarms are going off everywhere, the CAL_EN is set etc. The .gg file works properly with the previous build. 

    So right now this whole process does not seem to work. 

  • Hello Trevor,

    Voltages are not measuring correctly (Cell 2 is reporting 63V), alarms are going off everywhere, the CAL_EN is set etc. The .gg file works properly with the previous build. 

    Are you importing a .gg from the same device? Also if you are seeing measurements issues is the hardware the same? If so please perform a calibration.

    Thank you,
    Alan

  • Alan  we CANNOT DO THIS.  We have production units, and the TOOL IS BROKEN.

    I need an escalation on this, we have units in the field we need to update and WE CANNOT EVEN SET THE CHEM ID.  It's IMPOSSIBLE to calibrate if we cannot even set the Chem ID with the tool!  Please go re-read everything.

    TI tools and software are BROKEN.     You have the dev boards, TI needs to duplicate this themselves, it's borken..   CUSTOMERS ARE NOT THE GUINNEA PIGS.   The tools are clearly broken, recalibrating is NOT POSSIBLE with broken tools. 


    TI needs to verify this on their tools and see that this is broken and fix the tools!

  • Hi Alan, this was preformed on the same hardware, the .gg file is from the same device exported moments before the firmware upgrade. As Pat, my colleague, mentioned, the tools here seem broken and we need a path forward to use the same .gg file without re-runing the calibration or the learning cycle etc. The fact that the CHEM ID does not properly program demonstrates that either the tool or the new firmware is broken. 

  • Hi,

    BQstudio is not a production tool. BQstudio is used to develop a golden image for production. This golden image can be generated in BQstudio but must be flashed onto gauges during production from a host.

    If the Ra tables have updated, you have successfully programmed that chemid to your gauge. 

    The chem ID 2068 does work on the previous FW V0.01 Build 12. 

    Chemid 2068 can be programmed using BQstudio, I have confirmed on my end.

    A bigger issue is after flashing the new firmware then importing the .gg file from the previous build the whole app seems to break.

    You cannot upload a different FW version .gg file to a newer FW version device. 

    Were both golden images developed on the same device with the same FW versions?

    I have verified that you can upload and program a .gg file in BQstudio using, the import button on the data memory tab.

    there is also and advanced import feature where you can select which parameters you want to upload to your gauge from the .gg file.

    Voltages are not measuring correctly (Cell 2 is reporting 63V), alarms are going off everywhere, the CAL_EN is set etc

    Are you including old calibration parameters when uploading the old .gg? Each device will have slightly different calibration values.

    Here is my recommendation. 

    1. upload your .gg file to the gauge, and write all +read all to confirm.

    2. Program your chemid, you can verify this by looking at the ra tables or by sending the chemid cmd.

    3. Calibrate your device using BQstudio. 

    4. extract your golden image after confirming performance. 

    Regards,

    Diego

  • [deleted]
  • We have hardware built and calibrated using software release 12.  These units are in production and in the field.

    THere are bugs in this software.   TI release a bug fix in release 21.    We load the new software release 21 on and it breaks are existing hardware in production.  The same tool is used to calibrate the hardware.   It sets the registers that are used.  

    Then TI says we need to recalibrate even though the batteries are already calibrated and we have the calibrated data.

    We then load the new calibration data from the ".gg" file.  This is a text file read from the tool, this is not software specific.

    We load the new GG file on and it BREAKS.   The device is useless, the registers are wrong, the data is wrong.  

    How can we calibrate the device when we load the .gg file on and it's broken?   You see the screen from Trevor, everything is broken.   We cannot calibrate if we load a gg file with the register settings we need and it breaks.   IT appears that the tools is not compatible with release 21.  It is only compatible with release 12.

    Here is our GG file, we load this on our board after loading the new software and everything is broken.

    2021.acprs_settings.gg.csv

  • Hello Pat, 

    We load the new software on and it breaks are existing hardware in production

    -You can't load the entire of the old firmware .gg file to a new firmware .gg file due to the some registers being moved during the update, you are able to selectively update with a advanced import feature where you can select which parameters you want to upload. You can also manually import the old .gg file value into the new firmware Data Memory tab since the naming is kept the same. But the software is not broken rather with the new firmware and the current way your team implemented lead to the right values being placed in the wrong location.

    We cannot calibrate if we load a gg file with the register settings we need and it breaks.

    -Once you manually verified that all your .gg values are located in the correct area than you can do a recalibration, and this would only entail following the guide.

    Calibration Guide:
    dhttps://www.ti.com/lit/an/sluaat6/sluaat6.pdf?ts=1746805816504&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FBQ41Z50

    You see the screen from Trevor, everything is broken.  

    -Once you update your system with the values in the corresponding location it should perform accurately. 

    Thank you,
    Alan

  • Hi Alan

    There are no register locations in the GG file. It's just text strings.  We are not loading anything into the wrong location, the tool is determining what to write based on the text, so we are not writing anything.  Since the GG file doesn't contain addresses I do not see how we can be placing anything in the wrong location.

    Further, we need to update our field units.  This will completely break our field units!  All the cycle count data, QMax updates, life cycle is LOST.  This is really really really bad.  So TI does not provide a way to upgrade from one software release to another?  The tools are aware of the software version, the tool *is* broken, if TI release software that is incompatible with data from the tool, the tool should have a way to migrate that so it is compatible.   But as it sits right now, TI is basically saying any units in the field are now going to be completely broken as a result of their software update.

    I'm trying the process you specified now but I still cannot update our field units, that is a huge problem here.

  • Hello Pat,

    2021.acprs_settings.gg.csv

    I don't understand the confusion, you would simply open the .gg file you sent previously and cross reference the values into those said parameters, this can be done manually for assurance as well or imported into as groups but not all of them. I've attached a example of this below

    o TI does not provide a way to upgrade from one software release to another? 

    TI doesn't have a tool to convert the .gg from different firmware reasons

    Thank you,
    Alan

  • TI doesn't have a tool to convert the .gg from different firmware reasons

    So units in the field that need to get upgraded cannot be upgraded and they have to be thrown away?   How do we escalate this?  Not being able to update production units is a devastating limitation, never mentioned in any TI documents or support.   We have been asking questions about this for several months now and nobody has said "you cannot upgrade field units without losing all their runtime data".  


    Secondly, after upgrading, several values are bad.   We just upgraded a board to release 21 and read the data out to start from scratch.  Again.   Many many values are completely bogus:

    "Settings","GPIO","Sealed Access Config","16","hex"                                                                                                

    THis value is no good, many of the bits are invalid.  The default value is 0, so the tool or software is completely corrupted.  There's many many many other values that are bogus.    I can't merge in the old GG settings, too many have changed. 

    "Settings","Configuration","IT Gauging Ext","2328","hex"
    "Settings","Configuration","DA Configuration","ffff","hex"
    "Settings","Configuration","Power Config","ffff","hex"
    "Settings","Configuration","IO Config","ffff","hex"

    All garbage.  Most of the values are garbage.  This whole release is really really bad. I don't know how we get out of this mess,  everything is completely corrupted and we cannot seem to recover any of it.  

  • Finally got it working, the whole process is not documented and we had to reverse engineer the whole thing.    For any poor soul that has to go down the same rabbit hole, the TI tools are really broken and the software is not well documented.   The hardware is pretty good, but the software is somewhere in the range of "bad" to "horrible".  Here's what we have learned / reverse engineered

    * TI software is NOT compatible in any way with either the tools or previous versions and has several critical bugs

    The bugs can be worked around fortunately, but you need to know what to look for.  DO NOT DEPLOY ANY PRODUCTION UNITS WITH BUGS IN THE TI SOFTWARE.   Better to design the part out or delay a product launch than ship with TI bugs, because ALL DATA IS LOST UNDER A TI SOFTWARE UPDATE.  This is the single most important thing, the TI software will destroy units in the field with a software update, the software cannot be upgraded.   TI philosophy is that an upgraded unit is a new unit, so all battery data is lost.   A battery that has been in use heavily for months will lose it's data and all the aging, RA, charge cycle, battery health gets lost.   This is absolutely devastating from a product reliability perspective, so DO NOT PLAN ON UPGRADING SOFTWARE FROM TI ONCE SHIPPED. 

    From what we have reverse engineered, the software is so poor that it will happily take "invalid / bad" values and rather than give an error, just give wildly erratic results.   We spent ~200 hours validating our hardware and software from the previous release so we well understood the behavior.   After "upgrading" to this new release to get some critical bug fixes, *everything* was broken.  Bad ADC reads, bad current limits, totally errating behavior.   No help on this at all, you are on your own.  TI says to "recalibrate" but you can't, because literally *everything* is so broken you can't recalibrate.   But alas, we figured out on our own that in BQ Studio, under "Data Memory" tab, in the "import" drop down (same place you would load a GG file), there is an "Import Defaults".   Nobody will tell you this, and you won't find it documented anywhere, but this at least gets you "close" to sane defaults.

    TI definitions of defaults are different than our definitions.  One would think that "defaults" would mean "defaults as documented".   But alas, with the TI tools and software, that this is not the case.  Some critical registers are NOT correctly defaulted, like "DA Configuration".   The tools default some reserved bits (bits which the documents say "do not write") to true, and that causes some bad behavior.   The only way to be sure is go through the datasheet and then compare it to the defaults that the tools load.   I forgot to write them all down, but DA configuration was one.   Fortunately, if you  use a diff tool (like KDIff 3) to diff the "old" GG file and the new one, it's not too bad.  I only wasted ~3-4 hours on the diff process, compared to 2 days trying to get clear answers from TI, so this is most definitely in your best interest to manually check yourself.

    * The firmware downloaded and installed affects the tool behavior

    Totally undocumented, but from what we have been able to reverse engineer, it appears that when you download an updated device firmware package from TI website, the register descriptions are part of that install.   There's a TI folder in "ProgramData" that this all gets installed into and there's a few metadata files associated with this that we are guessing tells BQ Studio what registers to use.   If you try to use one from the wrong software version though, it appears to NOT WORK.  This is very crucial.   install BQ Studio, THEN install the firmware downloaded from TI website.  This combinations works reliably.  

    Now as I mentioned, the TI tools are really buggy.  One really sad bug is that BQ Studio has a feature that, when it works, will display the bit fields and descriptions for the registers when you mouse-over them.  This is an extremely useful and helpful feature.  Unfortunately, when you install new device firmware that is downloaded from TI's website, this breaks (at least it did for BQ41Z50 firmware release 21).   It gets repaired when you reinstall BQ studio, but remember the register mapping issue I mentioned?   Yes, if you reinstall BQ Studio to fix the pop-up's , it will break the device completely, I'm guessing because the registers get remapped.  SO you have to reinstall the downloaded device firmware, which allows the tool to set the registers correctly, but breaks the pop-up help inside the tool.

    Back to BQ41Z50 firmware:  so here's what you have to do to upgrade BQ41Z50 (note: field device must be thrown away)

    CRITICAL:  MAKE SURE THE PACK +/- PINS ARE NOT CONNECTED TO A REAL LOAD
    - Get the gg file used to make the "old" golden image, I call that the "old GG" below
    - Download/install the new BQ41Z50 firmware from TI website,  Note: DO NOT REINSTALL BQ Studio!!! 
    - Program into the BQ41Z50 device with old firmware
    - Reboot.  At this point, the old device is completely messed up, all the registers are wrong and everything is completely broken with the BQ41Z50.   This is why the pack must not be installed, the battery pack is NOT SAFE at this point, the data is completely corrupted and all the safety protections are INVALID.  This is a dangerous state to be in, make SURE the pack is isolated and not plugged into a load.
    - Under "Data Memory", select "Import" -> "Import Defaults"
    - At this point, most of the defaults are set and correct, the pack is safe, however, SOME OF THE DEFAULTS ARE WRONG
    - Program in the chem ID
    - export these default settings to a new gg file, for example, "build_21_defaults.gg.csv"
    - now use a diff tool like KDiff 3 to compare the old "gg" file to the new "build_21_defaults.gg.csv"
    - There's a handful of settings in the "old" GG file that are no longer used, make a note of them so you can look it up in the docs to see if you need to replace them.  But most of the setting differences are just "renamed", and aren't too bad to figure out.  For example
    "Settings","Configuration","Flag Map Set Up 1","0000","hex"   
    became
    "Settings","Flag Map","Set Up 1 Configuration","0000","hex"       
    ( Yes, it's completely inexcusable that a vendor doesn't do this and you have to which speaks to the quality that TI puts out )
    - IMPORTANT:  for the registers, double check the defaults.  For example, DA Configuration was wrong, it was setting "invalid" bits still, follow the BQ41Z50 reference manual
    - Using the Diff tool compare and merge in the settings from the "defaults" GG and the "original/old" GG into a new settings file (for example build_21_merged.gg.csv).  Using KDiff3, it's not too bad.  It will highlight the differences, and most of the differences are just numbers, and the new numbers are what you want.  Especially pay attention to the RA table (which is calibration data).  
    - Save this merged file.  At this point, the merged file should contain the names of the new registers only (if you diff the old gg and this new merged GG, all the string names should be the same, only the integer values for the registers should be different)
    - Load this onto the battery by "Data Settings" -> IMport from File -> (select the merged GG file), the "write all"
    - Turn the charge-fet ON, disable cal, enable the gauge
    At this point,  the pack should be functional, but the settings are as if it's a new pack.  The "old" pack aging parameters/count etc are gone forever.

    Now redo your DVT and make sure everything work.
  • Hello Pat,

    I will send this commentary to the battery gauge team, and will close this trend.

    Thank you,
    Alan