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.

BQ27441-G1: How to set capacity of the battery via I2C command from Raspberry pi 3

Part Number: BQ27441-G1
Other Parts Discussed in Thread: BQSTUDIO

We have designed a custom board which is interface with raspberry pi 3 via I2C-0 .

i am able to see the device through i2cdetect command. 

i am also able to read temperature, voltage , and current readings from the device.

but when i try to set the capacity the device is not switching into unseal mode. 

i am writing the registers  as mentioned in bq27441-G1 Technical Reference

 the first 2 bytes of the UNSEAL key using the Control(0x8000) command. Without writing any other bytes to the device, i am writing the second (identical) 2 bytes of the UNSEAL key

 SET_CFGUPDATE subcommand, Control(0x0013) is written next after writing the unseal command .

i am able to confirm CFGUPDATE mode by polling Flags() register until bit 4 is set.

the issue is when i try to write BlockDataControl() command (0x61) to enable block data memory control.

i get i2c error,{  ioctl(self.fd, I2C_SMBUS, msg)OSError: [Errno 121] Remote I/O error}


i believe the device is not switching to unseal mode, because in data sheet it says the register is only accessible in unsealed mode .
can you please help in setting the capacity of the battery .

  • Kannan,

    I recommend using the TI tool chain (bqStudio) to practice getting familiar with the unseal command sequence. In addtion, are you able to read the [SS] bit with your host to verify the device is unsealed prior to attempting the CFGUpdate command sequence? 

    Thanks,

    Eric Vos