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.
- Set reg 0x3E (data class) to 82
- Set reg 0x3F (data block) to 0
- Set reg 0x61 (block data cntl) to 0
- Read 32 bytes of data from register 0x40 and onwards to buffer
- Read reg 0x60 (checksum = 0x54) just for verification
- Modify bit 5 to set BIE = 1. That means that buffer[5] = 0xA9
- Set reg 0x3E (data class) to 82
- Set reg 0x3F (data block) to 0
- Set reg 0x61 (block data cntl) to 0
- Write 32 bytes of data to register 0x40 and onwards from buffer
- 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