background image

                                                                                                                                         

    LTE  Module  Series 

                                                                                                              SC20  Charging  User  Guide

 

 

SC20_Charging_User_Guide                                        Confidential / Released                                  9 / 14 

 
 

 

static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = { 

 

{XXX, 

YYY},                    //The former is the temperature value, and the latter is the voltage 

 

The table is customized, it needs hardware engineers to get values from battery vendors and fill in.   

 

 

High Temperature Shutdown 

 

High  temperature  protection  has  been  enabled  on  SC20,  when  the  battery  temperature  is  above  68 

degrees, it will automatically shut down. 

 

High temperature shutdown related files and codes are presented as follows: 

 

1.  android/frameworks/base/services/core/java/com/android/server/BatteryService.java:  for  executing 

shutdown action. 

private void shutdownIfOverTempLocked() { 

                //Shut down gracefully if temperature is too high (>68°C by default) 

                //Wait until the system has booted before attempting to display the shutdown dialog. 

                if (mBatteryProps.batteryTemperature > mShutdownBatteryTemperature) { 

                        mHandler.post(new Runnable() { 

                                @Override 

                                public void run() { 

                                        if (ActivityManagerNative.isSystemReady()) { 

                                                Slog.e(TAG, "silent_reboot shutdownIfOverTempLocked"); 

                                                Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN); 

                                                intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false); 

                                                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 

                                                mContext.startActivityAsUser(intent, UserHandle.CURRENT); 

                                        } 

                                } 

                        }); 

                } 

 

2.  android/frameworks/base/core/res/res/values/config.xml: set the temperature that triggers shutdown. 

      <!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. --> 

<integer name="config_shutdownBatteryTemperature">680</integer> 

 

If module shuts down immediately after being turned on, customer should first make sure that the battery 

has power, then check whether it is caused by high temperature or not. 

 

 

Quectel 

Confidential

Summary of Contents for LTE Module Series

Page 1: ...SC20 Charging User Guide LTE Module Series Rev SC20_Charging_User_Guide_V1 0 Date 2016 09 26 www quectel com...

Page 2: ...RMATION PROVIDED IS BASED UPON CUSTOMERS REQUIREMENTS QUECTEL MAKES EVERY EFFORT TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE QUECTEL DOES NOT MAKE ANY WARRANTY AS TO THE INFORMATION CO...

Page 3: ...odule Series SC20 Charging User Guide SC20_Charging_User_Guide Confidential Released 2 14 About the Document History Revision Date Author Description 1 0 2016 09 26 Luffy ZHANG Initial Quectel Confide...

Page 4: ...Document 2 Contents 3 Table Index 4 1 Introduction 5 2 Debug 6 2 1 Related Code Files and Location 6 2 2 Debug 6 3 Compile and Download 11 4 Charge 12 4 1 Charging Process 12 4 2 Set Power on off Vol...

Page 5: ...ries SC20 Charging User Guide SC20_Charging_User_Guide Confidential Released 4 14 Table Index TABLE 1 RELATED CODE FILES AND LOCATIONS 6 TABLE 2 BATTERY TEMPERATURE MONITORING CALCULATIONS 10 Quectel...

Page 6: ...uide SC20_Charging_User_Guide Confidential Released 5 14 1 Introduction This document mainly describes debug codes for charging on Quectel SC20 module which will help customer to better understand the...

Page 7: ...xxx rc power_supply_register chip dev chip batt_psy Device registration xxx Code Files and Locations Description android kernel drivers power qpnp linear charger c Driver file for charging android ke...

Page 8: ...E_LICENSE GPL v2 DTS Parse DTS Device Tree Source is parsed by probe function static int qpnp_charger_read_dt_props struct qpnp_lbc_chip chip xxx xxx Charging Controlling e g when the battery temperat...

Page 9: ...eshold battery warming threshold charging current etc as shown below pm8909_chg qcom charger xxx qcom batt hot percentage 35 High temperature percentage qcom batt cold percentage 70 Low temperature pe...

Page 10: ...ture is too high 68 C by default Wait until the system has booted before attempting to display the shutdown dialog if mBatteryProps batteryTemperature mShutdownBatteryTemperature mHandler post new Run...

Page 11: ...are side customer only needs to choose the percentage from BTM comparator of PM8909 which are listed as below and calculate the thresholds by the following formula Table 2 Battery temperature Monitori...

Page 12: ...wnload After debugging customer needs to compile kernel and download kernel images 1 Compile Kernel make jn bootimage n means the thread numbers of CPU 2 Download Kernel Images by Fastboot adb reboot...

Page 13: ...n the second phase and the current is 450mA In trickle charging it is the hardware that controls the charging behavior 2 Constant Current Charging The software system has been booted up in this stage...

Page 14: ...ates the power on voltage is 3 5V Customer can edit the value to change the voltage Set power off voltage setting in android kernel arch arm boot dts qcom batterydata palladium dtsi In the palladium b...

Page 15: ...CHG_TCHG_MAX_EN_BIT CHG_TCHG_MAX_EN_BIT if rc pr_err Failed to write tchg_max_en rc d n rc return rc return rc 4 4 Abnormality When the battery temperature crosses high temperature threshold or low te...

Reviews: