I am working with the BQ27220, and have tried to follow the example mentioned in SLUUBD4.pdf from April 2016. However, it seems that the device is not reacting as assumed, as the design Capacity stays at the factory default of 3000mAh. Below is a scheme for the data:
Time [s],Packet ID,Address,Data,Read/Write,ACK/NAK
0.000057800000000,0,0xAA,0x00,Write,ACK
0.000189000000000,0,0xAA,0x14,Write,ACK
0.000366000000000,0,0xAA,0x04,Write,ACK
0.005648200000000,1,0xAA,0x00,Write,ACK
0.005779400000000,1,0xAA,0x72,Write,ACK
0.005956400000000,1,0xAA,0x36,Write,ACK
0.020046800000000,2,0xAA,0x00,Write,ACK
0.020178400000000,2,0xAA,0xFF,Write,ACK
0.020356400000000,2,0xAA,0xFF,Write,ACK
0.025643200000000,3,0xAA,0x00,Write,ACK
0.025774200000000,3,0xAA,0xFF,Write,ACK
0.025951200000000,3,0xAA,0xFF,Write,ACK
0.040070400000000,4,0xAA,0x00,Write,ACK
0.040201400000000,4,0xAA,0x90,Write,ACK
0.040378400000000,4,0xAA,0x00,Write,ACK
0.140030800000000,5,0xAA,0x3B,Write,ACK
0.140614200000000,6,0xAB,0x04,Read,NAK
0.150029200000000,7,0xAA,0x3E,Write,ACK
0.150160200000000,7,0xAA,0x9F,Write,ACK
0.160053800000000,8,0xAA,0x3F,Write,ACK
0.160184800000000,8,0xAA,0x92,Write,ACK
0.170027400000000,9,0xAA,0x60,Write,ACK
0.170819400000000,10,0xAB,0xA1,Read,NAK
0.180028000000000,11,0xAA,0x61,Write,ACK
0.180655200000000,12,0xAB,0x24,Read,NAK
0.190045400000000,13,0xAA,0x40,Write,ACK
0.190935400000000,14,0xAB,0x0F,Read,NAK <- Design cap MSB
0.190997000000000,15,0xAA,0x41,Write,ACK
0.191787200000000,16,0xAB,0xCB,Read,NAK <- Design cap LSB
0.200025600000000,17,0xAA,0x40,Write,ACK
0.200156600000000,17,0xAA,0x04,Write,ACK
0.200369400000000,18,0xAA,0x41,Write,ACK
0.200555400000000,18,0xAA,0xB0,Write,ACK
0.220095000000000,19,0xAA,0x60,Write,ACK
0.220226000000000,19,0xAA,0xC7,Write,ACK <- Checksum new
0.230078400000000,20,0xAA,0x61,Write,ACK
0.230209600000000,20,0xAA,0x24,Write,ACK <- Kept length
0.240045400000000,21,0xAA,0x00,Write,ACK
0.240176600000000,21,0xAA,0x91,Write,ACK
0.240353600000000,21,0xAA,0x00,Write,ACK
0.340043400000000,22,0xAA,0x3B,Write,ACK
0.340626800000000,23,0xAB,0x00,Read,NAK
0.350020200000000,24,0xAA,0x00,Write,ACK
0.350151600000000,24,0xAA,0x30,Write,ACK
0.350329600000000,24,0xAA,0x00,Write,ACK
Checksum calculated as:
Temp = (0xFF - Old_ChkSum - Old_DC_MSB - Old_DC_LSB) & 0xFF; = (0xFF - 0xA1 - 0x0F - 0xCB) & 0xFF = 0x84
New_ChkSum = 0xFF - ((Temp + 0x04 + 0xB0) & 0xFF); = 0xFF - 0x38 = 0xC7
Despite the read of 0x0FCB (4043), the value in the the register (0x3C & 0x3D) is still 0x0BB8?
Any ideas on how to change code so that it can change the Design Capacity?