Hi,
I believe I have found an error in the document "Going to production with BQ275xx..." ( http://www.ti.com/lit/an/slua449f/slua449f.pdf
What I have learned trying to make the chip work, is that if you send data to the chip you are supposed to send it to the registers 0x64 and 0x65, then reading 0x66 to be able to confirm the action wanted. However in this document when trying to erase the IF rows the flowchart tells me to:
sendCommand(0x00,0x03);
sendCommand(0x01,0x00);
sendCommand(0x02,0x00);
sendCommand(0x00,0x00);
sendCommand(0x01,0x01);
Which would mean that the checksum to be written to 0x64 would be 0x04 yet the flowchart claims it should be 0x03, therefore it would seem that the two lines is an error? Furthermore I have found another of your chips equivelant document ( http://www.ti.com/lit/an/slua504a/slua504a.pdf ) the issue with the document is that the checksum isnt even being written to 0x64.
My question here is an error or is this how its supposed to be? If thats the case, where do i learn why this is the case?. Because I am getting an error when reading from 0x66 and trying to compare it with 0, and i cannot seem to be able to salvage the chip, as it will be stuck in an eternal ROM mode, even when I try to pull it out of rom mode by writing:
sendExtendedCommand(0x00,0x00,0x0f);
sendCommand(0x64,0x0F);
sendCommand(0x65,0x00);
Underneath is a snip of both the flowcharts in question. The first is from the BQ275xx and the second is BQ274xx both on page 9. I have also included a snip of the implementation of the send commands. The timer sleep is in msec. I found that the chip is more responsive if the delay was added.
int sendCommand(uint8_t reg, uint8_t command) { timer_sleep(5); uint8_t buffer[2] = { 0x00, 0x00 }; buffer[0] = reg; buffer[1] = command; return i2c_write(I2C2, ADDR, sizeof(buffer), buffer); } void sendExtendedCommand(uint8_t reg, uint8_t command_MSB, uint8_t command_LSB) { uint8_t buffer[3] = { 0x00, 0x00, 0x00 }; buffer[0] = reg; buffer[1] = command_LSB; buffer[2] = command_MSB; i2c_write(I2C2, ADDR, 3, buffer); }