Part Number:Bq27220
Hello,
I am programming the bq27220 with I2C commands, I followed the example of the technical reference manual to modify the Design Capacity (doc. SLUUBD4 page 65) and I can't get it working. The gauge is unsealed and in full access, I checked the OperationStatus flags. I can read the default value of Design Capacity 3000 but when I try to write the new value with the new checksum (with the formula given by the step 11 of the example) and data length, the value is not updated.
How the ckecksum is calculated ? The checksum (255 - x) where x is the 8-bit summation of the BLockData (0x40 to 0x5F) does not correspond with the checksum read at 0x60 register. The register 0x61 MadDataLen returns 36, but the blockData is 32 bytes. What are these 4 bytes used for the checksum ?
Here is the blockData (0x40 to 0x5F) : 0b b8 03 84 0e 74 00 64 0e 9f 00 95 03 63 0f be 01 3c 09 00 00 0b d7 01 0d 39 01 0d ad 01 10 4d
I get checksum = 0xD2 and the checksum read at register 0x60 is 0xB5. I don't understand how this checksum is calculated.
I don't have the bq27220 EVM to read and write the registers.
Thank you for your help,
Best Regards,
Jonathan