MTK Android Driver :Battery电池曲线

MTK Android Driver :battery电池曲线

1.配置文件位置:

CUSTOM_KERNEL_BATTERY= battery

mediatek\custom\\kernel\battery\battery\cust_battery.h

mediatek\custom\\kernel\battery\battery\custom_fuel_gauge.h

 

2.充电常用参数修改:

..\mediatek\custom\\kernel\battery\battery\cust_battery.h

充电电流修改:

#defineUSB_CHARGER_CURRENT                                         Cust_CC_550MA   //  :Cust_CC_450MA

#define AC_CHARGER_CURRENT                                           Cust_CC_800MA   // : Cust_CC_650MA

充电电阻设定(根据硬件的bom):

#defineR_CURRENT_SENSE 2                              //0.2 Ohm// 0.2欧姆

充电温度检测设定

#defineBAT_TEMP_PROTECT_ENABLE    1       //

// #defineBAT_NTC_TSM_1

NTC修改为10K电阻或者47K电阻(NTC 为电池温度保护NegativeTemperature Coefficient)

#define BAT_NTC_101    //#define BAT_NTC_47 0

 

其他:

#defineV_CHARGER_MIN 4400                                      //modify      //4400 // 4.4 V

#defineV_CHARGER_ENABLE 1                                    //1:ON , 0:OFF      //

 

3.充电界面显示修改:

\mediatek\custom\\lk\include\target\cust_display.h//坐标

\mediatek\platform\mt6577\lk\mt_logo.c//显示

 

4.电池容量、电池曲线修改:

电池容量修改:

mediatek\custom\\kernel\battery\battery\custom_fuel_gauge.h

#define Q_MAX_POS_50 ((2168* 1316) / 1307)

#define Q_MAX_POS_25   2168

#define Q_MAX_POS_0 ((2168 * 1220) / 1307)

#define Q_MAX_NEG_10  ((2168 * 1162) / 1307)


#define Q_MAX_POS_50_H_CURRENT ((2168 * 1295) / 1307)

#define Q_MAX_POS_25_H_CURRENT ((2168 * 1270) / 1307)
#define Q_MAX_POS_0_H_CURRENT ((2168 * 1102) / 1307)
#define Q_MAX_NEG_10_H_CURRENT ((2168 * 599) / 1307)

 

电池曲线集成方式:(电压-百分比对应表需要电池厂商提供)

mediatek\custom\\kernel\battery\battery\cust_fuel_gauge.h

BATTERY_PROFILE_STRUCbattery_profile_t1[] =// T1 0C

BATTERY_PROFILE_STRUCbattery_profile_t2[] =// T2 25C

posted on 2015-10-12 09:58  相伴流年  阅读(4201)  评论(0编辑  收藏  举报

导航