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.

BQ40Z50-R3-DEVICE-FW: Upgrading firmware without bqStudio

Part Number: BQ40Z50-R3-DEVICE-FW

I was wondering if anyone could provide some documentation on how to program the firmware for the BQ40z50 using the SREC file without using bqStudio.  There are other posts asking this question, but the answer usually only discusses programming the data flash portion of the chip and not the firmware.  Would TI be willing to share the procedure for programming the full srec file to a BQ40z50?

  • Hi Jason,

    Refer to "Accessing the Gauge From a Host Controller"

    Best,

  • Nick,

    Thank you for the link, it helps clarify some things for me, but does not resolve my issue.  The explanation and code provided relies on the use of a golden file in the FlashStream file format (*.bq.fs).  It looks like this file contains both the data and the commands needed to program the firmware for a battery gauge.

    The problem is that I don't have access to a FlashStream file for the bq40z50-R3 or any bq40z50.  On page 2 of SLUA801 it states:

    "TI provides a software tool, bqStudio, which allows easy access to all parameters through a GUI. After creating and validating the configuration with bqStudio, the configuration can be exported in a FlashStream® file."

    So SLUA801 requires the creation of a FlashStream file.  Can you tell me how to do this with the bq40z50 and bqStudio 1.3.86?

    Thanks,

    Jason Rollins

  • Hi Jason,

    We have some more discussion on this here: 

    1033.6136.Flash Stream File Format.pdf

    Best,

  • Nick,

     offers a python program to load the SREC file in the linked discussion above.  Can you send me this code?

    Also in the linked discussion above:

    1. Stephanie was able to solve the issue with a bq.fs file.  I don't know where to get this file or how to generate it.  Your link to the Flash Stream File Format will be useful if I can get to that point.
    2.  links to SLUU225 (bq803xx ROM API v 3.0).  I'm taking that to mean that the ROM commands listed in Chapter 3 are the same for the bq40z50.  I've looked at a USB dump of the firmware programming from bqStudio and it does appear to be the same.

    So to resolve my issue I need Matt's python code or a procedure for generating bq.fs files for the bq40z50.

    Thanks,

    Jason

  • Hi Jason,

    The bq.fs can be read from the device when connected to bqstudio.

    Let me know of any more questions.

    Best,

  • Nick,

    I see now that I need BQSTUDIO-TEST version of bqStudio.  The BQSTUDIO-STABLE version does not have this option.  I was able to generate the Flash Stream File with version 1.3.97.2 of BQSTUDIO-TEST.  This resolves my issue.  I would still be interested in Matt's python code if that's available.

    So if you want to upgrade a bq40z50 firmware during production, you need to use BQSTUDIO-TEST to generate a golden image of the latest firmware.  This is a FlashStream file *.bq.fs.  You can then use the procedure called out in SLUA801 to program the firmware.  An explanation of the file format is provided in SLUA801 and the "1033.6136.Flash Stream File Format.pdf" linked above.  The ROM mode commands used in the programming process are described in Chapter 3 of SLUU225.

    Then you can configure the gauge using the procedure from SLUA743 to update the data flash and calibrate the gauge with the procedure from SLUA734A.

    Thanks,

    Jason Rollins