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.

BQ27520YZFT-G2 - Programming via I2C and loading .dfi file

Hello everyone,

I'm having some issues loading a .dfi file via I2C

I want to put code into my firmware that will communicate through the I2C to the fuel gauge and program the contents of the .dfi file.

One of the problems I am having is the .dfi file does not map directly to the data flash summary; sections of the .dfi file do not seem to appear in any of the data flash locations listed in tables 4 - 7 of the datasheet.

Another problem I'm having is the error-checking algorithm is unclear if it is per subclass section, or per the entirety of the data flash.

I'm also confused, are there other parts of the data flash that need to be updated, or the sections described in the data sheet tables 4 - 7 that need to be modified for proper calibration?

Any help is much appreciated

  • The golden .dfi file cannot be programmed while the gauge is still running FW.  The dataflash parameters shown in the datasheet are indirectly accessed using the BlockData transfer method and are not directly mapped to the binary data flash image (.dfi), nor is the list in the datasheet complete in showing all dataflash locations since there are many static and private parameters which the customer doesn't need to modify them.  However, the entire image does need to be programmed and there are two ways to achieve it.

    The first is to program the .dfi file by following the flowcharts in this app note: Going to Production with the bq275xx http://www.ti.com/litv/pdf/slua449e

    Instead of actually implementing those flowcharts, another option is to use the Flashstream method described in this app note: Updating bq275xx Firmware at Production http://www.ti.com/litv/pdf/slua541a

    The Flashstream .dffs file is simply a I2C script file that the host can parse to implement the programming flow with the data included in the dfi file.  The sequence to enter ROM mode can be embedded in the dffs file or hardcoded.  For a copy of the Flashstream utility, send me a friend request.  It's not posted on ti.com.