Other Parts Discussed in Thread: BQSTUDIO
Hi,
I am attempting to disable "Battery Insertion Enable" on a BQ27426 chip.
I have followed the technical reference guide (SLUUBB0 - December 2015) in writing to the extended data flash registers. I am interfacing with the chip directly over I2C from an MCU and not through the BQStudio software. My method is as follows:
- Unseal the device
- Poll the sealed bit in the status register to check it has been cleared
- Enter configuration update mode
- Poll the CFGMODE bit in the flags register to check it has been set.
- Enable Block Memory Control
- (Write 0x00 to the BlockDataControl() Command Register
- Set the subclass ID offset to 64 to accessthe (class) configuration (subclass) registers storing OpConfig OpConfigB OpConfigC OpConfigD
- Write 0x40 to the DataBlockClass() Register
- Read the register into a 32 byte long array
- NOTE: at this stage i do not read the reset default value of the first byte correctly. The reference guide states OPConfig's default value is 0x6578 where as i read 0x0078. I also read the default values of OpConfig B C and D to be the same as those referenced in the reference manual.
- Write a new value into the first two bytes of the read array to alter the bits of OpConfigCalculate the new checksum (same process as described in the application example
- NOTE: I have not successfully been able to write the high byte and read back the same value written. I have been able to write the low byte and read back the value written. I only want to clear the BIE bit in the High Byte of OpConfig. Based on the default values in the reference manual i calculate that i would need to write back 0x44 to the High Byte.
- Write the new Checksum to BlockDataChecksum() Register - NOTE: this is successful and i do not recieve a NACT return
- Exit CFG update by sending a soft reset command.
Following the same procedure i am able to access the bytes in the STATE subclass and rewrite them. I can not do the same for the OpConfig registers. I also can not reset the device and read back the reference manual value for the OpConfig High byte but I can for all the other bytes in teh register subclass.
I have experimented with adding timing delays between commands but with no successful results.
Am I missing something prerequisite to writing to the OpConfig registers? I can not find many examples or references in the documentation for configuring the OpConfig registers for this chip.
Thanks,