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.

BQSTUDIO: How do I write a .gm.fs file to the BQ27425-G2A with bqStudio?

Part Number: BQSTUDIO
Other Parts Discussed in Thread: BQ27425-G2A,

I created a golgen image as .gm.fs file of my BQ27425-G2A fuel gauge with bqStudio. Now I want to write it to another fuel gauge with bqStudio.

Unfortunately my bqStudio doesn't contains a "programming" or "firmware" tab like it's supposed to (according to other replies in this forum e.g. https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1107626/faq-bqstudio-i-created-a-gmfs-gm-fs-file-using-bqstudio-how-do-i-use-it/4104074?tisearch=e2e-sitesearch&keymatch=bqstudio%252520programming#4104074).

How can I write the golden image with bqStudio?

  • Hello Felix,

    Unfortunately the BQ27425 is a bit of a special case. You will need to make your own production tools to program this gauge. BQstudio does not support programming to this gauge. You will need to make a flashstream parser that can take a .gmfs as an input and generate the corresponding I2C commands to program the device. 

    This document should be helpful and includes some example code.

    This document may be a bit less helpful but is also a good reference. 

    Sorry about the inconvenience, feel free to reply if you have any more questions.

    Thanks,

    Alex M.

  • Hello Alex,

    thank you for your quick reply.

    Would be writing Ra-tables instead of the gmfs file to the fuel gauge possible? To me it seems like the gmfs file just contains the Ra-Tables and commands to set and exit the CFGUPDATE-mode.

    I already tried and copied Ra-tables from a learned fuel gauge to a new one using the "data-memory"-tab in bqStudio. I wrote the tables into the RAM and the fuel gauge seemed to copy the values into the NVM. Writing directly into the NVM was not possible and the data tables remain unchanged. Also with my own program writing Ra-talbes into the NVM resulted in an error. Unfortunately after succesfully writing the tables into the RAM fast learning is activated in the fuel gauge (QMAX_UP and RES_UP are cleared) and during normal use of my sensor without doing a full discharge the fuel gauge changes the Ra-Tables and Qmax to wrong values. What am I missing and why writing directly to the NVM is not possible?

    Thanks,

    Felix

  • The gm.fs file contains the Ra tables. Look for the line

    W: AA 3E 58 00. This is "write to device address 0xAA, starting at register (=command) 0x3E, data bytes = 0x58, 0x00 (auto increment register/command)".

    58 00 means subclass 0x58 (=Ra NVM), block 0x00

    The following W: AA 40 xx.. line contains the 32-bytes block data (=Ra values in 16-bit big endian pairs)

    This is concluded with W: AA 60 checksum. You need to wait about 500ms for the NVM to update. Then you can read back the check-sum with:

    W: AA 3E 58 00, followed by reading one byte from device address 0xAA, register/command 0x60

    This works as I have just tried this on a bq27425 EVM.