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.

Failing to write block data to NVM on BQ27425

I am having mostly great success with the BQ27425 on my board.  The things I can do successfully include:

- Read all of the RAM registers and get correct readings (e.g. battery voltage).  I can also read the sub-command areas of the CONTROL command.

- Configure the block data interface so that I can read the block data (e.g. the gas gauge data).

So everything works pretty well, except I cannot write data to the NVM.  Here's what I do:

- Write 0x00 to command 0x61 (enables block data access)

- Write 0x52 to register 0x3e (selects class 80, gas gauging)

- Write 0x00 to register 0x3f (selects data block 0)

- Read 32 bytes starting from register 0x40.  These bytes match the default values shown for the gas gauge data in the datasheet.

- Read the checksum at register 0x60.  This value matches the checksum I calculate from the bytes I read in the step above.

- I modify a single 8-bit value of the 32 8-bit values I previously read starting from register 0x40.

- I again write 0x00 to register 0x61, write 0x52 to register 0x3e, and 0x00 to register 0x3f again.

- I write all 32 bytes back starting at register 0x40.  This seems to work properly.

- I write the new checksum I have calculated to register 0x60.  This write succeeds, but the data does not get transferred to flash.

- I can change that final step (writing the checksum) so that it attempts to write an *invalid* checksum to 0x60.  If I do this, the transaction fails on an I2C error returned by the BQ27425.  This makes me pretty sure I have the correct checksum.

As a note:

- The VOK bit in the CONTROL_STATUS register is set.

- The SS bit in the CONTROL_STATUS register is clear.

Can you please let me know what the data may not be getting written to the NVM?

  • I posted this question over a week ago and it hasn't been answered.  Is anyone from TI answering questions?  If the answer is "TI doesn't support this board, you are on your own", could someone just post that so I'll know not to hope for a reply?

    Thanks, Steve

  • Steve,

    This problem has been seen in the past. Here is what you should try:

    The bq27425 requires you to be in Config Update Mode in order to update dataflash parameters. Make sure the CFGUPMODE is set in your FLAGS register. If it is not set, send command 13 from the control register. Once you are done updating dataflash, send a 41 RESET. Let me know if this  is not the issue.

    -David