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.

Cannot write to extended registers in bq27425

Hi,

I have a problem writing data to the extended registers. The data is not stored in RAM/NVS.

What I want to do is to change BIE (bit 5) in the Operation Configuration Register. My code looks like this using the I2C bus to set the registers in the bq27425.

  1. Set reg 0x3E (data class) to 82
  2. Set reg 0x3F (data block) to 0
  3. Set reg 0x61 (block data cntl) to 0
  4. Read 32 bytes of data from register 0x40 and onwards to buffer
  5. Read reg 0x60 (checksum = 0x54) just for verification
  6. Modify bit 5 to set BIE = 1. That means that buffer[5] = 0xA9
  7. Set reg 0x3E (data class) to 82
  8. Set reg 0x3F (data block) to 0
  9. Set reg 0x61 (block data cntl) to 0
  10. Write 32 bytes of data to register 0x40 and onwards from buffer
  11. Calculate new checksum (0x34) and write it to reg 0x60

If I then read out the buffer the new value is not stored. What am I doing wrong?

Any help appreciated.

Best Regards,

Ulrich