Close

Oops, a bug!

A project log for LiFePO4wered/Pi

LiFePO4 battery / UPS / power manager for Raspberry Pi

patrick-van-oosterwijckPatrick Van Oosterwijck 10/12/2016 at 20:490 Comments

@Doug Wyman discovered a bug in the LiFePO4wered/Pi firmware. :-/ Better sooner rather than later, so thanks for the help Doug!

The MPS430G2231 micro I'm using on the LiFePO4wered/Pi integrates the very low level USI peripheral to support I2C. This is not a stand-alone I2C hardware peripheral, but mostly just a glorified shift register that requires a lot of software support to behave correctly as an I2C device. Unfortunately I screwed something up in the supporting software, and wouldn't correctly release the SDA line on NACK or when the device address didn't match. The result was that the LiFePO4wered/Pi would trash the bus when the Raspberry Pi tried to talk to another I2C device.

If the LiFePO4wered/Pi is the only thing you connect to the Raspberry Pi I2C bus, this bug will not cause you any problem. It will only show up if your Raspberry Pi communicates with another I2C device in addition to the LiFePO4wered/Pi.

If you run into this problem, get in touch so we can figure out how to fix it for you. Any new LiFePO4wered/Pi's bought from now on will have this bug fixed!

Discussions