wiki/ news/ 2012-05-08 - Avionics update, more battery hacking

Avionics Updates

Battery Hacking

Jamey and Andrew wrote to the flash of the BQ3060. Successful? Hard to say. We certainly wrote to the flash, but since i2cget doesn't have a multibyte read command (eeeeyururrgh) we can't read the everything we wrote. Here's our attempt to write to flash. We calculated the following bytes to write:

And then we ran these commands

i2cset -y 0 0x0b 0x77 64 w
i2cget -y 0 0x0b 0x78 w // confirm it's 0x0228
i2cset -y 0 0x0b 0x78 0x03 0x28 0x04 0x41 0x00 0x04 0x00 0x00 0x00 0x00 s
i2cget -y 0 0x0b 0x78 w // now should be 0x0328

We get 0x020a from the first i2cget. OK, so the chip isn't set to the exact defaults. That's OK. After running the flash writes, we then get 0x030a. OK, that's weird, we wrote the first byte but not the second? Can't really explain that.

Other things:

Andrew notes: If BCAST is set, then "ChargingVoltage and ChargingCurrent broadcasts are sent to the Smart-Charger device address (0x12) every 10 to 60 seconds." That makes sense, because the BQ24725 data sheet says the chip should be at 0x12. But... but... our charger chip is at address 0x09. And for that matter, why does the BQ3060 manual say it should be at 0x16 when it's really at 0x0B? Something weird is going on here.