Other Parts Discussed in Thread: BQSTUDIO, GPCCHEM, BQ24295, BQ27426
Tool/software:
I am trying to get the bq27741-G1 gauge working with a Honcell Li-ion Polymer 5200mAh battery. I have ported the bq27x00 linux driver to the 335x 3.2 kernel and can read the gauge from Android just fine. However, the gauge is not tracking the battery capacity correctly, and is behaving strangely.
We setup a charge-discharge cycle and tracked the gauges values during it. Strangely during the charge cycle, the gauge thinks it hits full 5200mAh super early, and after that point, the charge_now stops increasing and the charge_full parameter starts increasing. I'm not sure why the gauge would decide to increase the charge_full and not also the charge_now... Not to mention that its not a 10,000 mAh battery.
Also odd, during discharge the charge percentage dropped from 30% to 0%, even though the reported charge_now still had plenty of mAh left.
https://docs.google.com/spreadsheets/d/1huvOK4QCPwcxbDyibm2bQVjTazWd1aJs2AXCHgr5Gr8/edit?usp=sharing
The kernel driver on probe, checks if the gauges design capacity is set to the default 1000mAh and if it is, programs the gauge with the following values. Let me know if you see any obvious mistakes or if I've missed a register I really need to set.
#define CHEM_ID_VALUE 100 // - default #define DESIGN_CAP 5200 static struct dm_reg bq277xx_dm_regs[] = { {48, 06, 2, 3700}, /* Design Voltage */ {48, 19, 2, 4860}, /* CC Threshold = 0.9 * Design Cap */ {48, 23, 2, DESIGN_CAP},/* Design Capacity */ {48, 25, 2, 19240}, /* Design Energy = Design Cap * 3.6V */ {48, 44, 1, 1}, /* Design Energy Scale */ {49, 0, 2, 520}, /* SOC1 Set Threshold */ {49, 2, 2, 780}, /* SOC1 Clear Threshold*/ {49, 4, 2, 104}, /* SOC2 Set Threshold */ {49, 6, 2, 260}, /* SOC2 Clear Threshold */ {64, 0, 2, 0x0171}, /* Pack Configuration */ {64, 2, 1, 0xa7}, /* Pack Configuration B */ {64, 3, 1, 0x98}, /* Pack Configuration C */ {68, 2, 2, 15}, /* Power Sleep Current */ {80, 0, 1, 0x01}, /* Load Select - Default. Present average discharge current: This is the average discharge current from the beginning of this discharge cycle until present time. */ {80, 1, 1, 0x01}, /* Load Mode - Default Constanst Power - */ {80, 67, 2, 3200}, /* Terminate Voltage */ {82, 0, 2, DESIGN_CAP}, /* Qmax */ {83, 0, 2, CHEM_ID_VALUE}, /* Chem ID */ };