CN117175752B - Charging abnormality handling methods, equipment, systems, storage media and program products - Google Patents
Charging abnormality handling methods, equipment, systems, storage media and program products Download PDFInfo
- Publication number
- CN117175752B CN117175752B CN202311444585.1A CN202311444585A CN117175752B CN 117175752 B CN117175752 B CN 117175752B CN 202311444585 A CN202311444585 A CN 202311444585A CN 117175752 B CN117175752 B CN 117175752B
- Authority
- CN
- China
- Prior art keywords
- charging
- parameter
- adapter
- current
- embedded controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007600 charging Methods 0.000 title claims abstract description 505
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000005856 abnormality Effects 0.000 title claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 7
- 230000007423 decrease Effects 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 5
- 125000004122 cyclic group Chemical group 0.000 claims 1
- 238000003672 processing method Methods 0.000 abstract description 10
- 230000008439 repair process Effects 0.000 abstract description 6
- 238000007726 management method Methods 0.000 description 112
- 230000006870 function Effects 0.000 description 11
- 230000009286 beneficial effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000011084 recovery Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 238000005070 sampling Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000011664 signaling Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010280 constant potential charging Methods 0.000 description 1
- 238000010277 constant-current charging Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Abstract
Description
技术领域Technical field
本申请实施例涉及充电技术领域,尤其涉及一种充电异常处理方法、设备、系统、存储介质及程序产品。The embodiments of the present application relate to the field of charging technology, and in particular, to a charging abnormality processing method, device, system, storage medium and program product.
背景技术Background technique
在个人计算机(Personal Computer,PC)等电子设备通过适配器充电时,适配器输出能力不足,容易出现充电异常。例如,在电子设备处于大功耗场景,适配器的输出功率无法满足电子设备的功率需求时,容易出现适配器断充。而适配器断充容易导致电子设备出现如下情形:充不满电、性能模式退出以及所显示的充电图标来回切换,进而影响用户使用。When electronic devices such as personal computers (PCs) are charged through an adapter, the adapter's output capability is insufficient and charging abnormalities are prone to occur. For example, when the electronic device is in a high power consumption scenario and the output power of the adapter cannot meet the power demand of the electronic device, the adapter is prone to interruption of charging. The disconnection of charging of the adapter can easily lead to the following situations in electronic devices: undercharging, exiting performance mode, and switching back and forth of the displayed charging icon, thereby affecting user use.
发明内容Contents of the invention
本申请实施例提供一种充电异常处理方法、设备、系统、存储介质及程序产品,解决充电异常的问题,特别是在电子设备处于大功耗场景中适配器断充的问题。The embodiments of the present application provide a charging abnormality processing method, device, system, storage medium and program product to solve the problem of charging abnormality, especially the problem of adapter disconnection when the electronic device is in a high power consumption scenario.
第一方面,本申请实施例提供一种充电异常处理方法,应用于电子设备,电子设备连接适配器,电子设备包括嵌入式控制器、电源充电芯片以及充电管理芯片,嵌入式控制器连接电源充电芯片以及充电管理芯片,该方法包括:在适配器断充未恢复时,嵌入式控制器循环执行以下调整操作,直至适配器断充恢复或确定适配器故障:调整第一参数,并将调整后的第一参数传输至对应的芯片,以使得芯片根据调整后的第一参数运行;其中第一参数包括第一时间参数和第一电流参数中的一个或多个;第一时间参数用于指示触发电源充电芯片复位适配器的时间门限值,第一电流参数用于指示触发充电管理芯片限制适配器充电电流的电流门限值;在适配器断充恢复时,嵌入式控制器将调整后的第一参数写入对应芯片的固件。In a first aspect, an embodiment of the present application provides a charging exception handling method, which is applied to an electronic device, wherein the electronic device is connected to an adapter, and the electronic device includes an embedded controller, a power charging chip, and a charging management chip. The embedded controller is connected to the power charging chip and the charging management chip. The method includes: when the adapter is disconnected and not restored, the embedded controller cyclically performs the following adjustment operations until the adapter is restored or the adapter is determined to be faulty: adjusting a first parameter, and transmitting the adjusted first parameter to a corresponding chip so that the chip operates according to the adjusted first parameter; wherein the first parameter includes one or more of a first time parameter and a first current parameter; the first time parameter is used to indicate a time threshold value that triggers the power charging chip to reset the adapter, and the first current parameter is used to indicate a current threshold value that triggers the charging management chip to limit the charging current of the adapter; when the adapter is disconnected and restored, the embedded controller writes the adjusted first parameter into the firmware of the corresponding chip.
本申请实施例在电子设备通过适配器充电时,电子设备可以自动检测适配器断充故障,并在适配器断充时通过灵活调整第一时间参数、第一电流参数以及第二时间参数对应的数值,为当下情形配置最合适的参数数值,以修复适配器断充,同时还可以保证电子设备的正常运行,提升用户使用体验。In the embodiment of the present application, when the electronic device is charged through the adapter, the electronic device can automatically detect the adapter charging failure, and flexibly adjust the values corresponding to the first time parameter, the first current parameter and the second time parameter when the adapter is disconnected, as Configure the most appropriate parameter values for the current situation to repair the adapter's disconnection and charging, while also ensuring the normal operation of the electronic device and improving the user experience.
在一种可能实现方式中,其中,调整操作包括第一操作和/或第二操作,第一操作包括:根据第一预设规则增加第一时间参数,并将增加后的第一时间参数传输至电源充电芯片,以使得电源充电芯片根据增加后的第一时间参数运行;第二操作包括:根据第二预设规则减小第一电流参数,并将减小后的第一电流参数传输至充电管理芯片,以使得充电管理芯片根据减小后的第一电流参数运行;则嵌入式控制器循环执行以下调整操作包括:嵌入式控制器循环执行第一操作和/或第二操作。In a possible implementation, the adjustment operation includes a first operation and/or a second operation, and the first operation includes: increasing a first time parameter according to a first preset rule, and transmitting the increased first time parameter to the power charging chip, so that the power charging chip operates according to the increased first time parameter; the second operation includes: reducing the first current parameter according to the second preset rule, and transmitting the reduced first current parameter to Charging the management chip, so that the charging management chip operates according to the reduced first current parameter; then the embedded controller cyclically performs the following adjustment operations including: the embedded controller cyclically performs the first operation and/or the second operation.
在一种可能实现方式中,嵌入式控制器循环执行第一操作和第二操作包括:嵌入式控制器执行第一操作;在适配器断充未恢复时,判断调整第一时间参数的次数是否达到第一阈值,第一阈值大于或等于1;若否,嵌入式控制器执行第一操作;若是,嵌入式控制器执行第二操作。In one possible implementation, the embedded controller cyclically executes the first operation and the second operation, including: the embedded controller executes the first operation; when the adapter is disconnected and has not been restored, determines whether the number of times the first time parameter is adjusted reaches a first threshold, and the first threshold is greater than or equal to 1; if not, the embedded controller executes the first operation; if so, the embedded controller executes the second operation.
在一种可能实现方式中,电子设备还包括处理器,充电管理芯片连接处理器;第一参数还包括第二时间参数,第二时间参数用于指示触发充电管理芯片输出降频信号至处理器的时间门限值;降频信号用于指示处理器降频;调整操作还包括第三操作,第三操作包括:根据第三预设规则增加第二时间参数,将增加后的第二时间参数传输至充电管理芯片,以使得充电管理芯片根据增加后的第二时间参数运行;则嵌入式控制器循环执行以下调整操作还包括:在执行第二操作之后且适配器断充未恢复时,判断调整第一电流参数的次数是否达到第二阈值,第二阈值大于或等于1;若否,嵌入式控制器执行第二操作;若是,嵌入式控制器执行第三操作。In a possible implementation, the electronic device further includes a processor, and the charging management chip is connected to the processor; the first parameter also includes a second time parameter, and the second time parameter is used to indicate triggering the charging management chip to output a down-frequency signal to the processor. time threshold; the frequency reduction signal is used to instruct the processor to reduce frequency; the adjustment operation also includes a third operation, and the third operation includes: adding a second time parameter according to the third preset rule, and adding the increased second time parameter is transmitted to the charging management chip, so that the charging management chip operates according to the increased second time parameter; then the embedded controller performs the following adjustment operations in a loop, which also includes: after performing the second operation and when the adapter is disconnected and charging has not been restored, judging the adjustment Whether the number of times of the first current parameter reaches the second threshold, the second threshold is greater than or equal to 1; if not, the embedded controller performs the second operation; if yes, the embedded controller performs the third operation.
在一种可能实现方式中,嵌入式控制器循环执行第一操作和第二操作包括:嵌入式控制器根据第一预设规则增加第一时间参数,并根据第二预设规则减小第一电流参数;将增加后的第一时间参数传输至电源充电芯片以及将减小后的第一电流参数传输至充电管理芯片,以使得电源充电芯片根据增加后的第一时间参数运行,且充电管理芯片根据减小后的第一电流参数运行。In one possible implementation, the embedded controller cyclically executes the first operation and the second operation including: the embedded controller increases the first time parameter according to a first preset rule, and reduces the first current parameter according to a second preset rule; transmits the increased first time parameter to the power charging chip and transmits the reduced first current parameter to the charging management chip, so that the power charging chip operates according to the increased first time parameter, and the charging management chip operates according to the reduced first current parameter.
在一种可能实现方式中,根据第一预设规则增加第一时间参数包括:获取第一调整值,其中第一调整值为当前差值的预设百分比,当前差值为将第一时间参数的规格范围内的最大值减去当前第一时间参数的数值所得到的差值;将当前第一时间参数的数值增加第一调整值,得到增加后的第一时间参数。In one possible implementation, increasing the first time parameter according to the first preset rule includes: obtaining a first adjustment value, where the first adjustment value is a preset percentage of the current difference, and the current difference is the first time parameter. The maximum value within the specification range minus the current first time parameter value; add the first adjustment value to the current first time parameter value to obtain the increased first time parameter.
在一种可能实现方式中,根据第二预设规则减小第一电流参数包括:获取第二调整值,其中第二调整值为当前差值的预设百分比,当前差值为将第一电流参数的规格范围内的最大值减去当前第一电流参数的数值所得到的差值;将当前第一电流参数的数值减去第二调整值,得到减小后的第一时间参数。In a possible implementation, reducing the first current parameter according to the second preset rule includes: obtaining a second adjustment value, where the second adjustment value is a preset percentage of the current difference, and the current difference is The difference obtained by subtracting the current value of the first current parameter from the maximum value within the specification range of the parameter; subtracting the second adjustment value from the current value of the first current parameter to obtain the reduced first time parameter.
在一种可能实现方式中,该方法还包括:在适配器断充未恢复,且调整后的第一电流参数和调整后的第一时间参数均超出对应的规格范围时,嵌入式控制器确定适配器故障,并上传故障信息。In a possible implementation, the method further includes: when the adapter has not recovered from disconnection and charging, and both the adjusted first current parameter and the adjusted first time parameter exceed the corresponding specification range, the embedded controller determines that the adapter fault and upload the fault information.
第二方面,本申请实施例提供一种电子设备,电子设备连接适配器,包括:嵌入式控制器、电源充电芯片以及充电管理芯片;嵌入式控制器连接电源充电芯片以及充电管理芯片,嵌入式控制器调用计算机程序,执行如上任一项方法。In the second aspect, embodiments of the present application provide an electronic device. The electronic device connection adapter includes: an embedded controller, a power charging chip and a charging management chip; the embedded controller is connected to the power charging chip and the charging management chip. The embedded control The processor calls a computer program to execute any of the above methods.
第三方面,本申请实施例提供一种充电系统,充电系统包括电子设备和适配器,电子设备为如上的电子设备;适配器连接电子设备,以为电子设备供电。In a third aspect, embodiments of the present application provide a charging system. The charging system includes an electronic device and an adapter. The electronic device is the above electronic device; the adapter connects to the electronic device to power the electronic device.
第四方面,本申请实施例提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如上任一项方法。In a fourth aspect, embodiments of the present application provide a computer storage medium that includes computer instructions. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to perform any of the above methods.
第五方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如上任一项方法。In a fifth aspect, embodiments of the present application provide a computer program product, which when the computer program product is run on a computer, causes the computer to perform any of the above methods.
上述第二方面、第三方面、第四方面和第五方面所获得的技术效果与第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects obtained by the above-mentioned second aspect, third aspect, fourth aspect and fifth aspect are similar to those obtained by the corresponding technical means in the first aspect, and will not be described again here.
附图说明Description of drawings
图1为本申请实施例提供的一种充电系统结构示意图。FIG1 is a schematic diagram of the structure of a charging system provided in an embodiment of the present application.
图2为本申请实施例提供的一种电子设备的结构示意图。FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图3为本申请实施例提供的一种参数示意图。FIG. 3 is a parameter diagram provided in an embodiment of the present application.
图4为本申请实施例提供的另一种电子设备结构示意图。FIG. 4 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
图5为本申请实施例提供的一种充电异常处理方法流程示意图。FIG5 is a schematic flow chart of a charging abnormality processing method provided in an embodiment of the present application.
图6为本申请实施例提供的另一种充电异常处理方法流程示意图。FIG6 is a flow chart of another method for handling abnormal charging provided in an embodiment of the present application.
图7为本申请实施例提供的另一种充电异常处理方法流程示意图。FIG. 7 is a flow chart of another method for handling abnormal charging provided in an embodiment of the present application.
图8为本申请实施例提供的另一种充电异常处理方法流程示意图。FIG. 8 is a schematic flowchart of another charging abnormality processing method provided by an embodiment of the present application.
具体实施方式Detailed ways
可理解的,本申请中所描述的连接关系指的是直接或间接连接。例如,A与B连接,既可以是A与B直接连接,也可以是A与B之间通过一个或多个其它电学元器件间接连接,例如可以是A与C直接连接,C与B直接连接,从而使得A与B之间通过C实现了连接。It can be understood that the connection relationship described in this application refers to direct or indirect connection. For example, A and B can be connected directly, or A and B can be connected indirectly through one or more other electrical components. For example, A and C can be directly connected, and C and B can be connected directly. , so that the connection between A and B is realized through C.
需要说明的是,本申请的说明书和权利要求书及附图中的术语“第一”、“第二”是用于区别类似的对象,而不是用于描述特定的顺序或先后次序。本申请的说明书和权利要求书及附图中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请的说明书和权利要求书及附图中术语“多个”是指两个或多于两个。It should be noted that the terms "first" and "second" in the description, claims and drawings of this application are used to distinguish similar objects, rather than describing a specific order or sequence. In the description, claims and drawings of this application, unless otherwise stated, "/" means or. For example, A/B can mean A or B. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the term “plurality” in the description, claims and drawings of this application means two or more than two.
另外需要说明的是,本申请实施例中公开的方法或流程图所示出的方法,包括用于实现方法的一个或多个步骤,在不脱离权利要求的范围的情况下,多个步骤的执行顺序可以彼此互换,其中某些步骤也可以被删除。In addition, it should be noted that the method disclosed in the embodiment of the present application or the method shown in the flow chart includes one or more steps for implementing the method. Without departing from the scope of the claims, multiple steps The order of execution can be interchanged with each other and some of the steps can also be deleted.
下面将结合附图对一些实施例做出说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments will be described below with reference to the accompanying drawings. The following embodiments and features in the embodiments may be combined with each other without conflict.
个人计算机等电子设备通常通过适配器进行充电。在电子设备处于大功耗场景,适配器的输出功率无法达到电子设备的功率需求,而电子设备的电池又无法及时供电(如基于充电管理芯片响应慢导致电池无法及时供电)时,容易出现充电异常,如容易导致适配器被拉挂,适配器断充。Electronic devices such as personal computers are often charged via adapters. When the electronic device is in a high power consumption scenario, the output power of the adapter cannot meet the power demand of the electronic device, and the battery of the electronic device cannot supply power in time (for example, due to the slow response of the charging management chip, the battery cannot supply power in time), charging abnormalities are prone to occur. , if it is easy to cause the adapter to be pulled and hung, the adapter will stop charging.
示例性地,在整机启动或处理游戏任务等大功耗场景下,处理器调用(或频繁调用)高处理能力,处理器的工作频率提高,相应地处理器的功耗增大,导致电子设备的功率需求增大。当适配器的输出功率无法满足电子设备的功率需求时,如适配器输出的充电电压低于预设电压阈值,电子设备输出复位信号至适配器。适配器根据复位信号复位,适配器停止向与其连接的电子设备充电,并在停止充电后,再次与该电子设备连接,以继续给电子设备充电。发明人在实施本申请实施例时发现,在整机启动或处理游戏任务等大功耗场景下,通常复位后的适配器的输出功率仍无法满足电子设备的功率需求,电子设备仍会输出复位信号,仍会出现适配器断充。当电子设备频繁输出复位信号至适配器时,会导致适配器频繁断充。显然,适配器频繁断充容易导致电子设备充不满电、性能模式频繁退出以及所显示的充电图标来回切换,进而影响用户使用。For example, in high power consumption scenarios such as starting up the whole machine or processing game tasks, the processor calls (or calls frequently) high processing capabilities, the working frequency of the processor increases, and the power consumption of the processor increases accordingly, resulting in electronic The power requirements of the device increase. When the output power of the adapter cannot meet the power demand of the electronic device, such as the charging voltage output by the adapter is lower than the preset voltage threshold, the electronic device outputs a reset signal to the adapter. The adapter resets according to the reset signal, stops charging the electronic device connected to it, and after stopping charging, connects to the electronic device again to continue charging the electronic device. When implementing the embodiments of the present application, the inventor found that in high power consumption scenarios such as starting up the entire machine or processing game tasks, the output power of the adapter after reset is usually still unable to meet the power requirements of the electronic device, and the electronic device will still output a reset signal. , the adapter will still be disconnected from charging. When the electronic device frequently outputs reset signals to the adapter, it will cause the adapter to frequently disconnect from charging. Obviously, frequent interruption of charging by the adapter can easily lead to undercharging of electronic devices, frequent exit of performance mode, and switching of the displayed charging icon back and forth, thus affecting user use.
鉴于此,本申请实施例提供一种充电异常处理方法、电子设备、充电系统、存储介质及程序产品,在电子设备通过适配器充电时,电子设备可以自动检测适配器断充故障,并在适配器断充时调整相关参数,以解决充电异常的问题,特别是在电子设备处于大功耗场景下适配器断充的问题。In view of this, embodiments of the present application provide a charging abnormality handling method, electronic device, charging system, storage medium and program product. When the electronic device is charged through the adapter, the electronic device can automatically detect the adapter charging failure, and when the adapter is charged, the electronic device can automatically detect the adapter charging failure. Adjust relevant parameters from time to time to solve the problem of abnormal charging, especially the problem of adapter disconnection when the electronic device is in a high power consumption scenario.
请参阅图1,示例性介绍本申请实施例提供的充电系统10。充电系统10包括电子设备100和适配器200。电子设备100连接适配器200,以通过适配器200进行充电。Please refer to Figure 1 for an exemplary introduction to the charging system 10 provided by the embodiment of the present application. Charging system 10 includes electronic device 100 and adapter 200 . The electronic device 100 is connected to the adapter 200 to be charged through the adapter 200 .
在本申请实施例中,电子设备100包括外部接口101。外部接口101用于连接适配器200,外部接口101包括但不限于:型通用串行总线(universal serial bus,USB)接口。In this embodiment of the present application, the electronic device 100 includes an external interface 101 . The external interface 101 is used to connect the adapter 200. The external interface 101 includes but is not limited to: Universal serial bus (USB) interface.
在本申请实施例中,电子设备100可以是个人计算机,例如,台式机、笔记本电脑、小型笔记本电脑、平板电脑以及超级本等。电子设备100还可以是手机、蜂窝电话、个人数字助理(personal digital assistant,PDA)、可穿戴式设备(如:智能手表、智能手环)、游戏机等可充电的设备。本申请实施例对于电子设备100的具体设备形态不作特殊限制。In the embodiment of the present application, the electronic device 100 may be a personal computer, such as a desktop computer, a notebook computer, a small notebook computer, a tablet computer, an ultrabook, etc. The electronic device 100 may also be a rechargeable device such as a mobile phone, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet), a game console, or the like. The embodiment of the present application does not place any special restrictions on the specific device form of the electronic device 100 .
在本申请实施例中,适配器200可以为恒压恒流电源设备,可以用于为电子设备100持续供电。例如,适配器200通过电子设备100的型接口连接至电子设备100,以为电子设备100进行快速充电,因此适配器200也可以称为/>电源适配器。在一些情形下,适配器200也可以被称为充电器。In this embodiment of the present application, the adapter 200 may be a constant voltage and constant current power supply device, and may be used to continuously supply power to the electronic device 100 . For example, the adapter 200 passes the electronic device 100 The adapter 200 is connected to the electronic device 100 to quickly charge the electronic device 100, so the adapter 200 can also be called/> Power Adapter. In some cases, adapter 200 may also be called a charger.
如图1所示,以电子设备100为个人计算机为例。当适配器200接入供电电源(如市电),并且与个人计算机的外部接口101相连时,个人计算机可以与适配器200进行协议握手,从而适配器200可以通过外部接口101获得个人计算机上报的充电协议,并根据充电协议输出特定充电电压和特定充电电流的电能给个人计算机,以为个人计算机供电。As shown in FIG. 1 , the electronic device 100 is a personal computer as an example. When the adapter 200 is connected to the power supply (such as mains power) and connected to the external interface 101 of the personal computer, the personal computer can perform a protocol handshake with the adapter 200, so that the adapter 200 can obtain the charging protocol reported by the personal computer through the external interface 101. And according to the charging protocol, the electric energy with a specific charging voltage and a specific charging current is output to the personal computer to power the personal computer.
可以理解,图1所示的电子设备100以及适配器200仅是示例,本申请实施例对电子设备100以及适配器200的类型不作具体限定。It can be understood that the electronic device 100 and the adapter 200 shown in FIG. 1 are only examples, and the embodiments of the present application do not specifically limit the types of the electronic device 100 and the adapter 200 .
本申请实施例提供的充电系统10所能达到的有益效果可参考下文本申请实施例所提供的充电异常处理方法的有益效果,此处不再赘述。The beneficial effects that can be achieved by the charging system 10 provided by the embodiments of the present application can be referred to the beneficial effects of the charging abnormality handling method provided by the embodiments of the present application below, which will not be described again here.
请参阅图2,示例性介绍本申请实施例提供的电子设备100的结构。Referring to FIG. 2 , the structure of the electronic device 100 provided by the embodiment of the present application is exemplarily introduced.
电子设备100包括外部接口101、电源充电芯片(power delivery,PD)102、充电管理芯片(Charger Intergrated Circuit,Charger IC) 103、嵌入式控制器(EmbeddedController,EC)104、电池105、处理器106以及基本输入输出系统(Basic Input OutputSystem,BIOS)107。The electronic device 100 includes an external interface 101, a power charging chip (power delivery, PD) 102, a charging management chip (Charger Integrated Circuit, Charger IC) 103, an embedded controller (EmbeddedController, EC) 104, a battery 105, a processor 106, and Basic Input Output System (BIOS) 107.
在本申请实施例中,嵌入式控制器104连接电源充电芯片102、充电管理芯片103以及基本输入输出系统107。充电管理芯片103连接外部接口101、电池105以及处理器106。电源充电芯片102连接外部接口101和基本输入输出系统107。In the embodiment of the present application, the embedded controller 104 is connected to the power charging chip 102, the charging management chip 103 and the basic input and output system 107. The charging management chip 103 is connected to the external interface 101, the battery 105 and the processor 106. The power charging chip 102 is connected to the external interface 101 and the basic input and output system 107 .
其中,外部接口101用于连接适配器200,例如外部接口101通过充电线(或数据线)连接适配器200。The external interface 101 is used to connect the adapter 200. For example, the external interface 101 connects to the adapter 200 through a charging cable (or data cable).
在本申请实施例中,在将适配器200连接电子设备100的外部接口101之后,适配器200可以采用特定电压(例如20V)为电子设备100充电。In the embodiment of the present application, after the adapter 200 is connected to the external interface 101 of the electronic device 100, the adapter 200 can charge the electronic device 100 using a specific voltage (for example, 20V).
在本申请实施例中,电子设备100可以通过外部接口101与适配器200进行数据交互。例如,在电子设备100与适配器200之间实现充电协议、复位信号或控制指令等的交互,该控制指令可以用于控制适配器200根据电子设备100的需求提供对应的充电电压和/或充电电流。In this embodiment of the present application, the electronic device 100 can perform data interaction with the adapter 200 through the external interface 101 . For example, the interaction of charging protocols, reset signals or control instructions is implemented between the electronic device 100 and the adapter 200 . The control instructions can be used to control the adapter 200 to provide corresponding charging voltage and/or charging current according to the needs of the electronic device 100 .
其中,电源充电芯片102用于实现快速充电。Among them, the power charging chip 102 is used to implement fast charging.
在本申请实施例中,电源充电芯片102是遵循PD充电协议的充电控制器。PD充电协议是USB-IF组织公布的功率传输协议,即快速充电标准。在实际应用中,支持PD充电协议充电的接口可以包括型接口。In the embodiment of the present application, the power charging chip 102 is a charging controller that complies with the PD charging protocol. The PD charging protocol is a power transfer protocol published by the USB-IF organization, which is a fast charging standard. In practical applications, interfaces that support PD charging protocol charging can include type interface.
在本申请实施例中,电源充电芯片102可以基于与外部接口101的连接,获得适配器200输出的充电电压。电源充电芯片102还可以基于与外部接口101的连接,输出用于指示适配器200复位的复位信号至适配器200,以使得适配器200根据该复位信号进行复位。In this embodiment of the present application, the power charging chip 102 can obtain the charging voltage output by the adapter 200 based on the connection with the external interface 101 . The power charging chip 102 can also output a reset signal for instructing the adapter 200 to reset to the adapter 200 based on the connection with the external interface 101, so that the adapter 200 resets according to the reset signal.
在本申请实施例中,电源充电芯片102中与适配器200充电有关的参数可以包括:第一电压门限值以及第一时间参数。In the embodiment of the present application, the parameters related to charging of the adapter 200 in the power charging chip 102 may include: a first voltage threshold value and a first time parameter.
请一并参阅图3,示例性介绍本申实施例提供的参数。第一电压门限值用于指示触发电源充电芯片102复位适配器200的电压门限值。第一时间参数用于指示触发电源充电芯片102复位适配器200的时间门限值。Please also refer to Figure 3 for an exemplary introduction to the parameters provided by the embodiment of this application. The first voltage threshold is used to instruct the voltage threshold that triggers the power charging chip 102 to reset the adapter 200 . The first time parameter is used to indicate a time threshold that triggers the power charging chip 102 to reset the adapter 200 .
在本申请实施例中,当适配器200的充电电压小于或等于第一电压门限值时,电源充电芯片102可以触发适配器200进行复位,如硬复位。在一些实施例中,为避免误触发,如避免软件故障或人为插拔操作导致的充电电压小于或等于第一电压门限值而误触发电源充电芯片102复位适配器200,电源充电芯片102可以配置第一时间参数。In the embodiment of the present application, when the charging voltage of the adapter 200 is less than or equal to the first voltage threshold value, the power charging chip 102 can trigger the adapter 200 to reset, such as hard reset. In some embodiments, to avoid false triggering, such as avoiding software failure or manual plug-in operation causing the charging voltage to be less than or equal to the first voltage threshold value and falsely triggering the power charging chip 102 to reset the adapter 200, the power charging chip 102 can be configured with a first time parameter.
在本申请实施例中,电源充电芯片102复位适配器200需要同时满足两个条件:充电电压小于或等于第一电压门限值,且充电电压小于或等于第一电压门限值的持续时间大于或等于第一时间参数。In the embodiment of the present application, the power charging chip 102 needs to satisfy two conditions at the same time to reset the adapter 200: the charging voltage is less than or equal to the first voltage threshold, and the duration of the charging voltage being less than or equal to the first voltage threshold is greater than or equal to the first voltage threshold. Equal to the first time parameter.
在本申请实施例中,第一电压门限值VPD以及第一时间参数TDebounce time均为配置在电源充电芯片102的固件(Firmware)中的参数。第一时间参数TDebounce time有其对应的规格范围,称为第一规格范围。第一时间参数TDebounce time所对应的数值不能超过第一规格范围。In this embodiment of the present application, the first voltage threshold VPD and the first time parameter TDebounce time are parameters configured in the firmware of the power charging chip 102 . The first time parameter TDebounce time has its corresponding specification range, which is called the first specification range. The value corresponding to the first time parameter TDebounce time cannot exceed the first specification range.
在本申请实施例中,在保证第一时间参数TDebounce time所对应的数值不超过第一规格范围下,可以灵活调整第一时间参数TDebounce time所对应的数值。In the embodiment of the present application, while ensuring that the value corresponding to the first time parameter TDebounce time does not exceed the first specification range, the value corresponding to the first time parameter TDebounce time can be flexibly adjusted.
其中,充电管理芯片103用于监测和控制充电过程。Among them, the charging management chip 103 is used to monitor and control the charging process.
在本申请实施例中,充电管理芯片103可以实时监测充电电流、充电电压、温度等参数,并根据设定的充电模式和保护机制来控制充电流程。In this embodiment of the present application, the charging management chip 103 can monitor charging current, charging voltage, temperature and other parameters in real time, and control the charging process according to the set charging mode and protection mechanism.
在本申请实施例中,充电管理芯片103可以基于与外部接口101的连接,获得适配器200输出的充电电压和充电电流,进而充电管理芯片103可以向嵌入式控制器104或电源充电芯片102通知适配器200的充电电压和充电电流。具体地,在外部接口101与适配器200连接后,外部接口101可以向充电管理芯片103通知适配器200的充电电压和充电电流。In the embodiment of the present application, the charging management chip 103 can obtain the charging voltage and charging current output by the adapter 200 based on the connection with the external interface 101, and then the charging management chip 103 can notify the embedded controller 104 or the power charging chip 102 of the charging voltage and charging current of the adapter 200. Specifically, after the external interface 101 is connected to the adapter 200, the external interface 101 can notify the charging management chip 103 of the charging voltage and charging current of the adapter 200.
在本申请实施例中,充电管理芯片103还可以通过外部接口101接收充电输入,为电池105充电的同时,还可以为工作时需要供电的用电设备(如处理器106)供电。In the embodiment of the present application, the charging management chip 103 can also receive charging input through the external interface 101, and while charging the battery 105, it can also provide power to electrical devices that require power during operation (such as the processor 106).
在本申请实施例中,充电管理芯片103还可以基于与外部接口101的连接,输出控制指令至适配器200。示例性地,充电管理芯片103可以输出用于指示适配器200调整充电电流的控制指令。适配器200可以根据控制指令增大充电电流或减小充电电流。In the embodiment of the present application, the charging management chip 103 can also output control instructions to the adapter 200 based on the connection with the external interface 101 . For example, the charging management chip 103 may output a control instruction for instructing the adapter 200 to adjust the charging current. The adapter 200 can increase the charging current or decrease the charging current according to the control instruction.
在本申请实施例中,充电管理芯片103可以输出用于指示处理器106降频的降频信号。其中,降频信号包括但不限于:Prochot信号。In this embodiment of the present application, the charging management chip 103 may output a frequency reduction signal used to instruct the processor 106 to reduce frequency. Among them, the down-conversion signal includes but is not limited to: Prochot signal.
在本申请实施例中,充电管理芯片103中与适配器200充电有关的参数可以包括:第一电流参数、峰值电流以及第二时间参数。In the embodiment of the present application, the parameters related to charging of the adapter 200 in the charging management chip 103 may include: a first current parameter, a peak current, and a second time parameter.
请一并参阅图3,第一电流参数用于指示触发充电管理芯片103限制适配器200充电电流的电流门限值。峰值电流用于指示触发充电管理芯片103输出降频信号至处理器106的电流门限值。第二时间参数用于指示触发充电管理芯片103输出降频信号至处理器106的时间门限值。Please also refer to FIG. 3 . The first current parameter is used to indicate the current threshold value that triggers the charging management chip 103 to limit the charging current of the adapter 200 . The peak current is used to indicate the current threshold that triggers the charge management chip 103 to output the down-conversion signal to the processor 106 . The second time parameter is used to indicate the time threshold that triggers the charging management chip 103 to output the down-conversion signal to the processor 106 .
其中第一电流参数的数值与峰值电流之间的关系可以为:峰值电流=第一电流参数的数值,本申请对此不作具体限定。The relationship between the value of the first current parameter and the peak current can be: Peak current = The present application does not specifically limit the value of the first current parameter.
在本申请实施例中,当适配器200的充电电流大于或等于第一电流参数时,充电管理芯片103可以限制适配器200输出的充电电流。换句话说,当适配器200的充电电流大于或等于第一电流参数时,充电管理芯片103可以输出用于指示降低充电电流的控制指令至适配器200,以使得适配器200根据该控制指令降低输出的充电电流。而充电管理芯片103限制适配器200输出充电电流的生效时间取决于充电管理芯片103的响应速度。当充电管理芯片103响应速度慢,在适配器200的充电电流大于或等于第一电流参数时,充电管理芯片103无法及时输出用于指示降低充电电流的控制指令至适配器200,也即充电管理芯片103无法及时限制适配器200输出的充电电流,则适配器200输出的充电电流会持续上升,由此存在充电电流大于或等于峰值电流的情形。In this embodiment of the present application, when the charging current of the adapter 200 is greater than or equal to the first current parameter, the charging management chip 103 can limit the charging current output by the adapter 200 . In other words, when the charging current of the adapter 200 is greater than or equal to the first current parameter, the charging management chip 103 can output a control instruction for instructing to reduce the charging current to the adapter 200, so that the adapter 200 reduces the output charging according to the control instruction. current. The effective time for the charging management chip 103 to limit the output charging current of the adapter 200 depends on the response speed of the charging management chip 103 . When the response speed of the charging management chip 103 is slow and the charging current of the adapter 200 is greater than or equal to the first current parameter, the charging management chip 103 cannot promptly output a control instruction for instructing to reduce the charging current to the adapter 200 , that is, the charging management chip 103 If the charging current output by the adapter 200 cannot be limited in time, the charging current output by the adapter 200 will continue to rise. Therefore, there may be a situation where the charging current is greater than or equal to the peak current.
在本申请实施例中,当适配器200的充电电流大于或等于峰值电流时,充电管理芯片103可以触发处理器106降频,即触发处理器106减小工作频率。换句话说,当适配器200的充电电流大于或等于峰值电流时,充电管理芯片103可以输出降频信号至处理器106。在一些实施例中,充电管理芯片103可以配置第二时间参数。通过配置第二时间参数可以避免频繁触发处理器106降频,影响电子设备100的正常运行。In the embodiment of the present application, when the charging current of the adapter 200 is greater than or equal to the peak current, the charging management chip 103 can trigger the processor 106 to reduce the frequency, that is, trigger the processor 106 to reduce the operating frequency. In other words, when the charging current of the adapter 200 is greater than or equal to the peak current, the charging management chip 103 can output a down-conversion signal to the processor 106 . In some embodiments, the charge management chip 103 may configure the second time parameter. By configuring the second time parameter, frequent triggering of the processor 106 to reduce frequency can be avoided, which affects the normal operation of the electronic device 100 .
在本申请实施例中,充电管理芯片103触发处理器106降频需要同时满足两个条件:充电电流大于或等于峰值电流,且充电电流大于或等于峰值电流的持续时间大于或等于第二时间参数。In the embodiment of the present application, the charging management chip 103 triggers the processor 106 to reduce the frequency when two conditions are met at the same time: the charging current is greater than or equal to the peak current, and the duration of the charging current being greater than or equal to the peak current is greater than or equal to the second time parameter.
在本申请实施例中,第一电流参数ILIM2、峰值电流ICRIT以及第二时间参数TICRIT Debounce time均为配置在充电管理芯片103的固件中的参数。第一电流参数ILIM2以及第二时间参数TICRIT Debounce time均有其对应的规格范围。第一电流参数ILIM2对应的规格范围可以称为第二规格范围。第二时间参数TICRIT Debounce time对应的规格范围可以称为第三规格范围。第一电流参数ILIM2以及第二时间参数TICRIT Debounce time所对应的数值均不能超过其对应的规格范围。In the embodiment of the present application, the first current parameter ILIM2, the peak current ICRIT, and the second time parameter TICRIT Debounce time are all parameters configured in the firmware of the charging management chip 103. The first current parameter ILIM2 and the second time parameter TICRIT Debounce time have their corresponding specification ranges. The specification range corresponding to the first current parameter ILIM2 may be called the second specification range. The specification range corresponding to the second time parameter TICRIT Debounce time can be called the third specification range. The values corresponding to the first current parameter ILIM2 and the second time parameter TICRIT Debounce time cannot exceed their corresponding specification ranges.
在本申请实施例中,在保证第一电流参数ILIM2所对应的数值不超过第二规格范围,第二时间参数TICRIT Debounce time所对应的数值不超过第三规格范围下,可以灵活调整第一电流参数ILIM2以及第二时间参数TICRIT Debounce time所对应的数值。In the embodiment of the present application, the first current can be flexibly adjusted while ensuring that the value corresponding to the first current parameter ILIM2 does not exceed the second specification range and the value corresponding to the second time parameter TICRIT Debounce time does not exceed the third specification range. The value corresponding to parameter ILIM2 and the second time parameter TICRIT Debounce time.
在一些实施例中,第二时间参数TICRIT Debounce time对应的规格范围为包括四个档位。In some embodiments, the specification range corresponding to the second time parameter TICRIT Debounce time includes four gears.
可以理解,上述第一规格范围至第三规格范围可以不同,具体的规格范围根据实际情况确定,本申请对此不作具体限定。It can be understood that the above-mentioned first specification range to the third specification range may be different, and the specific specification range is determined according to actual conditions, and this application does not make any specific limitations on this.
需要说明的是,现有技术中电子设备100的第一时间参数TDebounce time、第一电流参数ILIM2以及第二时间参数TICRIT Debounce time对应的数值均是固定值。而本申请实施例提供的电子设备100在检测到适配器断充时,可以通过灵活调整第一时间参数TDebounce time、第一电流参数ILIM2以及第二时间参数TICRIT Debounce time对应的数值,为电子设备100与适配器200之间的充电配置最合适的参数数值,以此解决适配器断充问题。电子设备100调整参数的内容可以参考下文本申请实施例所提供的充电异常处理方法。It should be noted that in the prior art, the values corresponding to the first time parameter TDebounce time, the first current parameter ILIM2 and the second time parameter TICRIT Debounce time of the electronic device 100 are all fixed values. When the electronic device 100 provided by the embodiment of the present application detects that the adapter is disconnected from charging, the electronic device 100 can flexibly adjust the values corresponding to the first time parameter TDebounce time, the first current parameter ILIM2 and the second time parameter TICRIT Debounce time. The most suitable parameter value for the charging configuration with the adapter 200, so as to solve the problem of adapter disconnection. For the content of adjusting parameters of the electronic device 100, please refer to the charging abnormality handling method provided in the embodiments of this application below.
在本申请实施例中,充电管理芯片103还可以包括但不限于如下功能:充电控制功能、充电保护功能、充电状态监测功能以及充电模式切换功能。充电控制功能可以根据用户需求和电子设备100的电池105状态来控制充电过程。充电保护功能可以提供过压保护、过流保护以及过温保护等。电子设备100可以提供多种充电模式,如恒流充电、恒压充电、浮充充电等,充电模式切换功能可以实现上述充电模式的切换。In the embodiment of the present application, the charging management chip 103 may also include but is not limited to the following functions: charging control function, charging protection function, charging status monitoring function, and charging mode switching function. The charging control function can control the charging process according to user needs and the battery 105 status of the electronic device 100 . The charging protection function can provide overvoltage protection, overcurrent protection and overtemperature protection. The electronic device 100 can provide multiple charging modes, such as constant current charging, constant voltage charging, float charging, etc., and the charging mode switching function can realize the switching of the above charging modes.
在本申请实施例中,嵌入式控制器104可以用于执行本申请实施例提供的充电异常处理方法,如嵌入式控制器104检测适配器200是否断充、在适配器200断充时嵌入式控制器104调整充电管理芯片103和/或电源充电芯片102中与适配器200充电有关的参数、嵌入式控制器104将调整后的参数写入至对应芯片的固件。In an embodiment of the present application, the embedded controller 104 can be used to execute the charging exception handling method provided in the embodiment of the present application, such as the embedded controller 104 detecting whether the adapter 200 is disconnected from charging, the embedded controller 104 adjusting parameters related to charging of the adapter 200 in the charging management chip 103 and/or the power charging chip 102 when the adapter 200 is disconnected from charging, and the embedded controller 104 writing the adjusted parameters to the firmware of the corresponding chip.
在一些实施例中,嵌入式控制器104还可以用于上报故障信息。如将故障信息输出至基本输入输出系统107,以通过基本输入输出系统107上报至后台。故障信息包括但不限于:适配器200故障或适配器200断充。In some embodiments, the embedded controller 104 can also be used to report fault information. For example, the fault information is output to the basic input and output system 107 so as to be reported to the background through the basic input and output system 107 . Fault information includes but is not limited to: adapter 200 failure or adapter 200 disconnection from charging.
在一些实施例中,嵌入式控制器104可以用于进行电源管理,电池智能充放电管理,控制主板电源。In some embodiments, the embedded controller 104 can be used to perform power management, intelligent battery charge and discharge management, and control the mainboard power supply.
在一些实施例中,嵌入式控制器104可以是挂在处理器106的LPC总线(Low pincount Bus)下的一颗嵌入主控芯片,嵌入式控制器104还用于管理低速外设,如键盘、触摸板以及状态指示灯等硬件设备。In some embodiments, the embedded controller 104 may be an embedded main control chip hung under the LPC bus (Low pincount Bus) of the processor 106. The embedded controller 104 is also used to manage low-speed peripherals, such as keyboards. , touch pad, status indicator lights and other hardware devices.
其中,电池105又称为内置电池。电池105内置于电子设备100,用于为电子设备100供电。电池105可以响应于充电管理芯片103的控制为电子设备100供电。例如,当充电电流大于或等于第一电流参数时,充电管理芯片103可以控制电池105输出电能。Among them, the battery 105 is also called a built-in battery. The battery 105 is built into the electronic device 100 and is used to power the electronic device 100 . The battery 105 may power the electronic device 100 in response to the control of the charge management chip 103 . For example, when the charging current is greater than or equal to the first current parameter, the charging management chip 103 can control the battery 105 to output electric energy.
其中,处理器106可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器106、数字信号处理器106 (Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器106也可以是任何常规的处理器106等。The processor 106 may be a central processing unit (CPU), or other general-purpose processor 106, a digital signal processor 106 (Digital Signal Processor, DSP), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC). ) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 106 may be any conventional processor 106 or the like.
在本申请实施例中,处理器106可以根据降频信号降低工作频率。In this embodiment of the present application, the processor 106 can reduce the operating frequency according to the down-frequency signal.
其中,基本输入输出系统107可以包括一组固化到电子设备100主板上的程序。Among them, the basic input and output system 107 may include a set of programs solidified on the motherboard of the electronic device 100 .
在本申请实施例中,电源充电芯片102可以通过I2C(Inter-Integrated Circuit)总线连接基本输入输出系统107,由此实现电源充电芯片102与基本输入输出系统107之间的数据交互。嵌入式控制器104可以通过X-BUS总线或SPI总线连接基本输入输出系统107,由此实现嵌入式控制器104与基本输入输出系统107之间的数据交互。In this embodiment of the present application, the power charging chip 102 can be connected to the basic input and output system 107 through an I2C (Inter-Integrated Circuit) bus, thereby realizing data interaction between the power charging chip 102 and the basic input and output system 107 . The embedded controller 104 can be connected to the basic input and output system 107 through the X-BUS bus or the SPI bus, thereby realizing data interaction between the embedded controller 104 and the basic input and output system 107.
在本申请实施例中,基本输入输出系统107可以获取嵌入式控制器104输出的适配器断充信息,并将适配器断充信息输出至电脑管家应用(图未示),进而基于电脑管家应用将适配器断充信息显示给用户,如显示未连接适配器。In the embodiment of the present application, the basic input and output system 107 can obtain the adapter disconnection and charging information output by the embedded controller 104, and output the adapter disconnection and charging information to the computer housekeeper application (not shown), and then use the computer housekeeper application to store the adapter. The charging disconnection information is displayed to the user, for example, the adapter is not connected.
在一些实施例中,基本输入输出系统107中可以保存着电子设备100最重要的基本输入输出的程序、系统设置信息、开机后自检程序以及系统自启动程序。In some embodiments, the basic input and output system 107 may store the most important basic input and output programs, system setting information, post-boot self-test programs and system self-starting programs of the electronic device 100 .
在一些实施例中,电子设备100还可以包括其他用电设备(图未示)。用电设备连接充电管理芯片103和电池105。In some embodiments, the electronic device 100 may also include other electrical devices (not shown). The electrical equipment is connected to the charging management chip 103 and the battery 105.
请参阅图4,示例性介绍本申请实施例提供的另一电子设备300的结构。Referring to FIG. 4 , the structure of another electronic device 300 provided by an embodiment of the present application is exemplarily introduced.
图4所示电子设备300包括图2所示电子设备100中的外部接口101、电源充电芯片102、充电管理芯片103、嵌入式控制器104、电池105、处理器106以及基本输入输出系统107,电子设备300还包括采样电阻R。The electronic device 300 shown in Figure 4 includes the external interface 101, power charging chip 102, charging management chip 103, embedded controller 104, battery 105, processor 106 and basic input and output system 107 in the electronic device 100 shown in Figure 2, The electronic device 300 also includes a sampling resistor R.
其中,采样电阻R连接在外部接口101和充电管理芯片103之间。嵌入式控制器104可以通过获取采样电阻R两端的电压,得到适配器200的充电电压。The sampling resistor R is connected between the external interface 101 and the charging management chip 103 . The embedded controller 104 can obtain the charging voltage of the adapter 200 by obtaining the voltage across the sampling resistor R.
在一些实施例中,电子设备300还包括采样模块108。采样模块108用于对采样电阻R两端的电压进行采样,并以得到适配器200实际输出的充电电压,并将采样到的充电电压输出至嵌入式控制器104。In some embodiments, electronic device 300 also includes sampling module 108 . The sampling module 108 is used to sample the voltage across the sampling resistor R to obtain the charging voltage actually output by the adapter 200 , and output the sampled charging voltage to the embedded controller 104 .
可以理解,图2所示的电子设备100以及图4所示电子设备300仅是范例,并且电子设备100或电子设备300可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图2或图4中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It can be understood that the electronic device 100 shown in FIG. 2 and the electronic device 300 shown in FIG. 4 are only examples, and the electronic device 100 or the electronic device 300 may have more or fewer components than those shown in the figures, and may be combined. Two or more components, or may have different component configurations. The various components shown in Figure 2 or Figure 4 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
本申请实施例提供的电子设备100、300所能达到的有益效果可参考下文本申请实施例所提供的充电异常处理方法的有益效果,此处不再赘述。For the beneficial effects that can be achieved by the electronic devices 100 and 300 provided by the embodiments of the present application, please refer to the beneficial effects of the charging abnormality handling method provided by the embodiments of the present application below, which will not be described again here.
本申请实施例提供的充电异常处理方法的执行主体可以为上述的电子设备,也可以为该电子设备中能够实现该充电异常处理方法的功能模块和/或功能实体,并且本申请方案能够通过硬件和/或软件的方式实现,具体的可以根据实际使用需求确定,本申请实施例不作限定。The execution subject of the charging abnormality handling method provided by the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and/or functional entity in the electronic device that can implement the charging abnormality handling method, and the solution of the present application can be implemented through hardware. And/or software implementation, the specific details can be determined according to actual usage requirements, and are not limited in the embodiments of this application.
下面结合附图,通过电子设备的部件交互,对本申请实施例提供的充电异常处理方法进行示例性的说明。The following is an exemplary description of the charging abnormality processing method provided in the embodiment of the present application through the interaction of components of the electronic device in combination with the accompanying drawings.
请参阅图5,示例性介绍本申请实施例提供的充电异常处理方法流程。该充电异常处理方法流程包括步骤S501至步骤S513。Please refer to Figure 5 for an exemplary introduction to the flow of the charging abnormality handling method provided by the embodiment of the present application. The charging abnormality processing method flow includes steps S501 to S513.
步骤S501,电子设备的外部接口连接适配器。Step S501: The external interface of the electronic device connects to the adapter.
其中,外部接口可以为型的物理端口。Among them, the external interface can be The physical port type.
示例性地,用户将连接供电电源(如市电)的适配器插入电子设备的外部接口。For example, the user inserts an adapter connected to a power supply (eg, mains power) into an external interface of the electronic device.
步骤S502,电源充电芯片获取适配器的充电电压。Step S502: The power charging chip obtains the charging voltage of the adapter.
在本申请实施例中,在电子设备的外部接口与适配器连接后,电源充电芯片可以实时采集适配器的充电电压。例如,适配器的充电电压可以为20V,在电子设备的外部接口与适配器连接后,电源适配器采用20V充电电压对电子设备充电,相应地,电源充电芯片可以获得适配器的充电电压为20V。In this embodiment of the present application, after the external interface of the electronic device is connected to the adapter, the power charging chip can collect the charging voltage of the adapter in real time. For example, the charging voltage of the adapter can be 20V. After the external interface of the electronic device is connected to the adapter, the power adapter uses the 20V charging voltage to charge the electronic device. Correspondingly, the power charging chip can obtain the charging voltage of the adapter to 20V.
步骤S503,嵌入式控制器获取适配器的充电电压。Step S503: The embedded controller obtains the charging voltage of the adapter.
在本申请实施例中,嵌入式控制器可以实时获取电源充电芯片采集到的充电电压。示例性地,以电子设备所包括的电源充电芯片为第一PD芯片,适配器所包括的电源充电芯片为第二PD芯片为例。当电子设备的嵌入式控制器被唤醒时,嵌入式控制器运行其对应的控制代码逻辑,向第一PD芯片发送供电信息查询信令,该供电信息查询信令用于查询适配器的供电信息,供电信息包括但不限于:充电电压和充电电流等。第一PD芯片向第二PD芯片发送该电信息查询信令,以指示请求获取适配器的供电信息,其对应的消息类型可以为Control:GetSink_Cap。第二PD芯片向第一PD芯片返回根据供电信息查询信令查询到的供电信息,其对应的消息类型可以为Data:Sink Capability。第一PD芯片可以将获得的供电信息输出至嵌入式控制器。In this embodiment of the present application, the embedded controller can obtain the charging voltage collected by the power charging chip in real time. For example, take the power charging chip included in the electronic device as a first PD chip, and the power charging chip included in the adapter as a second PD chip. When the embedded controller of the electronic device is awakened, the embedded controller runs its corresponding control code logic and sends a power supply information query signaling to the first PD chip. The power supply information query signaling is used to query the power supply information of the adapter. Power supply information includes but is not limited to: charging voltage and charging current. The first PD chip sends the electrical information query signaling to the second PD chip to indicate a request to obtain the power supply information of the adapter. The corresponding message type may be Control:GetSink_Cap. The second PD chip returns the power supply information queried according to the power supply information query signaling to the first PD chip, and its corresponding message type may be Data: Sink Capability. The first PD chip can output the obtained power supply information to the embedded controller.
在本申请实施例中,当适配器与电子设备连接时,电源充电芯片与充电管理芯片均可以获取适配器的充电电压和/或充电电流。从而,嵌入式控制器可以实时从电源充电芯片或充电管理芯片中获取适配器的充电电压。In the embodiment of the present application, when the adapter is connected to the electronic device, both the power charging chip and the charging management chip can obtain the charging voltage and/or charging current of the adapter. Therefore, the embedded controller can obtain the charging voltage of the adapter from the power charging chip or charging management chip in real time.
步骤S504,电源充电芯片检测到充电电压小于或等于第一电压门限值,且充电电压小于或等于第一电压门限值的持续时间大于或等于第一时间参数时,确定适配器断充并输出复位信号至适配器。Step S504: When the power charging chip detects that the charging voltage is less than or equal to the first voltage threshold, and the duration for which the charging voltage is less than or equal to the first voltage threshold is greater than or equal to the first time parameter, it determines that the adapter has stopped charging and outputs Reset signal to adapter.
在本申请实施例中,电源充电芯片检测到充电电压小于或等于第一电压门限值,且充电电压小于或等于第一电压门限值的持续时间大于或等于电源充电芯片的固件所存储的第一时间参数的数值,电源充电芯片输出复位信号至外部接口,进而通过外部接口将复位信号输出至适配器。In this embodiment of the present application, the power charging chip detects that the charging voltage is less than or equal to the first voltage threshold, and the duration for which the charging voltage is less than or equal to the first voltage threshold is greater than or equal to the value stored in the firmware of the power charging chip. According to the value of the parameter at the first time, the power charging chip outputs a reset signal to the external interface, and then outputs the reset signal to the adapter through the external interface.
步骤S505,适配器根据复位信号复位。Step S505: The adapter resets according to the reset signal.
在适配器接收到复位信号后,运行其对应的控制代码逻辑,复位(重置)适配器。在适配器复位时,适配器会断开与电子设备的连接(即出现适配器断充),然后又重新建立与电子设备的连接。After the adapter receives the reset signal, it runs its corresponding control code logic to reset (reset) the adapter. When the adapter is reset, the adapter disconnects from the electronic device (that is, the adapter is disconnected and charged), and then re-establishes the connection with the electronic device.
步骤S506,在适配器断充时,嵌入式控制器向对应的芯片发送获取第一参数的参数请求信息。Step S506: When the adapter is disconnected from charging, the embedded controller sends parameter request information to obtain the first parameter to the corresponding chip.
在本申请实施例中,嵌入式控制器可以预先获取第一电压门限值以及第一时间参数,进而可以根据实时获得的充电电压检测适配器是否断充。当嵌入式控制器检测到充电电压小于或等于第一电压门限值,且充电电压小于或等于第一电压门限值的持续时间大于或等于第一时间参数时,确定适配器断充。In this embodiment of the present application, the embedded controller can obtain the first voltage threshold value and the first time parameter in advance, and can further detect whether the adapter has stopped charging based on the charging voltage obtained in real time. When the embedded controller detects that the charging voltage is less than or equal to the first voltage threshold, and the duration of the charging voltage being less than or equal to the first voltage threshold is greater than or equal to the first time parameter, it is determined that the adapter has stopped charging.
在另一些实施例中,嵌入式控制器可以在电源充电芯片输出复位信号时,确定适配器断充。In other embodiments, the embedded controller may determine that the adapter is disconnected from charging when the power charging chip outputs a reset signal.
其中,第一参数可以包括充电管理芯片和/或电源充电芯片中与适配器充电有关的参数。具体地,第一参数包括但不限于:第一时间参数、第一电流参数和第二时间参数。对应的芯片包括充电管理芯片和电源充电芯片中的任一个或两个。The first parameter may include parameters related to adapter charging in the charging management chip and/or the power charging chip. Specifically, the first parameter includes but is not limited to: a first time parameter, a first current parameter and a second time parameter. The corresponding chips include any one or both of a charging management chip and a power charging chip.
其中,参数请求信息可以用于指示请求获取第一参数,也即参数请求信息指示要获取的第一参数。在另一些实施例中,参数请求信息还可以用于指示请求获取第一参数的规格范围,也即参数请求信息还指示要获取的第一参数所对应的规格范围。第一参数对应规格范围可以参考上述各个参数所对应的规格范围的内容,在此不再赘述。The parameter request information may be used to indicate a request to obtain the first parameter, that is, the parameter request information indicates the first parameter to be obtained. In other embodiments, the parameter request information may also be used to indicate a request to obtain the specification range of the first parameter, that is, the parameter request information also indicates the specification range corresponding to the first parameter to be obtained. The specification range corresponding to the first parameter may refer to the content of the specification range corresponding to each parameter mentioned above, which will not be described again here.
下述以参数请求信息仅用于指示获取第一参数为例,在执行步骤S506时,嵌入式控制器可以向电源充电芯片发送获取第一时间参数的参数请求信息,以获取电源充电芯片中的第一时间参数。或者,嵌入式控制器可以向充电管理芯片发送获取第一电流参数的参数请求信息,以获取充电管理芯片中的第一电流参数。或者,嵌入式控制器可以向电源充电芯片发送获取第一时间参数的参数请求信息,以获取第一时间参数,同时向充电管理芯片发送获取第一电流参数和第二时间参数的参数请求信息,以获取第一电流参数和第二时间参数,本申请对此不作具体限定。The following takes the parameter request information only for instructing to obtain the first parameter as an example. When performing step S506, the embedded controller may send the parameter request information for obtaining the first time parameter to the power charging chip to obtain the parameter in the power charging chip. First time parameters. Alternatively, the embedded controller may send parameter request information for obtaining the first current parameter to the charging management chip to obtain the first current parameter in the charging management chip. Alternatively, the embedded controller can send parameter request information to obtain the first time parameter to the power charging chip to obtain the first time parameter, and at the same time send parameter request information to obtain the first current parameter and the second time parameter to the charging management chip, To obtain the first current parameter and the second time parameter, this application does not specifically limit this.
可以理解,当参数请求信息用于指示请求获取第一参数和该第一参数对应的规格范围时,嵌入式控制器可以向某一芯片发送一次参数请求信息,就可以同时获得该芯片中的第一参数和该第一参数对应的规格范围。以向电源充电芯片发送获取第一时间参数的参数请求信息为例,则该参数请求信息指示获取第一时间参数和第一规格范围。其他以此类推。It can be understood that when the parameter request information is used to indicate a request to obtain a first parameter and a specification range corresponding to the first parameter, the embedded controller can send a parameter request information to a certain chip once, and can simultaneously obtain the first parameter in the chip and the specification range corresponding to the first parameter. Taking the example of sending a parameter request information to obtain a first time parameter to a power charging chip, the parameter request information indicates obtaining the first time parameter and the first specification range. The same applies to other cases.
在另一些实施例中,参数请求信息仅用于指示获取第一参数,规格范围请求信息仅用于指示获取该第一参数对应的规格范围。则嵌入式控制器向某一芯片至少需要发送两次请求信息才能获得该芯片中的第一参数和该第一参数对应的规格范围,而嵌入式控制器发送参数请求信息的时机与发送规格范围请求信息的时机可以相同或不同,具体可以根据实际情况设置,本申请对此不作具体限定。In other embodiments, the parameter request information is only used to indicate obtaining the first parameter, and the specification range request information is only used to indicate obtaining the specification range corresponding to the first parameter. Then the embedded controller needs to send request information to a certain chip at least twice to obtain the first parameter in the chip and the specification range corresponding to the first parameter. The timing of sending parameter request information by the embedded controller depends on the specification range. The timing of requesting information can be the same or different, and can be set according to the actual situation. This application does not specifically limit this.
步骤S507,对应的芯片向嵌入式控制器传输第一参数。Step S507: The corresponding chip transmits the first parameter to the embedded controller.
在本申请实施例,在步骤S506中嵌入式控制器向对应的芯片发送参数请求信息,对应的芯片根据该参数请求信息反馈对应的信息,如反馈第一参数,或反馈第一参数和该第一参数对应的规格范围。In this embodiment of the present application, in step S506, the embedded controller sends parameter request information to the corresponding chip, and the corresponding chip feeds back corresponding information according to the parameter request information, such as feeding back the first parameter, or feeding back the first parameter and the third parameter. The specification range corresponding to a parameter.
例如,在步骤S506中,嵌入式控制器向电源充电芯片发送获取第一时间参数和该第一时间参数的规格范围的参数请求信息,则在步骤S507中,电源充电芯片向嵌入式控制器传输第一时间参数和第一规格范围。又例如,在步骤S506中,嵌入式控制器向充电管理芯片发送获取第一电流参数和该第一电流参数的规格范围的参数请求信息,则在步骤S507中,充电管理芯片向嵌入式控制器传输第一电流参数和第二规格范围。又例如,在步骤S506中,嵌入式控制器向充电管理芯片发送获取第一电流参数、第二时间参数和对应的规格范围的参数信息,同时还向电源充电芯片发送获取第一时间参数和该第一时间参数的规格范围的参数请求信息,则在步骤S507中,充电管理芯片向嵌入式控制器传输第一电流参数、第二时间参数、第二规格范围以及第三规格范围,且,电源充电芯片向嵌入式控制器传输第一时间参数和第一规格范围。For example, in step S506, the embedded controller sends parameter request information to obtain the first time parameter and the specification range of the first time parameter to the power charging chip. Then in step S507, the power charging chip transmits the data to the embedded controller. First time parameters and first specification range. For another example, in step S506, the embedded controller sends parameter request information to obtain the first current parameter and the specification range of the first current parameter to the charging management chip. Then in step S507, the charging management chip sends a request message to the embedded controller. The first current parameter and the second specification range are transmitted. For another example, in step S506, the embedded controller sends the parameter information of obtaining the first current parameter, the second time parameter and the corresponding specification range to the charging management chip, and also sends the obtaining of the first time parameter and the corresponding specification range to the power charging chip. Parameter request information for the specification range of the first time parameter, then in step S507, the charging management chip transmits the first current parameter, the second time parameter, the second specification range and the third specification range to the embedded controller, and the power supply The charging chip transmits the first time parameters and the first specification range to the embedded controller.
可以理解,当嵌入式控制器向对应芯片发送获取其部分或全部的第一参数时,则对应芯片向嵌入式控制器返回其部分或全部的第一参数以及所返回第一参数的规格范围。It can be understood that when the embedded controller sends to the corresponding chip to obtain part or all of its first parameters, the corresponding chip returns part or all of its first parameters and the specification range of the returned first parameters to the embedded controller.
步骤S508,嵌入式控制器调整第一参数。Step S508: The embedded controller adjusts the first parameter.
在本申请实施例中,在适配器断充时,嵌入式控制器调整第一参数。具体地,嵌入式控制器调整步骤S507中所传输的第一参数,如可以对步骤S507中所传输的所有第一参数均进行调整,也可以对步骤S507中所传输的第一参数中的部分进行调整。In this embodiment of the present application, when the adapter is disconnected from charging, the embedded controller adjusts the first parameter. Specifically, the embedded controller adjusts the first parameters transmitted in step S507. For example, all the first parameters transmitted in step S507 can be adjusted, or part of the first parameters transmitted in step S507 can be adjusted. Make adjustments.
在本申请实施例中,调整第一参数包括但不限于:增加第一参数的数值、减小第一参数的数值或保持第一参数的数值。例如,嵌入式控制器可以在第一规格范围内增加第一时间参数的数值。又例如,嵌入式控制器可以在第二规格范围内降低第一电流参数的数值。又例如,嵌入式控制器可以在第三规格范围内提高第二时间参数的档位。In this embodiment of the present application, adjusting the first parameter includes but is not limited to: increasing the value of the first parameter, decreasing the value of the first parameter, or maintaining the value of the first parameter. For example, the embedded controller may increase the value of the first time parameter within the first specification range. For another example, the embedded controller may reduce the value of the first current parameter within the second specification range. For another example, the embedded controller can increase the gear of the second time parameter within the third specification range.
在本申请实施例中,嵌入式控制器调整第一参数的内容将在下文详细介绍。In the embodiment of this application, the content of the embedded controller adjusting the first parameter will be introduced in detail below.
可以理解,电源充电芯片和嵌入式控制器可以同时确定适配器断充。步骤S504和S506以及步骤S505和S506的执行先后顺序不作具体限定,步骤S504和S506可以同时执行,或步骤S505和S506可以同时执行。It is understandable that the power charging chip and the embedded controller can simultaneously determine that the adapter is disconnected from charging. The execution order of steps S504 and S506 and steps S505 and S506 is not specifically limited, and steps S504 and S506 can be executed simultaneously, or steps S505 and S506 can be executed simultaneously.
步骤S509,嵌入式控制器将调整后的第一参数输出至对应的芯片。In step S509, the embedded controller outputs the adjusted first parameter to the corresponding chip.
在本申请实施例中,在步骤S508调整第一参数后,则在步骤S509中,将步骤S508中调整后的第一参数输出至对应的芯片。In the embodiment of the present application, after the first parameter is adjusted in step S508, in step S509, the first parameter adjusted in step S508 is output to the corresponding chip.
例如,在步骤S508中,嵌入式控制器调整充电管理芯片的第一电流参数,则在步骤S509中,嵌入式控制器将调整后的第一电流参数传输至充电管理芯片。又例如,在步骤S508中,嵌入式控制器调整电源充电芯片的第一时间参数,则在步骤S509中,嵌入式控制器将调整后的第一时间参数传输至电源充电芯片。又例如,在步骤S508中,嵌入式控制器调整充电管理芯片的第一电流参数、第二时间参数以及电源充电芯片的第一时间参数,则在步骤S509中,嵌入式控制器将调整后的第一电流参数以及调整后的第二时间参数传输至充电管理芯片,并将调整后的第一时间参数传输至电源充电芯片。For example, in step S508, the embedded controller adjusts the first current parameter of the charging management chip, and in step S509, the embedded controller transmits the adjusted first current parameter to the charging management chip. For another example, in step S508, the embedded controller adjusts the first time parameter of the power charging chip, and in step S509, the embedded controller transmits the adjusted first time parameter to the power charging chip. For another example, in step S508, the embedded controller adjusts the first current parameter, the second time parameter of the charging management chip, and the first time parameter of the power charging chip, and in step S509, the embedded controller transmits the adjusted first current parameter and the adjusted second time parameter to the charging management chip, and transmits the adjusted first time parameter to the power charging chip.
步骤S510,对应的芯片根据接收到的调整后的第一参数运行。In step S510, the corresponding chip operates according to the received adjusted first parameter.
在本申请实施例中,嵌入式控制器在将步骤S508中,将调整后的第一参数输出至对应的芯片后,该对应的芯片就根据调整后的第一参数运行。In this embodiment of the present application, after the embedded controller outputs the adjusted first parameter to the corresponding chip in step S508, the corresponding chip operates according to the adjusted first parameter.
例如,在步骤S508嵌入式控制器调整第一时间参数,则在步骤S510中,当充电电压小于第一电压门限值时,电源充电芯片根据调整后的第一时间参数判断是否输复位信息。又例如,在步骤S508嵌入式控制器调整第一电流参数,则在步骤S510中,充电管理芯片根据调整后的第一电流参数控制适配器输出对应的充电电流。又例如,在步骤S508嵌入式控制器调整第二时间参数,则在步骤S510中,在充电电流大于或等于峰值电流时,充电管理芯片根据调整后的第二时间参数判断是否触发处理器降频。For example, in step S508, the embedded controller adjusts the first time parameter, and in step S510, when the charging voltage is less than the first voltage threshold, the power charging chip determines whether to output reset information based on the adjusted first time parameter. For another example, in step S508, the embedded controller adjusts the first current parameter, and in step S510, the charging management chip controls the adapter to output a corresponding charging current according to the adjusted first current parameter. For another example, in step S508, the embedded controller adjusts the second time parameter. Then in step S510, when the charging current is greater than or equal to the peak current, the charging management chip determines whether to trigger processor downclocking based on the adjusted second time parameter. .
步骤S511,在调整第一参数后,嵌入式控制器监测适配器断充是否恢复。Step S511: After adjusting the first parameter, the embedded controller monitors whether the adapter has been disconnected and recharged.
在本申请实施例中,在调整第一参数后,对应的芯片根据接收到的调整后的第一参数运行。在对应的芯片根据接收到的调整后的第一参数运行时或后,嵌入式控制器可以通过实时获取的充电电压判断适配器断充是否恢复。当检测到充电电压大于第一电压门限值,则适配器断充恢复。而检测到充电电压小于或等于第一电压门限值,则适配器断充未恢复。In the embodiment of the present application, after adjusting the first parameter, the corresponding chip operates according to the received adjusted first parameter. When or after the corresponding chip runs according to the received adjusted first parameter, the embedded controller can determine whether the adapter has resumed charging after the charging voltage is obtained in real time. When it is detected that the charging voltage is greater than the first voltage threshold, the adapter stops charging and resumes charging. If it is detected that the charging voltage is less than or equal to the first voltage threshold, the adapter has stopped charging and has not recovered.
步骤S512,在断充恢复时,嵌入式控制器将调整后的第一参数写入对应芯片的固件。Step S512: When resuming from charging, the embedded controller writes the adjusted first parameter into the firmware of the corresponding chip.
其中,嵌入式控制器将调整后的第一参数写入对应芯片的固件,可以通过烧录或更新固件等方式将固件中所对应的第一参数的数值设置为调整后的第一参数的数值。Among them, the embedded controller writes the adjusted first parameter into the firmware of the corresponding chip, and the value of the corresponding first parameter in the firmware can be set to the value of the adjusted first parameter by burning or updating the firmware. .
在本申请实施例中,调整后的第一参数包括在适配器断充至适配器断充恢复这段时间内,嵌入式控制器所调整过的所有第一参数,且该调整后的第一参数的数值为适配器断充恢复时,芯片所运行的参数数值。In the embodiment of the present application, the adjusted first parameters include all first parameters adjusted by the embedded controller during the period from when the adapter is disconnected from charging to when the adapter is restored from charging, and the adjusted first parameters are The value is the parameter value of the chip when the adapter is disconnected and restored.
例如,在适配器断充至适配器断充恢复这段时间内,嵌入式控制器将第一时间参数的数值由原固定值a调整为b,并在电源充电芯片根据第一时间参数的数值为b运行时,检测到适配器断充未恢复。嵌入式控制器继续调整第一电流参数的数值为c。在电源充电芯片根据第一时间参数的数值为b运行且充电管理芯片根据第一电流参数的数值为c运行时,检测到适配器断充恢复,则嵌入式控制器将电源充电芯片的固件中第一时间参数的数值设置为b,并将充电管理芯片的固件中第一电流参数的数值设置为c。For example, during the period from when the adapter stops charging to when the adapter stops charging, the embedded controller adjusts the value of the first time parameter from the original fixed value a to b, and when the power charging chip operates according to the value b of the first time parameter, it detects that the adapter has not been restored from charging. The embedded controller continues to adjust the value of the first current parameter to c. When the power charging chip operates according to the value b of the first time parameter and the charging management chip operates according to the value c of the first current parameter, it is detected that the adapter has been restored from charging, the embedded controller sets the value of the first time parameter in the firmware of the power charging chip to b, and sets the value of the first current parameter in the firmware of the charging management chip to c.
又例如,如上述示例,在电源充电芯片根据第一时间参数的数值为b进行运行时,适配器断充未恢复,则嵌入式控制器将第一时间参数的数值调整为原固定值a,并继续调整第一电流参数的数值为c。在电源充电芯片根据第一时间参数的数值为a运行,且充电管理芯片根据第一电流参数的数值为c运行时,检测到适配器断充恢复,则嵌入式控制器保持电源充电芯片的固件中第一时间参数的数值为原固定值a,将充电管理芯片的固件中第一电流参数的数值设置为c。For another example, as in the above example, when the power charging chip operates according to the value of the first time parameter b, the adapter is disconnected and not restored, the embedded controller adjusts the value of the first time parameter to the original fixed value a, and continues to adjust the value of the first current parameter to c. When the power charging chip operates according to the value of the first time parameter a, and the charging management chip operates according to the value of the first current parameter c, and it is detected that the adapter is disconnected and restored, the embedded controller maintains the value of the first time parameter in the firmware of the power charging chip as the original fixed value a, and sets the value of the first current parameter in the firmware of the charging management chip to c.
又例如,在适配器断充至适配器断充恢复这段时间内,嵌入式控制器仅调整充电管理芯片的第一电流参数,且在充电管理芯片根据第一参数的数值为A运行时,检测到适配器断充恢复,则充电管理芯片的固件中第一电流参数的数值设置为A。For another example, during the period from when the adapter is disconnected from charging to when the adapter is restored from charging, the embedded controller only adjusts the first current parameter of the charging management chip, and when the charging management chip runs according to the value of the first parameter to A, it detects When the adapter resumes charging after disconnection, the value of the first current parameter in the firmware of the charging management chip is set to A.
可以理解,图5中步骤S506、S507、S509、S510、S512以对应的芯片包括充电管理芯片和电源充电芯片为例,并不对本申请实施例调整第一参数做具体限定。It can be understood that steps S506, S507, S509, S510, and S512 in Figure 5 take the corresponding chips including a charging management chip and a power charging chip as an example, and do not specifically limit the adjustment of the first parameter in the embodiment of the present application.
步骤S513,在适配器断充未恢复且确定适配器故障时,嵌入式控制器输出故障信息至基本输入输出系统。Step S513: When the adapter is disconnected and charged but has not recovered and the adapter is determined to be faulty, the embedded controller outputs fault information to the basic input and output system.
在本申请实施例中,嵌入式控制器可以根据调整的参数以及适配器断充未恢复确定适配器故障。在适配器故障时嵌入式控制器可以输出故障信息至基本输入输出系统,以通过基本输入输出系统上报至对应的应用(如电脑管家),进而通过对应的应用上传至后台,以便及时通知到后台工作人员。In the embodiment of the present application, the embedded controller can determine the adapter failure according to the adjusted parameters and the adapter charging failure. When the adapter fails, the embedded controller can output the fault information to the basic input and output system, so as to report it to the corresponding application (such as computer manager) through the basic input and output system, and then upload it to the background through the corresponding application, so as to notify the background staff in time.
本申请实施例提供的充电异常处理方法包括但不限于如下技术效果:The charging abnormality handling method provided by the embodiments of this application includes but is not limited to the following technical effects:
本申请实施例在电子设备通过适配器充电时,电子设备可以自动检测适配器断充故障,并在适配器断充时通过灵活调整第一时间参数、第一电流参数以及第二时间参数对应的数值,为当下电子设备和适配器之间的充电配置最合适的参数数值,以修复适配器断充。In the embodiment of the present application, when the electronic device is charged through the adapter, the electronic device can automatically detect the adapter charging failure, and flexibly adjust the values corresponding to the first time parameter, the first current parameter and the second time parameter when the adapter is disconnected, as The current charging configuration between the electronic device and the adapter has the most appropriate parameter values to repair the adapter's disconnected charging.
请参阅图6,示例性介绍本申请实施例提供的另一种充电异常处理方法流程,该充电异常处理方法可以应用于上述电子设备,具体地,可以由嵌入式控制器执行。该方法流程包括步骤S601至步骤S606。其中,步骤S602的内容可以参考上述步骤S509和步骤S510,步骤S603的内容可以参考上述步骤S511,步骤S604的内容可以参考上述步骤S512,在此不再赘述。Please refer to Figure 6, which exemplarily introduces another charging exception handling method flow provided in an embodiment of the present application. The charging exception handling method can be applied to the above-mentioned electronic device, and specifically, can be executed by an embedded controller. The method flow includes steps S601 to S606. Among them, the content of step S602 can refer to the above-mentioned steps S509 and S510, the content of step S603 can refer to the above-mentioned step S511, and the content of step S604 can refer to the above-mentioned step S512, which will not be repeated here.
步骤S601,在适配器断充时,嵌入式控制器自适应调整第一时间参数、第一电流参数和第二时间参数中的一个或多个。Step S601: When the adapter is disconnected from charging, the embedded controller adaptively adjusts one or more of the first time parameter, the first current parameter, and the second time parameter.
在本申请实施例中,嵌入式控制器可以实时获取电源充电芯片所获得的充电电压,并根据充电电压确定适配器是否断充。在另一些实施例中,嵌入式控制器可以根据充电管理芯片通知的适配器在位情况确定适配器是否断充。具体地,在适配器插入外部接口,外部接口向充电管理芯片通知充电管理芯片电平变化和充电电压,根据电平变化确定外部接口有插入事件,根据充电电压确定有适配器插入外部接口,进而充电管理芯片确定适配器在位。充电管理芯片向嵌入式控制器通知适配器在位情况,进而嵌入式控制器可以根据适配器在位情况确实适配器是否断充。In this embodiment of the present application, the embedded controller can obtain the charging voltage obtained by the power charging chip in real time, and determine whether the adapter has stopped charging based on the charging voltage. In other embodiments, the embedded controller may determine whether the adapter is disconnected from charging based on the presence status of the adapter notified by the charging management chip. Specifically, when the adapter is inserted into the external interface, the external interface notifies the charging management chip of the level change and charging voltage of the charging management chip. According to the level change, it is determined that there is an insertion event in the external interface. According to the charging voltage, it is determined that the adapter is inserted into the external interface, and then the charging management is performed. The chip confirms that the adapter is in place. The charging management chip notifies the embedded controller of the presence of the adapter, and the embedded controller can determine whether the adapter is disconnected from charging based on the presence of the adapter.
可以理解,嵌入式控制器还可以根据其他方式确定适配器是否断充,本申请实施例对此不作具体限定。It can be understood that the embedded controller can also determine whether the adapter is out of charge in other ways, which is not specifically limited in the embodiments of this application.
在本申请实施例中,嵌入式控制器调整第一参数包括但不限于:增加第一时间参数的数值、减小第一电流参数的数值和提高第二时间参数的档位。嵌入式控制器自适应进行如下操作中的一个或多个:增加第一时间参数的数值、减小第一电流参数的数值和提高第二时间参数的档位。In this embodiment of the present application, the embedded controller adjusting the first parameter includes but is not limited to: increasing the value of the first time parameter, decreasing the value of the first current parameter, and increasing the gear of the second time parameter. The embedded controller adaptively performs one or more of the following operations: increasing the value of the first time parameter, decreasing the value of the first current parameter, and increasing the gear of the second time parameter.
请一并参阅图3,示例性介绍本申请实施例提供的调整第一参数的原理。Please refer to Figure 3 as well, for an exemplary introduction to the principle of adjusting the first parameter provided by the embodiment of the present application.
在本申请实施例中,若没有调整第一参数,如增加第一时间参数TDebounce time的数值、减小第一电流参数的数值或提高第二时间参数的档位,则一旦充电电压VBUS小于或等于第一电压门限值VPD,且充电电压VBUS小于或等于第一电压门限值VPD的持续时间大于或等于第一时间参数TDebounce time的原数值,电源充电芯片就会复位适配器,导致适配器断充,适配器无法为电子设备提供更多的能量。同时,若充电管理芯片响应速度慢,此时电子设备的电池也无法及时为电子设备供电,影响电子设备的正常运行。In the embodiment of the present application, if the first parameter is not adjusted, such as increasing the value of the first time parameter TDebounce time, reducing the value of the first current parameter, or increasing the gear of the second time parameter, once the charging voltage VBUS is less than or is equal to the first voltage threshold value VPD, and the charging voltage VBUS is less than or equal to the first voltage threshold value VPD and the duration is greater than or equal to the original value of the first time parameter TDebounce time, the power charging chip will reset the adapter, causing the adapter to disconnect Charging, the adapter cannot provide more energy to electronic devices. At the same time, if the response speed of the charging management chip is slow, the battery of the electronic device will not be able to power the electronic device in time, affecting the normal operation of the electronic device.
在本申请实施例中,相对于未增加第一时间参数TDebounce time的数值,在嵌入式控制器增加第一时间参数TDebounce time的数值,电源充电芯片根据第一时间参数TDebounce time增加后的数值运行时,则在充电电压VBUS小于第一电压门限值VPD后,电源充电芯片需要更多时间才能输出复位信号至适配器。也即增加第一时间参数TDebouncetime的数值后,可以降低电源充电芯片输出复位信号的频率,相应地减少适配器断充的频率。In the embodiment of the present application, compared to the value of the first time parameter TDebounce time that is not increased, the value of the first time parameter TDebounce time is increased in the embedded controller, and the power charging chip operates according to the increased value of the first time parameter TDebounce time. , after the charging voltage VBUS is less than the first voltage threshold value VPD, the power charging chip needs more time to output the reset signal to the adapter. That is to say, increasing the value of the first time parameter TDebouncetime can reduce the frequency of the reset signal output by the power charging chip, and accordingly reduce the frequency of the adapter charging interruption.
进一步地,如图3所示,在增加第一时间参数TDebounce time的数值后,可以使得充电电流IBUS上升得更多,也即可以让适配器为电子设备提供更多的电能,保证适配器的输出能力以及电子设备的正常运行。Further, as shown in Figure 3, after increasing the value of the first time parameter TDebounce time, the charging current IBUS can be increased even more, which means that the adapter can provide more power for electronic devices and ensure the output capability of the adapter. and the proper functioning of electronic equipment.
进一步地,当充电电流IBUS持续上升到大于或等于第一电流参数ILIM2时,基于充电管理芯片的响应速度慢,充电管理芯片可能无法及时响应。而在增加第一时间参数TDebounce time的数值后,可以为充电管理芯片提供更多的时间去响应。也即延迟复位,则可以增大充电管理芯片触发适配器降低充电电流IBUS的概率和触发电池输出电能的概率。在适配器降低充电电流IBUS后,适配器的充电电压VBUS上升,进而充电电压VBUS可以大于第一电压门限值VPD,由此恢复断充,同时电池输出电能可以保证电子设备的正常运行。Further, when the charging current IBUS continues to rise to be greater than or equal to the first current parameter ILIM2, the charging management chip may not respond in time due to the slow response speed of the charging management chip. After increasing the value of the first time parameter TDebounce time, more time can be provided for the charging management chip to respond. That is, delayed reset can increase the probability that the charging management chip triggers the adapter to reduce the charging current IBUS and triggers the battery to output electric energy. After the adapter reduces the charging current IBUS, the charging voltage VBUS of the adapter rises, and the charging voltage VBUS can be greater than the first voltage threshold value VPD, thereby resuming charging interruption, and at the same time, the battery outputs electric energy to ensure the normal operation of the electronic device.
在本申请实施例中,在减小第一电流参数ILIM2的数值后,可以更快触发充电管理芯片限制充电电流IBUS,也即更快地触发充电管理芯片输出控制指令至适配器,以使得适配器降低充电电流IBUS。当充电电流IBUS降低后,相应地,适配器的充电电压VBUS上升,上升后的充电电压VBUS就可以大于第一电压门限值VPD,进而使得电源充电芯片输出复位信号至适配器的条件不满足,也即适配器断充恢复。In the embodiment of the present application, after reducing the value of the first current parameter ILIM2, the charging management chip can be triggered to limit the charging current IBUS more quickly, that is, the charging management chip can be triggered to output a control instruction to the adapter more quickly, so that the adapter reduces the charging current IBUS. When the charging current IBUS is reduced, the charging voltage VBUS of the adapter rises accordingly, and the rising charging voltage VBUS can be greater than the first voltage threshold value VPD, thereby making the condition for the power charging chip to output a reset signal to the adapter unsatisfied, that is, the adapter is disconnected and restored.
进一步地,在减小第一电流参数ILIM2的数值后,可以更快触发充电管理芯片控制电池输出电能,由此可以更快地为电子设备提供电能,保证电子设备的正常运行。Furthermore, after reducing the value of the first current parameter ILIM2, the charge management chip can be triggered faster to control the battery to output electric energy, thereby providing electric energy to the electronic device faster and ensuring the normal operation of the electronic device.
在本申请实施例中,在提高第二时间参数TICRIT Debounce time的档位后,则充电管理芯片触发处理器限频的概率下降,为响应速度慢的充电管理芯片提供更多时间进行响应。也即延迟处理器降频,则可以增大充电管理芯片触发适配器降低充电电流IBUS的概率和触发电池输出电能的概率。在适配器降低充电电流IBUS后,适配器的充电电压VBUS上升,进而充电电压VBUS可以大于第一电压门限值VPD,由此恢复断充,同时电池输出电能可以保证电子设备的正常运行。In an embodiment of the present application, after increasing the gear position of the second time parameter TICRIT Debounce time, the probability of the charging management chip triggering the processor frequency limiting decreases, providing more time for the slow-responding charging management chip to respond. That is, by delaying the processor frequency reduction, the probability of the charging management chip triggering the adapter to reduce the charging current IBUS and the probability of triggering the battery to output electrical energy can be increased. After the adapter reduces the charging current IBUS, the charging voltage VBUS of the adapter rises, and then the charging voltage VBUS can be greater than the first voltage threshold value VPD, thereby restoring the charging interruption, and at the same time, the battery output power can ensure the normal operation of the electronic device.
步骤S602,嵌入式控制器将调整后的第一参数传输至对应的芯片,以使得对应的芯片根据调整后的第一参数运行。Step S602: The embedded controller transmits the adjusted first parameter to the corresponding chip, so that the corresponding chip operates according to the adjusted first parameter.
在本申请实施例中,嵌入式控制器调整第一时间参数、第一电流参数和第二时间参数中的一个或多个,则对应的芯片可以为充电管理芯片和电源充电芯片中的一个或多个。当对应的芯片包括电源充电芯片时,将调整后的第一时间参数传输给电源充电芯片。当对应的芯片包括充电管理芯片时,将调整后的第一电流参数和第二时间参数中的一个或多个传输给充电管理芯片。In the embodiment of the present application, the embedded controller adjusts one or more of the first time parameter, the first current parameter and the second time parameter, and the corresponding chip can be one of a charging management chip and a power charging chip or Multiple. When the corresponding chip includes a power charging chip, the adjusted first time parameters are transmitted to the power charging chip. When the corresponding chip includes a charging management chip, one or more of the adjusted first current parameters and second time parameters are transmitted to the charging management chip.
步骤S603,在调整第一参数后,嵌入式控制器获取适配器的断充情况。Step S603: After adjusting the first parameter, the embedded controller obtains the charging and disconnection status of the adapter.
在本申请实施例中,嵌入式控制器调整第一参数的数值后,对应的芯片根据该调整后的第一参数的数值运行,然后嵌入式控制器可以根据充电电压确定适配器的断充情况。当充电电压由小于或等于第一电压门限值变为大于第一电压门限值,则断充情况为断充恢复。当充电电压一直处于小于或等于第一电压门限值,则断充情况为断充未恢复。In this embodiment of the present application, after the embedded controller adjusts the value of the first parameter, the corresponding chip operates according to the adjusted value of the first parameter, and then the embedded controller can determine the charging status of the adapter according to the charging voltage. When the charging voltage changes from less than or equal to the first voltage threshold value to greater than the first voltage threshold value, the charging interruption situation is a charging interruption recovery. When the charging voltage is always less than or equal to the first voltage threshold value, the charging interruption situation is that charging is not resumed.
步骤S604,在断充情况为断充恢复时,嵌入式控制器将调整后的第一参数写入对应的固件。Step S604: When the charging interruption situation is a charging interruption recovery, the embedded controller writes the adjusted first parameter into the corresponding firmware.
步骤S605,在断充情况为断充未恢复时,嵌入式控制器判断当前第一时间参数以及当前第一电流参数是否均超出对应的规格范围。Step S605 , when the charging interruption condition is that the charging is interrupted and not restored, the embedded controller determines whether the current first time parameter and the current first current parameter are both beyond the corresponding specification range.
在断充情况为断充未恢复时,嵌入式控制器判断当前第一时间参数是否超出第一规格范围以及当前第一电流参数是否超出第二规格范围。若当前第一时间参数超出第一规格范围且当前第一电流参数超出第二规格范围,嵌入式控制器执行步骤S606。在未符合当前第一时间参数超出第一规格范围且当前第一电流参数超出第二规格范围的条件下,嵌入式控制器重复执行步骤S601。也即若当前第一时间参数未超出第一规格范围,或,当前第一电流参数未超出第二规格范围,或,当前第一时间参数未超出第一规格范围且当前第一电流参数未超出第二规格范围,嵌入式控制器重复执行步骤S601。When the charging is disconnected and not restored, the embedded controller determines whether the current first time parameter exceeds the first specification range and whether the current first current parameter exceeds the second specification range. If the current first time parameter exceeds the first specification range and the current first current parameter exceeds the second specification range, the embedded controller executes step S606. Under the condition that the current first time parameter exceeds the first specification range and the current first current parameter exceeds the second specification range, the embedded controller repeats step S601. That is, if the current first time parameter does not exceed the first specification range, or the current first current parameter does not exceed the second specification range, or the current first time parameter does not exceed the first specification range and the current first current parameter does not exceed the second specification range, the embedded controller repeats step S601.
可以理解,在执行步骤S605时,若嵌入式控制器仅调整过第一时间参数或仅调整过第一电流参数,则显然另一未调整的参数未超出对应的规格范围,也即未符合当前第一时间参数以及当前第一电流参数均超出对应的规格范围,由此重复执行步骤S601。It can be understood that when performing step S605, if the embedded controller has only adjusted the first time parameter or only adjusted the first current parameter, it is obvious that the other unadjusted parameter does not exceed the corresponding specification range, that is, it does not meet the current Both the first time parameter and the current first current parameter exceed the corresponding specification range, so step S601 is repeatedly executed.
其中,当前第一时间参数即当前时刻如执行步骤S605时的第一时间参数的数值,相应地,当前第一电流参数当前时刻如执行步骤S605时的第一电流参数的数值。当前第一时间参数或当前第一电流参数可以为进行参数调整后在执行步骤S605时的数值也可以为尚未调整过的原固定值。The current first time parameter is the value of the first time parameter at the current moment such as when step S605 is executed, and correspondingly, the current first current parameter is the value of the first current parameter at the current moment such as when step S605 is executed. The current first time parameter or the current first current parameter can be the value after parameter adjustment when step S605 is executed, or it can be the original fixed value that has not been adjusted.
可以理解,在嵌入式控制器重复执行步骤S601时,嵌入式控制器调整的第一参数可以与此前所调整的第一参数相同或不同。例如,以嵌入式控制器调整第一时间参数为例,在嵌入式控制器执行到步骤S605后需要重复执行步骤S601时,嵌入式控制器可以继续调整第一时间参数,也可以调整第一电流参数或调整第二时间参数。It can be understood that when the embedded controller repeatedly executes step S601, the first parameter adjusted by the embedded controller may be the same as or different from the first parameter adjusted previously. For example, taking the embedded controller adjusting the first time parameter as an example, when the embedded controller needs to repeat step S601 after executing step S605, the embedded controller can continue to adjust the first time parameter or adjust the first current. parameter or adjust the second time parameter.
需要说明的是,在嵌入式控制器调整第一参数至嵌入式控制器获取对应芯片根据调整后的第一参数运行后适配器的断充情况期间,如上述步骤S601至步骤S603器件,针对某一第一参数,仅调整一次该第一参数的数值。换句话说,针对某一第一参数,调整该第一参数的数值后,对应的芯片就根据该调整后的第一参数的数值运行,然后嵌入式控制器获取适配器的断充情况,在断充未恢复时,针对该第一参数才可以进行下一次的数值调整。It should be noted that during the period when the embedded controller adjusts the first parameter to the embedded controller to obtain the disconnection and charging status of the adapter after the corresponding chip operates according to the adjusted first parameter, as described above in step S601 to step S603, for a certain device, The first parameter, adjust the value of the first parameter only once. In other words, for a certain first parameter, after adjusting the value of the first parameter, the corresponding chip will operate according to the value of the adjusted first parameter, and then the embedded controller obtains the disconnection and charging status of the adapter, and when the value is disconnected, When the charge is not restored, the next value adjustment can be made for the first parameter.
步骤S606,嵌入式控制器确定适配器故障,并输出故障信息至基本输入输出系统。Step S606: The embedded controller determines that the adapter is faulty and outputs the fault information to the basic input and output system.
在本申请实施例中,嵌入式控制器确定适配器故障时,嵌入式控制器可以先将故障信息上报至后台,再将故障信息上报至电脑管家。In the embodiment of this application, when the embedded controller determines that the adapter is faulty, the embedded controller can first report the fault information to the background, and then report the fault information to the computer manager.
本申请实施例提供的充电异常处理方法包括但不限于如下技术效果:The charging abnormality handling method provided by the embodiments of this application includes but is not limited to the following technical effects:
本申请实施例在适配器断充时,嵌入式控制器通过灵活调整第一时间参数、第一电流参数以及第二时间参数对应的数值,为当下情形配置最合适的参数数值,以修复适配器断充,同时还可以保证电子设备的正常运行。In the embodiment of the present application, when the adapter fails to charge, the embedded controller flexibly adjusts the values corresponding to the first time parameter, the first current parameter, and the second time parameter to configure the most appropriate parameter values for the current situation to repair the adapter failure while ensuring the normal operation of the electronic device.
在一些实施例中,嵌入式控制器可以根据预设规则调整第一参数。具体地,嵌入式控制器根据第一预设规则增加第一时间参数,和/或,嵌入式控制器根据第二预设规则减小第一电流参数,和/或,嵌入式控制器根据第三预设规则增加第二时间参数。其中第一预设规则、第二预设规则以及第三预设规则可以相同也可以不同。In some embodiments, the embedded controller may adjust the first parameter according to preset rules. Specifically, the embedded controller increases the first time parameter according to the first preset rule, and/or the embedded controller decreases the first current parameter according to the second preset rule, and/or the embedded controller increases the first time parameter according to the second preset rule. Three preset rules add a second time parameter. The first preset rule, the second preset rule and the third preset rule may be the same or different.
在本申请实施例中,嵌入式控制器根据第一预设规则增加第一时间参数包括:嵌入式控制器获取第一调整值,并将当前第一时间参数的数值增加第一调整值,得到调整后的第一时间参数。其中当前第一时间参数的数值即在增加第一时间参数时所获得的第一时间参数的数值,其可以为尚未调整的第一时间参数的原固定值,也可以为上一次调整后所得到的调整后的第一时间参数的数值,第一调整值为当前差值的预设百分比,当前差值为将第一时间参数的规格范围内的最大值减去当前第一时间参数的数值所得到的差值。In the embodiment of the present application, the embedded controller increasing the first time parameter according to the first preset rule includes: the embedded controller obtains the first adjustment value, and increases the current value of the first time parameter by the first adjustment value, obtaining Adjusted first time parameters. The current value of the first time parameter is the value of the first time parameter obtained when the first time parameter is added. It can be the original fixed value of the first time parameter that has not yet been adjusted, or it can be the value obtained after the last adjustment. The value of the adjusted first time parameter. The first adjustment value is the preset percentage of the current difference. The current difference is the maximum value within the specification range of the first time parameter minus the current value of the first time parameter. the difference obtained.
在本申请实施例中,嵌入式控制器根据第二预设规则减小第一电流参数包括:嵌入式控制器获取第二调整值,并将当前第一电流参数的数值减去第二调整值,得到调整后的第一时间参数。其中当前第一电流参数的数值即在减小第一电流参数时所获得的第一电流参数的数值,其可以为尚未调整的第一电流参数的原固定值,也可以为上一次调整后所得到的调整后的第一电流参数的数值,第二调整值为当前差值的预设百分比,当前差值为将第一电流参数的规格范围内的最大值减去当前第一电流参数的数值所得到的差值。In an embodiment of the present application, the embedded controller reduces the first current parameter according to the second preset rule, including: the embedded controller obtains the second adjustment value, and subtracts the second adjustment value from the current value of the first current parameter to obtain the adjusted first time parameter. The current value of the first current parameter is the value of the first current parameter obtained when the first current parameter is reduced, which can be the original fixed value of the first current parameter that has not been adjusted, or the value of the adjusted first current parameter obtained after the last adjustment, the second adjustment value is a preset percentage of the current difference, and the current difference is the difference obtained by subtracting the current value of the first current parameter from the maximum value within the specification range of the first current parameter.
其中,第三预设规则可以为依次提高第二时间参数的档位。嵌入式控制器根据第三预设规则增加第二时间参数包括:可以将第二时间参数的当前档位提高至下一个档位。The third preset rule may be to increase the gear of the second time parameter in sequence. The embedded controller increases the second time parameter according to the third preset rule, including: increasing the current gear of the second time parameter to the next gear.
其中,预设百分比可以为百分之三、百分之四以及百分之五等,本申请对此不作具体限定。第一调整值所对应的预设百分比可以与第二调整值所对应的百分比相同或不同,本申请对此不作具体限定。The preset percentage may be 3%, 4%, 5%, etc., which is not specifically limited in this application. The preset percentage corresponding to the first adjustment value may be the same as or different from the percentage corresponding to the second adjustment value, which is not specifically limited in this application.
在本申请实施例中,嵌入式控制器根据对应的预设规则调整对应的第一参数,对应的芯片根据调整后的第一参数的数值运行,在适配器断充未恢复时,嵌入式控制器又根据对应的预设规则调整对应的第一参数,依次类推。示例性地,以当前第一时间参数的数值为2s为例,第一规格范围内最大值为6s,预设百分比为5%为例,计算得到第一调整值为,则嵌入式控制器增加第一时间参数后的数值为2s +0.2s=2.2s,电源充电芯片根据第一时间参数的数值为2.2s运行。检测到以第一时间参数的数值为2.2s运行适配器断充仍未恢复,则嵌入式控制器又根据对应的预设规则调整对应的第一参数,当前第一时间参数的数值为上一次调整后的数值2.2s,计算得到第一调整值为/>,则嵌入式控制器增加第一时间参数后的数值为2.2s +0.19s=2.39s,电源充电芯片根据第一时间参数的数值2.39s运行,依次类推。In the embodiment of the present application, the embedded controller adjusts the corresponding first parameter according to the corresponding preset rule, and the corresponding chip operates according to the value of the adjusted first parameter. When the adapter is disconnected and charging has not been restored, the embedded controller Then adjust the corresponding first parameter according to the corresponding preset rule, and so on. For example, taking the current value of the first time parameter as 2s, the maximum value within the first specification range as 6s, and the preset percentage as 5%, the first adjustment value is calculated as , then the value after the embedded controller adds the first time parameter is 2s +0.2s=2.2s, and the power charging chip operates according to the value of the first time parameter which is 2.2s. It is detected that the running adapter with the value of the first time parameter is 2.2s and has not recovered after being disconnected and charged. The embedded controller adjusts the corresponding first parameter according to the corresponding preset rules. The current value of the first time parameter is the last adjustment. After 2.2s, the first adjustment value is calculated as/> , then the value after the embedded controller adds the first time parameter is 2.2s +0.19s=2.39s, and the power charging chip operates according to the value of the first time parameter 2.39s, and so on.
请参阅图7,示例性介绍本申请实施例提供的调整第一参数的方法流程,该充电异常处理方法可以应用于上述电子设备,具体地,可以由嵌入式控制器执行。该方法流程包括步骤S701至步骤S713,其中步骤S701至步骤S704的内容、步骤S706至步骤S709、步骤S711至步骤S716的内容可以参考上述,在此不再赘述。Please refer to FIG. 7 for an exemplary introduction to the method flow of adjusting the first parameter provided by the embodiment of the present application. The charging abnormality processing method can be applied to the above-mentioned electronic device, and specifically, can be executed by an embedded controller. The method flow includes steps S701 to step S713. The content of steps S701 to step S704, step S706 to step S709, and step S711 to step S716 can be referred to the above, and will not be described again here.
步骤S701,嵌入式控制器根据第一预设规则增加第一时间参数。Step S701: The embedded controller adds a first time parameter according to a first preset rule.
步骤S702,嵌入式控制器将增加后的第一时间参数传输至电源充电芯片,以使得电源充电芯片根据增加后的第一时间参数运行。In step S702, the embedded controller transmits the increased first time parameter to the power charging chip, so that the power charging chip operates according to the increased first time parameter.
步骤S703,在增加第一时间参数后,嵌入式控制器获取适配器的断充情况。Step S703: After adding the first time parameter, the embedded controller obtains the charging disconnection status of the adapter.
步骤S704,在断充情况为断充恢复时,嵌入式控制器将调整后的第一时间参数写入电源充电芯片的固件。Step S704: When the charging interruption situation is a charging interruption recovery, the embedded controller writes the adjusted first time parameters into the firmware of the power charging chip.
步骤S705,在断充情况为断充未恢复时,嵌入式控制器判断调整第一时间参数的次数是否达到第一阈值。Step S705: When the charging situation is that charging has not been restored, the embedded controller determines whether the number of times of adjusting the first time parameter reaches the first threshold.
在本申请实施例中,针对每一第一参数,为其设置调整次数阈值。为第一时间参数设置第一阈值。第一阈值用于指示当持续调整第一时间参数的次数达到第一阈值且断充情况未恢复,则调整除第一时间参数之外的其他第一参数,如第一电流参数或第二时间参数。第一阈值大于或等于1。In this embodiment of the present application, for each first parameter, an adjustment number threshold is set. Set a first threshold for the first time parameter. The first threshold is used to indicate that when the number of times of continuous adjustment of the first time parameter reaches the first threshold and the charging situation is not restored, other first parameters other than the first time parameter, such as the first current parameter or the second time, are adjusted. parameter. The first threshold is greater than or equal to 1.
在本申请实施例中,在调整第一时间参数的同时,嵌入式控制器累计调整第一时间参数的次数,以在调整第一时间参数后检测到断充情况为断充未恢复,判断调整第一时间参数的次数是否达到第一阈值。若否,嵌入式控制器重复执行步骤S701。若是,嵌入式控制器可以对除第一时间参数之外的其他第一参数进行调整,如嵌入式控制器执行步骤S706。In the embodiment of the present application, while adjusting the first time parameter, the embedded controller accumulates the number of times the first time parameter is adjusted, so that after adjusting the first time parameter, the interruption of charging is detected as the interruption of charging has not been restored, and the adjustment is determined. Whether the number of times of the first time parameter reaches the first threshold. If not, the embedded controller repeats step S701. If so, the embedded controller can adjust other first parameters except the first time parameter, such as the embedded controller executing step S706.
在一些实施例中,在嵌入式控制器调整除第一时间参数之外的其他第一参数时,可以将所记录的调整第一时间参数的次数清零,以便下一次调整第一时间参数时,可以重新统计调整第一时间参数的次数。In some embodiments, when the embedded controller adjusts other first parameters except the first time parameter, the recorded number of times the first time parameter is adjusted can be cleared so that the number of times the first time parameter is adjusted can be re-counted the next time the first time parameter is adjusted.
步骤S706,嵌入式控制器根据第二预设规则降低第一电流参数。Step S706: The embedded controller reduces the first current parameter according to the second preset rule.
步骤S707,嵌入式控制器将降低后的第一电流参数传输至充电管理芯片,以使得充电管理芯片根据降低后的第一电流参数运行。In step S707, the embedded controller transmits the reduced first current parameter to the charging management chip, so that the charging management chip operates according to the reduced first current parameter.
步骤S708,在降低第一电流参数后,嵌入式控制器获取适配器的断充情况。Step S708: After reducing the first current parameter, the embedded controller obtains the charging disconnection status of the adapter.
步骤S709,在断充情况为断充恢复时,嵌入式控制器将调整后的第一参数写入对应芯片的固件。Step S709: When the charging interruption situation is a charging interruption recovery, the embedded controller writes the adjusted first parameter into the firmware of the corresponding chip.
在步骤S709中调整后的第一参数可以包括调整后的第一时间参数和调整后的第一电流参数。步骤S709具体可以包括:在断充恢复时,将充电管理芯片和电源充电芯片中所运行的第一参数的数值写入对应芯片的固件。The adjusted first parameter in step S709 may include the adjusted first time parameter and the adjusted first current parameter. Step S709 may specifically include: writing the value of the first parameter running in the charging management chip and the power charging chip into the firmware of the corresponding chip when the charging is resumed.
步骤S710,在断充情况为断充未恢复时,嵌入式控制器判断调整第一电流参数的次数是否达到第二阈值。Step S710: When the charging interruption situation is that the charging interruption has not been restored, the embedded controller determines whether the number of times of adjusting the first current parameter reaches the second threshold.
在本申请实施例中,为第一电流参数设置第二阈值。第二阈值用于指示当持续调整第一电流参数的次数达到第二阈值且断充情况未恢复,则调整除第一电流参数之外的其他第一参数,如第一时间参数或第二时间参数。第二阈值大于或等于1。In this embodiment of the present application, a second threshold is set for the first current parameter. The second threshold is used to indicate that when the number of times of continuous adjustment of the first current parameter reaches the second threshold and the charge interruption situation is not restored, other first parameters other than the first current parameter, such as the first time parameter or the second time, are adjusted. parameter. The second threshold is greater than or equal to 1.
在本申请实施例,在调整第一电流参数的同时,嵌入式控制器累计调整第一电流参数的次数,以在调整第一电流参数后检测到断充情况为断充未恢复,判断调整第一电流参数的次数是否达到第二阈值。若否,嵌入式控制器重复执行步骤S706。若是,嵌入式控制器可以对除第一电流参数之外的其他第一参数进行调整,如嵌入式控制器执行步骤S701,或执行步骤S713,也可以判断所调整的参数是否超出对应的规格,如嵌入式控制器执行步骤S711。In the embodiment of the present application, while adjusting the first current parameter, the embedded controller accumulates the number of times the first current parameter is adjusted, so that after adjusting the first current parameter, the discontinuation of charging is detected as the discontinuation of charging and unrecovered charging, and it is determined that the first current parameter has been adjusted. Whether the number of times of a current parameter reaches the second threshold. If not, the embedded controller repeats step S706. If so, the embedded controller can adjust other first parameters except the first current parameter. For example, the embedded controller performs step S701 or step S713, and can also determine whether the adjusted parameter exceeds the corresponding specification. For example, the embedded controller executes step S711.
在一些实施例中,在嵌入式控制器调整除第一电流参数之外的其他第一参数时,可以将所记录的调整第一电流参数的次数清零,以便下一次调整第一电流参数时,可以重新统计调整第一电流参数的次数。In some embodiments, when the embedded controller adjusts other first parameters except the first current parameter, the recorded number of times of adjusting the first current parameter can be cleared so that the next time the first current parameter is adjusted , the number of times of adjusting the first current parameter can be re-counted.
步骤S711,嵌入式控制器判断当前第一时间参数和当前第一电流参数是否均超过对应的规格范围。Step S711, the embedded controller determines whether the current first time parameter and the current first current parameter both exceed the corresponding specification range.
若当前第一时间参数和当前第一电流参数均超过对应的规格范围,嵌入式控制器执行步骤S712。若未符合当前第一时间参数和当前第一电流参数均超过对应的规格范围,嵌入式控制器可以执行步骤S713或执行步骤S701或执行步骤S706。If both the current first time parameter and the current first current parameter exceed the corresponding specification range, the embedded controller executes step S712. If both the current first time parameter and the current first current parameter do not meet the corresponding specification range, the embedded controller may execute step S713, step S701, or step S706.
在一些实施例中,可以加大调整第一时间参数和第一电流参数的比重。以第一参数的调整阶段包括开始调整第一参数至初次结束该第一参数的调整。示例性地,第一时间参数的调整阶段包括步骤S701至步骤S705的判断结果为是。相应地,第一电流参数的调整阶段包括步骤S706至步骤S710的判断结果为是。In some embodiments, the proportion of adjusting the first time parameter and the first current parameter may be increased. The adjustment phase of the first parameter includes starting to adjust the first parameter and ending the adjustment of the first parameter for the first time. Illustratively, the adjustment stage of the first time parameter includes steps S701 to S705, and the judgment result is yes. Correspondingly, the adjustment stage of the first current parameter includes steps S706 to S710 and the determination result is yes.
在第一时间参数和第一电流参数均经过一个调整阶段后,可以继续重复执行对第一时间参数和第一电流参数中的一个或两个的调整,以在重复第一时间参数的调整阶段和/或重复第一电流参数的调整阶段的次数达到预设次数阈值,且断充未恢复时,执行对第二时间参数的调整。其中,预设次数阈值可以为2、3等。After both the first time parameter and the first current parameter have gone through an adjustment stage, the adjustment of one or both of the first time parameter and the first current parameter may continue to be repeatedly performed to repeat the adjustment stage of the first time parameter. And/or when the number of times the adjustment phase of the first current parameter is repeated reaches the preset times threshold and charging is not resumed, the adjustment of the second time parameter is performed. Among them, the preset times threshold can be 2, 3, etc.
在一些实施例中,重复第一时间参数调整阶段的次数达到预设次数阈值时,可以确保调整后的第一时间参数未超出第一规格范围。相应地,重复第一电流参数的调整阶段的次数达到预设次数阈值时,可以确保调整后的第一电流参数未超出第二规格范围。In some embodiments, when the number of times the first time parameter adjustment phase is repeated reaches a preset number threshold, it can be ensured that the adjusted first time parameter does not exceed the first specification range. Correspondingly, when the number of times of repeating the adjustment phase of the first current parameter reaches the preset number threshold, it can be ensured that the adjusted first current parameter does not exceed the second specification range.
若是,步骤S712,嵌入式控制器确定适配器故障,输出故障信息至基本输入输出系统。If so, in step S712, the embedded controller determines that the adapter is faulty and outputs the fault information to the basic input and output system.
若否,步骤S713,嵌入式控制器根据第三预设规则增加第二时间参数。If not, in step S713, the embedded controller adds the second time parameter according to the third preset rule.
步骤S714,嵌入式控制器将增加后的第二时间参数传输至充电管理芯片,以使得充电管理芯片根据增加后的第二时间参数运行。In step S714, the embedded controller transmits the increased second time parameter to the charging management chip, so that the charging management chip operates according to the increased second time parameter.
步骤S715,在增加第二时间参数后,嵌入式控制器获取适配器的断充情况。Step S715, after adding the second time parameter, the embedded controller obtains the charging disconnection status of the adapter.
步骤S716,在断充情况为断充恢复时,嵌入式控制器将调整后的第一参数写入电源充电芯片的固件。Step S716: When the charging interruption situation is a charging interruption recovery, the embedded controller writes the adjusted first parameter into the firmware of the power charging chip.
步骤S717,在断充情况为断充未恢复时,嵌入式控制器判断调整第二时间参数的次数是否达到第三阈值。Step S717, when the charging interruption condition is that the charging is interrupted and not restored, the embedded controller determines whether the number of times the second time parameter is adjusted reaches a third threshold.
在本申请实施例中,为第二时间参数设置第三阈值。第三阈值用于指示当持续调整第二时间参数的次数达到第三阈值且断充情况未恢复,则调整除第二时间参数之外的其他第一参数,如第一时间参数或第一电流参数。第三阈值大于或等于1。In this embodiment of the present application, a third threshold is set for the second time parameter. The third threshold is used to indicate that when the number of times of continuous adjustment of the second time parameter reaches the third threshold and the charging situation is not restored, other first parameters other than the second time parameter, such as the first time parameter or the first current, are adjusted. parameter. The third threshold is greater than or equal to 1.
在本申请实施例,在调整第二时间参数的同时,嵌入式控制器累计调整第二时间参数的次数,以在调整第二时间参数后检测到断充情况为断充未恢复,判断调整第二时间参数的次数是否达到第三阈值。若否,嵌入式控制器重复执行步骤S713。若是,嵌入式控制器可以对除第二时间参数之外的其他第一参数进行调整,如嵌入式控制器执行步骤S701,或执行步骤S706。In the embodiment of the present application, while adjusting the second time parameter, the embedded controller accumulates the number of times the second time parameter is adjusted, so that after adjusting the second time parameter, the interruption of charging is detected as the interruption of charging has not been restored, and it is judged to adjust the second time parameter. Whether the number of times of the second time parameter reaches the third threshold. If not, the embedded controller repeats step S713. If so, the embedded controller can adjust other first parameters except the second time parameter, such as the embedded controller performing step S701 or step S706.
在一些实施例中,在嵌入式控制器调整除第二时间参数之外的其他第一参数时,可以将所记录的调整第二时间参数的次数清零,以便下一次调整第二时间参数时,可以重新统计调整第二时间参数的次数。In some embodiments, when the embedded controller adjusts other first parameters except the second time parameter, the recorded number of times of adjusting the second time parameter can be cleared so that the next time the second time parameter is adjusted, , the number of times of adjusting the second time parameter can be re-counted.
在一些实施例中,可以将第一阈值和/或第二阈值设置为大于或等于2,以加大嵌入式控制器调整第一时间参数和/或第一电流参数的比例,优先通过调整第一时间参数和/或第一电流参数来修复适配器断充。其中,第一阈值与第二阈值可以相同或不同,本申请实施例对此不作具体限定。In some embodiments, the first threshold and/or the second threshold can be set to be greater than or equal to 2 to increase the proportion of the embedded controller adjusting the first time parameter and/or the first current parameter, giving priority to adjusting the first time parameter and/or the first current parameter. A time parameter and/or a first current parameter are used to repair adapter disconnection. The first threshold and the second threshold may be the same or different, and this is not specifically limited in the embodiments of the present application.
在一些实施例中,在步骤S704、步骤S709或步骤S716中断充情况为断充恢复时,嵌入式控制器获取处理器或充电管理芯片的反馈,以根据反馈确定调整后的第一参数是否对处理器性能产生影响。若无影响,则将调整后的第一参数写入电源充电芯片的固件。若有影响,则重新调整第一参数,如执行步骤S701或步骤S706或步骤S713。具体地,在调整后的第一参数影响处理器的性能时,会导致充电管理芯片发送Prochot信号至处理器。充电管理芯片根据发送Prochot信号确定影响性能,处理器根据接收到的Prochot信号确定影响性能。In some embodiments, when the charging interruption situation in step S704, step S709 or step S716 is charging interruption recovery, the embedded controller obtains feedback from the processor or charging management chip to determine whether the adjusted first parameter is correct based on the feedback. Processor performance is affected. If there is no impact, the adjusted first parameter is written into the firmware of the power charging chip. If there is an impact, readjust the first parameter, such as executing step S701, step S706, or step S713. Specifically, when the adjusted first parameter affects the performance of the processor, the charge management chip will be caused to send the Prochot signal to the processor. The charging management chip determines the impact on performance based on sending the Prochot signal, and the processor determines the impact on performance based on the received Prochot signal.
本申请实施例提供的充电异常处理方法包括但不限于如下技术效果:The charging abnormality processing method provided in the embodiment of the present application includes but is not limited to the following technical effects:
本申请实施例在适配器断充时,嵌入式控制器通过灵活调整第一时间参数、第一电流参数以及第二时间参数对应的数值,具体地,通过设置第一阈值、第二阈值、第三阈值来平衡第一时间参数、第一电流参数以及第二时间参数的调整比重,为当下情形配置最合适的参数数值,以修复适配器断充,同时还可以保证电子设备的正常运行。In the embodiment of the present application, when the adapter fails to charge, the embedded controller flexibly adjusts the values corresponding to the first time parameter, the first current parameter, and the second time parameter. Specifically, the first threshold, the second threshold, and the third threshold are set to balance the adjustment proportions of the first time parameter, the first current parameter, and the second time parameter, and configures the most appropriate parameter values for the current situation to repair the failure of the adapter to charge, while also ensuring the normal operation of the electronic device.
请参阅图8,示例性介绍本申请实施例提供的另一种充电异常处理方法流程。该充电异常处理方法可以应用于上述电子设备,具体地,可以由嵌入式控制器执行。该方法流程包括步骤S801至步骤S802。Please refer to FIG. 8 for an exemplary introduction to the flow of another charging abnormality handling method provided by an embodiment of the present application. This charging abnormality handling method can be applied to the above-mentioned electronic equipment, and specifically, can be executed by an embedded controller. The method flow includes steps S801 to S802.
步骤S801,在适配器断充未恢复时,嵌入式控制器循环执行以下调整操作,直至适配器断充恢复或确定适配器故障:调整第一参数,并将调整后的第一参数传输至对应的芯片,以使得芯片根据调整后的第一参数运行;其中第一参数包括第一时间参数和第一电流参数中的一个或多个;第一时间参数用于指示触发电源充电芯片复位适配器的时间门限值,第一电流参数用于指示触发充电管理芯片限制适配器充电电流的电流门限值。Step S801, when the adapter has been disconnected and charged and has not recovered, the embedded controller performs the following adjustment operations in a loop until the adapter is disconnected and charged or the adapter is determined to be faulty: adjust the first parameter, and transmit the adjusted first parameter to the corresponding chip, So that the chip operates according to the adjusted first parameter; wherein the first parameter includes one or more of the first time parameter and the first current parameter; the first time parameter is used to indicate the time threshold for triggering the power charging chip to reset the adapter value, the first current parameter is used to indicate the current threshold value that triggers the charging management chip to limit the charging current of the adapter.
在本申请实施例中,调整操作包括第一操作和/或第二操作和/或第三操作。其中,第一操作包括:根据第一预设规则增加第一时间参数,并将增加后的第一时间参数传输至电源充电芯片,以使得电源充电芯片根据增加后的第一时间参数运行。其中,第二操作包括:根据第二预设规则减小第一电流参数,并将减小后的第一电流参数传输至充电管理芯片,以使得充电管理芯片根据减小后的第一电流参数运行。其中,第三操作包括:根据第三预设规则增加第二时间参数,将增加后的第二时间参数传输至充电管理芯片,以使得充电管理芯片根据增加后的第二时间参数运行。In the embodiment of the present application, the adjustment operation includes a first operation and/or a second operation and/or a third operation. The first operation includes: increasing the first time parameter according to the first preset rule, and transmitting the increased first time parameter to the power charging chip, so that the power charging chip operates according to the increased first time parameter. Wherein, the second operation includes: reducing the first current parameter according to the second preset rule, and transmitting the reduced first current parameter to the charging management chip, so that the charging management chip can adjust the first current parameter according to the reduced first current parameter. run. The third operation includes: adding a second time parameter according to a third preset rule, and transmitting the added second time parameter to the charging management chip, so that the charging management chip operates according to the added second time parameter.
则嵌入式控制器循环执行以下调整操作包括:嵌入式控制器循环执行第一操作和/或第二操作和/或第三操作。也即嵌入式控制器循环执行第一操作,或,嵌入式控制器循环执行第二操作,或,嵌入式控制器循环执行第三操作,或,嵌入式控制器循环执行第一操作和第二操作,或,嵌入式控制器循环执行第一操作和第三操作,嵌入式控制器循环执行第二操作和第三操作,或,嵌入式控制器循环执行第一操作、第二操作和第三操作。Then the embedded controller cyclically executes the following adjustment operations including: the embedded controller cyclically executes the first operation and/or the second operation and/or the third operation. That is, the embedded controller cyclically executes the first operation, or the embedded controller cyclically executes the second operation, or the embedded controller cyclically executes the third operation, or the embedded controller cyclically executes the first operation and the second operation, or the embedded controller cyclically executes the first operation and the third operation, the embedded controller cyclically executes the second operation and the third operation, or the embedded controller cyclically executes the first operation, the second operation and the third operation.
其中嵌入式控制器循环执行第一操作可以参考上述步骤S701至步骤S705。嵌入式控制器循环执行第二操作可以参考上述步骤S706至步骤S710。嵌入式控制器循环执行第三操作可以参考上述步骤S713至步骤S717。Where the embedded controller performs the first operation in a loop, please refer to the above steps S701 to S705. For the embedded controller to perform the second operation in a loop, refer to the above steps S706 to S710. For the embedded controller to perform the third operation in a loop, refer to the above steps S713 to S717.
下述以嵌入式控制器循环执行第一操作和第二操作为例,嵌入式控制器循环执行第一操作和第三操作,嵌入式控制器循环执行第二操作和第三操作,或,嵌入式控制器循环执行第一操作、第二操作和第三操作可以以此类推。In the following, the embedded controller performs the first operation and the second operation cyclically as an example. The embedded controller performs the first operation and the third operation cyclically, and the embedded controller performs the second operation and the third operation cyclically, or, the embedded controller performs the first operation and the third operation cyclically. The formula controller performs the first operation, the second operation and the third operation cyclically and so on.
嵌入式控制器循环执行第一操作和第二操作包括但不限于如下情形:The embedded controller cyclically performs the first operation and the second operation including but not limited to the following situations:
情形一:嵌入式控制器执行第一操作,在适配器断充未恢复时,嵌入式控制器判断调整第一时间参数的次数是否达到第一阈值,第一阈值大于或等于1;若否,嵌入式控制器执行第一操作;若是,嵌入式控制器执行第二操作。具体地,可以参考上述步骤S701至步骤S706。Scenario 1: The embedded controller performs the first operation. When the adapter is disconnected and charged and has not been restored, the embedded controller determines whether the number of times to adjust the first time parameter reaches the first threshold. The first threshold is greater than or equal to 1; if not, the embedded controller The embedded controller performs the first operation; if so, the embedded controller performs the second operation. Specifically, reference may be made to the above steps S701 to S706.
情形二:嵌入式控制器根据第一预设规则增加第一时间参数,并根据第二预设规则减小第一电流参数,将增加后的第一时间参数传输至电源充电芯片以及将减小后的第一电流参数传输至充电管理芯片,以使得电源充电芯片根据增加后的第一时间参数运行,且充电管理芯片根据减小后的第一电流参数运行。Scenario 2: The embedded controller increases the first time parameter according to the first preset rule, and reduces the first current parameter according to the second preset rule, transmits the increased first time parameter to the power charging chip, and transmits the reduced first current parameter to the charging management chip, so that the power charging chip operates according to the increased first time parameter, and the charging management chip operates according to the reduced first current parameter.
在上述情形二中,在适配器断充时,嵌入式控制器根据第一预设规则增加第一时间参数同时根据第二预设规则减小第一电流参数。通过平衡第一时间参数和第一电流参数的数值,可以提升充电电压的同时降低电源充电芯片输出复位信号的频率,同时可以为充电管理芯片提供更多的时间去响应,增大充电管理芯片触发适配器降低充电电流IBUS的概率和触发电池输出电能的概率,由此第一电流参数的数值可以不用降得太低,让适配器为电子设备提供更多的电能,保证适配器的输出能力以及电子设备的正常运行。In the above scenario 2, when the adapter is disconnected from charging, the embedded controller increases the first time parameter according to the first preset rule and decreases the first current parameter according to the second preset rule. By balancing the values of the first time parameter and the first current parameter, the charging voltage can be increased while reducing the frequency of the reset signal output by the power charging chip. At the same time, the charging management chip can be provided with more time to respond, and the charging management chip trigger can be increased. The adapter reduces the probability of the charging current IBUS and the probability of triggering the battery to output electric energy. Therefore, the value of the first current parameter does not need to be reduced too low, allowing the adapter to provide more electric energy to the electronic device, ensuring the output capability of the adapter and the safety of the electronic device. normal operation.
示例性地,嵌入式控制器循环执行第一操作、第二操作和第三操作可以包括:在上述情形一的基础上,在执行第二操作之后且适配器断充未恢复时,判断调整第一电流参数的次数是否达到第二阈值,第二阈值大于或等于1;若否,嵌入式控制器执行第二操作;若是,嵌入式控制器执行第三操作。具体地,可以参考上述步骤S701至步骤S713。Exemplarily, the embedded controller cyclically performs the first operation, the second operation and the third operation may include: based on the above situation one, after performing the second operation and when the adapter has not recovered from disconnection and charging, it is determined to adjust the first operation. Whether the number of times of the current parameter reaches the second threshold, the second threshold is greater than or equal to 1; if not, the embedded controller performs the second operation; if yes, the embedded controller performs the third operation. Specifically, reference may be made to the above steps S701 to S713.
步骤S802,在适配器断充恢复时,嵌入式控制器将调整后的第一参数写入对应芯片的固件。Step S802: When the adapter is disconnected and restored, the embedded controller writes the adjusted first parameter into the firmware of the corresponding chip.
步骤S802的内容可以参考上述,在此不再赘述。The content of step S802 can be referred to the above, and will not be described again here.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of each step involved in the above method embodiment can be quoted from the functional description of the corresponding functional module, and will not be described again here.
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述各方法实施例中的充电异常处理方法。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the charging abnormality processing method in the above-mentioned method embodiments.
本申请实施例还提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如上述实施例的充电异常处理方法。Embodiments of the present application also provide a computer storage medium that includes computer instructions. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the charging abnormality handling method as in the above embodiment.
其中,本申请实施例提供的电子设备、计算机存储介质、计算机程序产品或充电系统均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic equipment, computer storage media, computer program products or charging systems provided by the embodiments of the present application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the above provided The beneficial effects of the corresponding methods will not be described again here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the above description of the embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated as needed. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separate. The component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium includes several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311444585.1A CN117175752B (en) | 2023-11-02 | 2023-11-02 | Charging abnormality handling methods, equipment, systems, storage media and program products |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311444585.1A CN117175752B (en) | 2023-11-02 | 2023-11-02 | Charging abnormality handling methods, equipment, systems, storage media and program products |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117175752A CN117175752A (en) | 2023-12-05 |
CN117175752B true CN117175752B (en) | 2024-04-02 |
Family
ID=88932109
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311444585.1A Active CN117175752B (en) | 2023-11-02 | 2023-11-02 | Charging abnormality handling methods, equipment, systems, storage media and program products |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117175752B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012115080A (en) * | 2010-11-26 | 2012-06-14 | Nec Casio Mobile Communications Ltd | Charge control method, charge control system, and charge control program |
CN103207655A (en) * | 2012-01-12 | 2013-07-17 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal with reset function and reset method |
CN104903143A (en) * | 2012-11-28 | 2015-09-09 | 宝马股份公司 | Charging an electrical energy store on an electric vehicle at a socket with reduction of the charging current after failure and restoration of the power supply |
CN110931908A (en) * | 2019-11-27 | 2020-03-27 | 北京金茂绿建科技有限公司 | Energy storage device safety control system based on optical fiber temperature measurement |
CN116031972A (en) * | 2022-12-13 | 2023-04-28 | 合肥市芯海电子科技有限公司 | Parameter adjustment method for charging chip, electronic equipment and storage medium |
-
2023
- 2023-11-02 CN CN202311444585.1A patent/CN117175752B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012115080A (en) * | 2010-11-26 | 2012-06-14 | Nec Casio Mobile Communications Ltd | Charge control method, charge control system, and charge control program |
CN103207655A (en) * | 2012-01-12 | 2013-07-17 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal with reset function and reset method |
CN104903143A (en) * | 2012-11-28 | 2015-09-09 | 宝马股份公司 | Charging an electrical energy store on an electric vehicle at a socket with reduction of the charging current after failure and restoration of the power supply |
CN110931908A (en) * | 2019-11-27 | 2020-03-27 | 北京金茂绿建科技有限公司 | Energy storage device safety control system based on optical fiber temperature measurement |
CN116031972A (en) * | 2022-12-13 | 2023-04-28 | 合肥市芯海电子科技有限公司 | Parameter adjustment method for charging chip, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
动力锂电池组充放电智能管理系统设计与实现;王天福等;《电源技术》;第35卷(第9期);第1069-1071页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117175752A (en) | 2023-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103078393B (en) | USB hub and power supply method of USB hub | |
JP5634608B2 (en) | Charging port | |
US10831700B2 (en) | Methods and apparatus for reducing power consumption within embedded systems | |
EP3086433A1 (en) | Charging method, alternating current adaptor, charging management device and terminal | |
CN106471697A (en) | Method, device, power adapter and mobile terminal for controlling charging | |
CN103477301B (en) | Method and apparatus for charging to energy storage device | |
WO2020024116A1 (en) | Interface configuration method, terminal device and interface | |
EP3084557A1 (en) | Method and apparatus for charging electronic device with usb connection | |
JP5986143B2 (en) | Method for managing power consumption of function expansion device, portable electronic device, and function expansion device | |
CN104158236A (en) | Portable electronic system and power management method | |
US9570922B2 (en) | Charging method and electronic device | |
US20100042862A1 (en) | Reduction of data corruption in wireless systems | |
CN102263423A (en) | Universal serial bus charging system and its charging method | |
CN117175752B (en) | Charging abnormality handling methods, equipment, systems, storage media and program products | |
US11947481B2 (en) | Terminal and type C interface anti-corrosion method | |
TW201232246A (en) | Portable electronic device and method for adjusting system performance thereof | |
WO2015143793A1 (en) | Current control method and terminal device | |
TW202026805A (en) | Method and apparatus for providing peak optimized power supply unit | |
CN105098854B (en) | Charging method and electronic device | |
TW202027360A (en) | Method and apparatus for providing high bandwidth capacitor circuit in power assist unit | |
TW202040313A (en) | Server power managing method and system thereof | |
WO2018010430A1 (en) | Control method, device, circuit, and data card | |
US20240272696A1 (en) | Electronic device and performance optimization method thereof | |
TW202335399A (en) | Improved type energy storage apparatus and improved type uninterruptible power supply electronic system | |
WO2023185229A1 (en) | Charging protection circuit, charging protection method, terminal device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |