I am currently trying to build a single cell LIPO battery charger with your chip (BQ21040), however when I try to charge a 400mah 3.7V LIPO battery with it,The chip seems to discharge the battery not charge it. I have the Riset set to 270ma using Kiset @ 540Aohm and Riset's resistor is 2Kohm. I have attached a schematic of the battery charging section where Vin is the output to the battery, USB_in/5V is power from a USB and BATT_GND is the common ground between the battery and USB. I would appreciate any help you can give me in regards to trying to resolve my issue.