Power-on control method, electronic equipment and computer readable storage medium

By determining the state of the switch tube in the electronic device and switching to the closed state, the problem that the functional module cannot be powered up as soon as possible after the switch tube is disconnected is solved, and the user experience and equipment response speed are improved.

CN119232836APending Publication Date: 2024-12-31HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310779513.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing electronic devices cannot be re-opened as soon as possible after the switch tube is disconnected, resulting in the power consumption function module being unable to power on as soon as possible, seriously affecting the user experience.

Method used

By determining that the functional module coupled to the switch tube cannot operate, obtain the state of the switch tube, and switch it to the closed state when the switch tube is disconnected, so as to ensure that the functional module is powered on at the first time.

Benefits of technology

The functional module is powered on and runs as soon as possible after the switch tube is disconnected, improving the user experience and avoiding the delayed recovery problem caused by power off.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232836A_ABST
    Figure CN119232836A_ABST
Patent Text Reader

Abstract

The invention discloses a power-on control method, electronic equipment and a computer readable storage medium, and belongs to the technical field of electronic equipment power supply. The power-on control method is applied to the electronic equipment and comprises the steps that it is determined that a first functional module in the electronic equipment cannot operate, and the first functional module is coupled with a battery in the electronic equipment through a first switching tube in the electronic equipment; obtaining the state of the first switching tube; and under the condition that the state of the first switch tube is an off state, the state of the first switch tube is switched to a closed state, so that the battery supplies power to the first functional module. Therefore, when the first switch tube is disconnected and the first function module coupled with the first switch tube is powered off, the first switch tube can be reopened at the first time, so that the powered-off first function module is powered on to work at the first time, and the user experience is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of power supply for electronic devices, and in particular, relates to a power-on control method, an electronic device, and a computer-readable storage medium. Background Art

[0002] The battery of electronic devices such as mobile phones is coupled to the power-using functional modules in the electronic devices to supply power to these power-using functional modules. In some cases, a switch tube is provided in the electronic device, for example, a switch tube is provided in the charging management module of the electronic device, and some power-using functional modules are coupled to the battery through the switch tube, and the switch tube can be used to control the power-on and power-off of the power-using functional modules. For example, when an event such as overcurrent occurs in the power-using functional module, the switch tube switches to the disconnected state to power off the power-using functional module, thereby protecting the power-using functional module from being damaged by large current.

[0003] However, in some electronic devices in the prior art, when the above-mentioned switch tube is disconnected, the power-consuming functional module coupled to the battery through the switch tube is powered off, and the electronic device cannot immediately turn on the switch tube again, resulting in the power-consuming functional module being unable to power on and work immediately, seriously affecting the user experience. Summary of the invention

[0004] The present application provides a power-on control method, an electronic device and a computer-readable storage medium, which can reopen the switch tube as soon as possible when a switch tube is disconnected and the power-consuming functional module coupled thereto is powered off, thereby causing the powered-off power-consuming functional module to be powered on and work as soon as possible, thereby ensuring user experience.

[0005] In a first aspect, an embodiment of the present application provides a power-on control method, which is applied to an electronic device. The power-on control method includes: determining that a first functional module in the electronic device cannot operate, the first functional module in the electronic device is coupled to a battery in the electronic device through a first switch tube; obtaining the state of the first switch tube; when the state of the first switch tube is an open state, switching the state of the first switch tube to a closed state, so that the battery supplies power to the first functional module.

[0006] It should be understood that in the above electronic device, when the first switch is disconnected, the first functional module coupled to the first switch will also be in a power-off state, and thus cannot operate. On the contrary, it should be understood that when the first functional module coupled to the first switch cannot operate, it means that the first switch may be disconnected. Although the event of the first switch disconnecting in some electronic devices cannot be reported, the inability of the first functional module coupled to the first switch to operate can, to a certain extent, characterize the event of the first switch disconnecting. Based on this, in the power-on control method provided in the embodiment of the present application, the inability of the first functional module coupled to the first switch to operate is used as a trigger signal to determine whether the first switch is truly disconnected. Specifically, when it is determined that the first functional module coupled to the first switch cannot operate, the state of the first switch is obtained. If the first switch does have a disconnection event, the electronic device can learn about the event of the first switch disconnecting at the first time. When it is obtained that the first switch is in a disconnected state, the first switch is reset to a closed state, so that the first functional module coupled to the first switch can be controlled to power on at the first time, so that it can operate normally and ensure the user experience.

[0007] In some embodiments of the embodiments of the present application, determining that a first functional module in the electronic device cannot operate includes: determining that the first functional module in the electronic device cannot operate when it is determined that the first functional module is powered off.

[0008] It should be understood that the disconnection of the first switch tube is equivalent to cutting off the power supply of the first functional module, so that the first functional module cannot obtain the power supply voltage and is powered off. The inability of the first functional module to operate is not necessarily caused by the first functional module not obtaining the power supply voltage and being powered off, and may also be caused by reasons such as damage to the first functional module. Therefore, the inability of the first functional module to operate to a certain extent represents the power-off of the first functional module, and thus to a certain extent represents the disconnection of the first switch tube, but does not necessarily represent the disconnection of the first switch tube. Therefore, using the inability of the first functional module to operate as a trigger signal to obtain the state of the first switch tube, the result obtained is likely to be that the first switch tube is closed. In this embodiment, since the first switch tube is disconnected, the first functional module is powered off, which causes the first functional module to be unable to operate. Therefore, when the first functional module is powered off, obtaining the state of the first switch tube can increase the probability of obtaining the event that the first switch tube is in a disconnected state.

[0009] In some embodiments, the first functional module is used to output a first interrupt signal when the first functional module is powered off; when the first interrupt signal is obtained, it is determined that the first functional module is powered off.

[0010] In view of the situation that the first functional module itself has the power-off reporting function, that is, when the first functional module is powered off, the first functional module reports its own power-off event to the electronic device in the form of a first interrupt signal. It can be seen that the first interrupt signal can be used to characterize the power-off of the first functional module. When the electronic device receives the first interrupt signal, the electronic device learns that the first functional module is powered off. This embodiment utilizes the power-off reporting function of the first functional module to learn that the first functional module is powered off, which can avoid the occupation of the operating resources of the electronic device caused by the additional development of other methods to learn that the first functional module is powered off, which is beneficial to improving the operating speed of the electronic device, thereby responding more quickly to the event of the first switch tube being disconnected, thereby improving the user experience.

[0011] In other embodiments, after determining that the first functional module in the electronic device cannot operate and before obtaining the state of the first switch tube, the power-on control method further includes: in response to the power-on operation performed by the user on the first functional module, detecting the power-off condition of the first functional module; and determining that the first functional module is powered off when the first functional module is detected to be powered off. In this embodiment, when the first functional module is powered off, the user may trigger a power-on operation on the first functional module. It can be seen that the user triggering the power-on operation on the first functional module may represent that the first functional module is powered off. Therefore, in response to the user's power-on operation on the first functional module, the electronic device can detect the power-off condition of the first functional module to know whether the first functional module is powered off. Exemplarily, the electronic device can detect the power-off condition of the first functional module by reading the pin voltage of the first functional module through an analog-to-digital converter ADC.

[0012] In some other embodiments, when an ESD power-on operation is detected, it is determined that the first functional module is powered off.

[0013] The electronic device is provided with an anti-static software program, namely, an electrostatic discharge check ESD check, and the ESD check is used to detect an electrostatic event occurring in the first functional module. The first functional module is abnormally powered off after the electrostatic event occurs. When the ESD check detects an electrostatic event occurring in the first functional module, it will periodically trigger a power-on operation on the first functional module, namely, an ESD power-on operation. It can be seen that the electronic device can be informed that the first functional module is powered off based on the ESD power-on operation.

[0014] In some other embodiments, the electronic device further includes a first power management module, the first power management module being coupled to a line in which the first functional module is coupled to a battery via a first switch tube. The first power management module is configured to output a second interrupt signal when the first power management module is powered off, the second interrupt signal being configured to indicate that the first power management module is powered off. When the second interrupt signal is obtained, it is determined that the first functional module is powered off.

[0015] It should be understood that the first power management module is coupled to the line of the first functional module coupled to the battery via the first switch tube. For example, between the first switch tube coupled to the first power management module and the first functional module, the voltage output by the battery is transmitted to the first power management module via the first switch tube, and then converted into a suitable power supply voltage by the first power management module to supply power to the first functional module. Since the first power management module supplies power to the first functional module, when the first power management module is powered off, it means that the first functional module is also powered off. Based on this, when the electronic device obtains the second interrupt signal, the electronic device can know that the first functional module is also powered off. This embodiment uses the power-off reporting function of the first power management module to indirectly know that the first functional module is powered off. In this way, the power-off of the first functional module can be known by simply establishing the relationship that receiving the second interrupt signal means that the first functional module is powered off. It can be seen that this embodiment can know that the first functional module is powered off through simple improvements. In this way, the occupation of the operating resources of the electronic device caused by the complicated way of knowing that the first functional module is powered off can be avoided, which is conducive to improving the operating speed of the electronic device, thereby responding to the event of disconnection of the first switch tube more quickly, thereby improving the user experience.

[0016] In some possible implementations of the present application, after determining that the first functional module in the electronic device cannot operate and before obtaining the state of the first switch tube, the power-on control method further includes: obtaining the number of times the first switch tube is turned off after the electronic device is turned on; the number of turns off is used to indicate the number of times the state of the first switch tube is switched from the closed state to the open state. Obtaining the state of the first switch tube includes: obtaining the state of the first switch tube when the number of times the first switch tube is turned off after the electronic device is turned on is less than or equal to the preset number of turns off.

[0017] It should be understood that if the number of times the first switch tube is turned off after the electronic device is turned on is greater than the preset number of times, that is, the preset number of times is reached, it means that the first switch tube is frequently turned off after the electronic device is turned on, which indicates that the subsequent circuit of the first switch tube may face safety hazards, and the electronic device protects the subsequent circuit by continuously turning off the first switch tube. Therefore, in order to avoid damage to the subsequent circuit of the first switch tube, the step of obtaining the state of the first switch tube is performed only when the number of times the first switch tube is turned off after the electronic device is turned on is less than or equal to the preset number of times. In this way, it can be avoided that the first switch tube is turned on for many times continuously to cause damage to the subsequent circuit.

[0018] Optionally, the electronic device has a status register of the first switch tube. Acquiring the status of the first switch tube includes: the electronic device acquiring the status of the first switch tube from the status register.

[0019] In some embodiments, the electronic device is a folding mobile phone; the folding mobile phone includes a main screen and a sub-screen; the folding mobile phone also includes a processor and a first charging management module; the first functional module is the sub-screen; the first switch tube is a switch tube in the first charging management module for controlling power on and power off of the sub-screen; the processor is coupled to the battery, and the processor is not coupled to the battery through the first switch tube.

[0020] In this embodiment, the sub-screen is coupled to the battery via the first switch tube, while the processor is not coupled to the battery via the first switch tube. In this way, the processor and the sub-screen are coupled to the battery via different paths. In this case, when the first switch tube is disconnected and the sub-screen is black, the processor is not coupled to the battery by the first switch tube, so it is not affected by the disconnection of the first switch tube and can operate normally, so that the above-mentioned power-on control method can be executed to power on the sub-screen again and restore the bright screen. In a second aspect, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the method described in the first aspect or various possible implementations of the first aspect.

[0021] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect or various possible implementations of the first aspect.

[0022] It can be understood that the beneficial effects that can be achieved by the technical solutions described in the second and third aspects provided above can refer to the beneficial effects of the power-on control method in the first aspect and any possible design thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0024] Figure 2 for Figure 1 A possible structural block diagram of the electronic device shown;

[0025] Figure 3 A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 4 A structural block diagram of an electronic device provided in an embodiment of the present application;

[0027] Figure 5 The process of the power-on control method provided in the embodiment of the present application Figure 1 ;

[0028] Figure 6The process of the power-on control method provided in the embodiment of the present application Figure 2 ;

[0029] Figure 7 The process of the power-on control method provided in the embodiment of the present application Figure 3 ;

[0030] Figure 8 The process of the power-on control method provided in the embodiment of the present application Figure 4 . DETAILED DESCRIPTION

[0031] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0033] In addition, the term “coupled” may refer to a direct electrical connection or an indirect electrical connection via an intermediate medium.

[0034] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0035] To facilitate understanding, the technical terms involved in this application are first described.

[0036] 1. Power on and off

[0037] Powering on means that the power of a device is turned on. For example, the first functional module involved in the embodiment of the present application is powered on, which means that the power of the first functional module is turned on.

[0038] Powering off means that the power supply of a device is cut off. For example, the first functional module involved in the embodiment of the present application is powered off, which means that the power supply of the first functional module is cut off.

[0039] 2. The open and closed states of the switch tube

[0040] The closed state of the switch tube refers to the state in which the switch tube is turned on. In this case, the circuit in which the switch tube is located is a path, that is, current passes through. Taking the metal-oxide-semiconductor field-effect transistor (MOS) as an example, the closed state of the switch tube refers to the source and drain of the MOS being turned on.

[0041] The off state of the switch tube refers to the state in which the switch tube is not turned on. In this case, the circuit in which the switch tube is located is open circuit, that is, no current flows. Taking the switch tube as a metal-oxide-semiconductorfield-effect transistor (MOS) as an example, the off state of the switch tube refers to the source and drain of the MOS being turned off and not conducting. The implementation of the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.

[0042] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0043] Figure 1 Take the foldable mobile phone as an example. Figure 1 (a) to Figure 1 As can be seen in (c), the foldable mobile phone includes a main screen 111, a sub-screen 112, a first camera module 121, a second camera module 122, a third camera module 123 and a hinge assembly 130.

[0044] The hinge assembly 130 is a component that drives the foldable mobile phone to realize the folding and unfolding functions, so that the foldable mobile phone can be in a flattened state or a fully folded state. It should be understood that the foldable mobile phone can also be in other states between the flattened state and the fully folded state.

[0045] Figure 1 (a) and Figure 1 (b) in FIG. 1 shows the flattened state of the foldable phone from different angles. It should be understood that Figure 1 (b) in Figure 1 Flip side of (a). Figure 1 (c) in the figure shows the fully folded state of the foldable phone. When the foldable phone is in the flattened state, the two parts of the main screen 111 on both sides of the hinge assembly 130 are approximately 180 degrees; when the foldable phone is in the fully folded state, the two parts of the main screen 111 on both sides of the hinge assembly 130 are approximately 0 degrees. The user can use the foldable phone in the flattened state and the fully folded state.

[0046] When the user uses the folding mobile phone in a flat state, the main screen 111 is opposite to the user to output display content to the user. In other words, the main screen 111 can be a screen used for display when the folding mobile phone is in a flat state. In the flat state, the third camera module 123 and the main screen 111 are located on the same side of the folding mobile phone, and the first camera module 121 and the main screen 111 are located on different sides of the folding mobile phone. Therefore, the third camera module 123 can be a camera module used for front photography when the folding mobile phone is in a flat state; the first camera module 121 can be a camera module used for rear photography when the folding mobile phone is in a flat state. In other embodiments, since the second camera module 122 is also located on a different side of the folding mobile phone from the main screen 111, the second camera module 122 can also be a camera module used for rear photography when the folding mobile phone is in a flat state.

[0047] When the user uses the foldable phone in a fully folded state, the secondary screen 112 is opposite to the user to output display content to the user. That is, the secondary screen 112 can be a screen used for display when the foldable phone is in a fully folded state. In the fully folded state, the second camera module 122 and the secondary screen 112 are located on the same side of the foldable phone, and the first camera module 121 and the secondary screen 112 are located on different sides of the foldable phone. Therefore, the second camera module 122 and the secondary screen 112 can be camera modules used for front-facing cameras when the foldable phone is in a fully folded state; the first camera module 121 can be a camera module used for rear-facing cameras when the foldable phone is in a fully folded state.

[0048] Please refer to Figure 2 , Figure 2 for Figure 1 A possible structural block diagram of an electronic device is shown.

[0049] like Figure 2 As shown, the foldable phone includes a power management unit (PMU), a second PMIC, a first PMIC, a second charging management module, a first charging management module, a main battery, a secondary battery, a processor, a power amplifier (PA), a first camera module, a second camera module, a third camera module, a main screen and a secondary screen. Among them, the PMU is set in the processor. It should be noted that Figure 2 Only part of the structure is shown. Figure 2 It may also include more or fewer components, which are not limited in the embodiments of the present application. It is understandable that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the folding mobile phone. In other embodiments of the present application, the folding mobile phone may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0050] Wherein, the processor may include one or more processing units, for example: the processor may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices or integrated into one or more processors. For example, the processor may be an application processor AP. Alternatively, the above-mentioned processor may be integrated into a system on chip (System on Chip, SOC). Alternatively, the above-mentioned processor may be integrated into an IC chip. The processor may include an analog front end (Analog Front End, AFE) and a microprocessor unit (microcontroller unit, MCU) in an IC chip. Wherein, the controller may be the nerve center and command center of a folding mobile phone. The controller may generate a control signal according to an instruction opcode and a timing signal to complete the control of fetching and executing instructions. A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. The memory can store instructions or data that have just been used or are used cyclically by the processor. If the processor needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor, and thus improves the efficiency of the system.

[0051] The second charging management module is coupled to the main battery. The second charging management module is used to receive charging input from a charger (or adapter) to charge the main battery; the second charging management module can also be used to monitor the voltage, current, temperature and other parameters of the main battery during charging to protect the main battery during the charging process to avoid over-discharge, over-voltage, over-charge, over-temperature and other situations. The first charging management module is coupled to the secondary battery, and the charging function and protection function of the first charging management module for the secondary battery can be adaptively referred to the description of the second charging management module.

[0052] Among them, the main battery is coupled to the PMU via the second charging management module, and the PMU is coupled to the processor, the first camera module, the third camera module and the main screen respectively. Figure 2The PMU shown is set in the processor. In other embodiments, the PMU may not be set in the processor, but a device independent of the processor. Among them, the PMU can receive the voltage output by the main battery through the second charging management module, and convert it into a suitable power supply voltage to supply power to the processor, the first camera module, the third camera module and the main screen. The power-consuming function modules coupled to the PMU in the figure only involve the processor, the first camera module, the third camera module and the main screen. The PMU can also be used to monitor the relevant signals of the main battery, such as the battery capacity of the main battery, the number of battery cycles, the battery health status (leakage, impedance) and other parameters. It should be understood that in other embodiments, the power-consuming function modules coupled to the PMU can be more or less. In addition, in other embodiments, when the voltage output by the main battery through the second charging management module is a power supply voltage suitable for the power-consuming function modules, the second charging management module can also be directly coupled to these power-consuming function modules without the PMU. In addition, in other embodiments, the main battery can also be directly coupled to the PMU without the second charging management module.

[0053] The PMU is coupled to the main screen via the second PMIC. It should be understood that in some embodiments, the main screen requires multiple power supply voltages. When the PMU cannot provide all the required power supply voltages to the main screen, the second PMIC can provide the main screen with the power supply voltage that the PMU cannot provide, for example, Figure 2 As shown, the second PMIC can be coupled to the second charging management module via the PMU, and the second PMIC can receive the voltage output by the PMU and convert it into a power supply voltage that the PMU cannot provide to supply power to the main screen. In other embodiments, the second PMIC can be coupled to the main battery via the second charging management module, and the second PMIC can receive the voltage output by the main battery via the second charging management module, and convert it into a power supply voltage that the PMU cannot provide to supply power to the main screen.

[0054] The secondary battery is coupled to the PA and the first PMIC respectively through the first charging management module, and the first PMIC is coupled to the secondary screen and the second camera module respectively. The voltage output by the secondary battery through the first charging management module can directly power the PA; the first PMIC can receive the voltage output by the secondary battery through the first charging management module, and convert it into a suitable power supply voltage to power the secondary screen and the second camera module.

[0055] The first charging management module is described using SC89601A as an example. The first charging management module may include switch tubes Q1, Q2, Q3, and Q4. Here, only the switch tube Q4 involved in power supply in the first charging management module is described in detail. The connections of switch tubes Q1, Q2, and Q3 can refer to the connection relationship shown in the figure. It should be noted that Figure 2 Only some internal components and pins of the first charging management module are illustrated.

[0056] The processor is coupled to the first charging management module, for example, the integrated circuit (inter-integrated circuit, I2C) interface of the processor is coupled to the first charging management module. The processor is used to output an instruction to switch the state of the switch tube Q4 to the processor, such as bit 1 or bit 0, wherein bit 0 is used to control the switch tube Q4 to switch to a closed state, and bit 1 is used to control the switch tube Q4 to switch to an open state. The first charging management module is used to receive the instruction to switch the state of the switch tube Q4, and according to the instruction to switch the state of the switch tube Q4, adjust the level of the control end (such as the gate of the PMOS) of the switch tube Q4, so as to switch the switch tube Q4 to a state corresponding to the instruction, for example, when the instruction is bit 1, the first charging management module is used to pull down the level of the control end (such as the gate of the PMOS) of the switch tube Q4, so as to switch the switch tube Q4 to an open state; when the instruction is bit 0, the first charging management module is used to pull up the level of the control end (such as the gate of the PMOS) of the switch tube Q4, so as to switch the switch tube Q4 to a closed state.

[0057] Among them, the input end of the switch tube Q4 (such as the source of the PMOS) is coupled to the auxiliary battery. When the switch tube Q4 is in a closed state, the switch tube Q4 outputs the voltage output by the auxiliary battery received at its input end through its output end (such as the drain of the PMOS). The output end of the switch tube Q4 can be coupled to the auxiliary screen and the second camera module through the first PMIC. The first PMIC can convert the voltage output by the output end of the switch tube Q4 into a suitable power supply voltage and then supply power to the auxiliary screen and the second camera module. The switch tube Q4 can also be directly coupled to the PA without passing through the first PMIC. Since the voltage output by the switch tube Q4 is a suitable power supply voltage, the output end of the switch tube Q4 can directly supply power to the PA without passing through the first PMIC.

[0058] It should be noted that the switch tube Q4 can protect the subsequent circuit. For example, when an event such as overcurrent occurs in the subsequent circuit, the switch tube Q4 switches to a disconnected state under the control of the processor, thereby preventing the subsequent circuit from being damaged by large current. It should be noted that the subsequent circuit of the switch tube Q4 refers to the circuit through which the current flowing out of the output end of the switch tube Q4 flows, including functional modules coupled to the switch tube Q4, such as the first PMIC, PA, the second camera module and the secondary screen, and also includes connecting wires connecting these functional modules, such as metal traces.

[0059] The power-consuming functional modules coupled to the switch tube Q4 in the figure only involve the first PMIC, PA, the auxiliary screen and the second camera module. It should be understood that in other embodiments, the power-consuming functional modules coupled to the switch tube Q4 can be more or less. The power-consuming functional modules coupled to the switch tube Q4 via the first PMIC in the figure only involve the auxiliary screen and the second camera module. It should be understood that in other embodiments, the power-consuming functional modules coupled to the switch tube Q4 via the first PMIC can be more or less. The power-consuming functional modules coupled to the switch tube Q4 without the first PMIC in the figure only involve PA. It should be understood that in other embodiments, the power-consuming functional modules coupled to the switch tube Q4 without the first PMIC can be more or less.

[0060] It should be noted that the PMU, the first PMIC, and the second PMIC can be set in the same device (such as a processor) or in different devices. For example, the PMU is set in one device, and the first PMIC and the second PMIC are set in another device; for another example, the PMU is set in one device, the first PMIC is set in one device, and the second PMIC is set in one device. The specific settings of the first charging management module and the second charging management module can also be implemented with reference. In addition, the PMU, the first PMIC, the second PMIC, the first charging management module, and the second charging management module can be set in the same device or in different devices. For example, the PMU, the second PMIC, and the second charging management module are set in the same device, and the first PMIC and the first charging management module are set in the same device; for another example, the PMU, the first PMIC, the second PMIC, the first charging management module, and the second charging management module are set in five different devices.

[0061] It should be noted that the following content focuses on illustrating and explaining the connection relationship between each structure involving power supply. In the specific implementation process, Figure 2 The connection relationship of the hardware structure shown is not limited to the connection relationship shown in the figure. For example, the processor can also be coupled to the PA to perform signal transmission between the processor and the PA.

[0062] Please refer to Figure 3 , Figure 3 A software structure block diagram of an electronic device provided in an embodiment of the present application.

[0063] The layered architecture of electronic devices divides software into several layers, each with clear roles and division of labor. Layers communicate with each other through software interfaces.

[0064] In some embodiments, Android TM It is divided into five layers, from top to bottom: application layer, application framework layer, kernel layer and driver layer. It can be understood that Figure 3The layers in the software structure and the components contained in each layer do not constitute a specific limitation on the electronic device.

[0065] The application layer can include a series of application packages (Android application package, APK). Figure 3 As shown, the application layer can install various applications. Such as calls, calendars, cameras, videos, maps, galleries, calls and other applications. In an embodiment of the present application, the application layer also involves a state acquisition application package, which is used to obtain the state of a first switch tube such as switch tube Q4. The application layer also involves a state switching application package, which is used to switch the state of a first switch tube such as switch tube Q4. It should be understood that the state acquisition application package and the state switching application package can also be set in the same application package. It should be noted that the specific circumstances under which the state acquisition application package and the state switching application package obtain and configure the state of the first switch tube such as switch tube Q4 can refer to the relevant content of the power-on control method provided in the embodiment of the present application.

[0066] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 3 As shown, the application framework layer may include a window manager, an activity manager, a content provider, a view system, a resource manager, a notification manager, etc., and the embodiments of the present application do not impose any restrictions on this.

[0067] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc. The stack manager is used to manage stack programs. The stack manager can release and establish the correspondence between the stack and the task. The task manager is used to manage task programs. The task manager can load the content layout of the task according to the window parameters of the stack. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a text notification option can include a view for displaying text and a view for displaying pictures. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction.

[0068] The kernel layer is a layer between hardware and software. The kernel layer includes at least display driver, sensor driver, charging driver, etc., and the present application embodiment does not impose any restrictions on this.

[0069] In the embodiment of the present application, a state register storing the state of the first switch tube, such as the switch tube Q4, and a control register for switching the state of the first switch tube, such as the switch tube Q4, can be configured for the first switch tube, such as the switch tube Q4. In some embodiments, the state register and the control register can be the same register. For example, the first charging management module can configure the register Batfet_dis. In this case, the register is used to store the state of the first switch tube, such as the switch tube Q4, and to store the instruction for switching the state of the first switch tube, such as the switch tube Q4; in other embodiments, the state register and the control register can be different registers, which is not limited in the embodiment of the present application. Taking the case where the status register and the control register are the same register and the register is Batfet_dis as an example, the status acquisition application package in the application layer can read the value of Batfet_dis by controlling the underlying interface function related to reading the state of the first switch tube, such as switch tube Q4, in the application framework layer, so as to obtain the state of the first switch tube, such as switch tube Q4; and the status switching application package in the application layer can write instructions, such as bit 0 or bit 1, to Batfet_dis by controlling the underlying interface function related to switching the state of the first switch tube, such as switch tube Q4, in the application framework layer, so as to realize the state switching of the first switch tube, such as switch tube Q4. By obtaining the instruction stored in Batfet_dis, the charging driver can drive the first switch tube, such as switch tube Q4, to switch to the state corresponding to the instruction.

[0070] Understandably, Figure 3 The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the embodiments of the present application.

[0071] Please continue to refer to Figure 2 When the switch Q4 in the first charging management module is disconnected due to a fault in the first charging management module (such as damage to the switch Q4) or an overcurrent in the subsequent circuit coupled to the switch Q4, the first charging management modules produced by some manufacturers do not generate an interrupt to report the disconnection of the switch Q4, resulting in the electronic device being unable to immediately learn of the event that the switch Q4 is disconnected, and thus being unable to immediately respond and reopen the switch Q4. Since the switch Q4 cannot be immediately reopened, the power-consuming function modules (such as Figure 2 The secondary screen, PA, camera, etc. shown in the figure cannot be powered on and work immediately, which seriously affects the user experience. For example, when the switch tube Q4 is disconnected, the secondary screen is powered off. Since the switch tube Q4 is not turned on immediately, the secondary screen cannot be powered on immediately and is in a black screen state for a period of time.

[0072] In the prior art, an electronic device restarts the electronic device in response to a user's restart operation on the electronic device. The restart process involves initializing the secondary screen and initializing the switch tube Q4 so that the switch tube Q4 is closed and the secondary screen is restored. However, since the initialization of the secondary screen occurs before the initialization of the switch tube Q4, when the secondary screen is initialized during the first restart of the electronic device, the switch tube Q4 is not initialized and is in a disconnected state, resulting in the secondary screen being unable to be powered on and unable to be initialized, and the secondary screen is not restored; and when the secondary screen is initialized during the second restart of the electronic device, the switch tube Q4 is initialized and is in a closed state, the secondary screen is powered on and initialized, and the secondary screen is restored. It can be seen that the prior art method of restoring the secondary screen by restarting the electronic device does not restore the secondary screen after restarting once, and the secondary screen will be restored after restarting the second time, which seriously affects the user experience.

[0073] In view of the above problems, an embodiment of the present application provides a power-on control method, which is applied to an electronic device. By way of example, the electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and the like. The embodiment of the present application does not impose any special restrictions on the specific form of the device.

[0074] In the electronic device, the first functional module is coupled to the battery in the electronic device through the first switch tube. When the electronic device determines that the first functional module in the electronic device cannot operate, the electronic device obtains the state of the first switch tube; when the state of the first switch tube is in the disconnected state, the electronic device switches the state of the first switch tube to the closed state, so that the battery supplies power to the first functional module.

[0075] It should be understood that when the first switch is disconnected, the circuit between the first functional module and the battery is disconnected, so the first functional module coupled to the first switch will also be powered off and cannot operate. On the contrary, it should be understood that when the first functional module coupled to the first switch cannot operate, it means that the first switch may be disconnected. Although the event of the first switch disconnecting in some electronic devices cannot be reported, the inability of the first functional module coupled to the first switch to operate can to a certain extent represent the event of the first switch disconnecting. Based on this, in the power-on control method provided by the embodiment of the present application, the inability of the first functional module coupled to the first switch to operate is used as a trigger signal to determine whether the first switch is really disconnected. Specifically, when it is determined that the first functional module coupled to the first switch cannot operate, the state of the first switch is obtained. If the first switch does have a disconnection event, the electronic device can be informed of the event of the first switch disconnecting at the first time. When it is obtained that the first switch is in a disconnected state, the first switch is reset to a closed state, so that the first functional module coupled to the first switch can be controlled to power on at the first time, so that it can operate normally and ensure the user experience.

[0076] Specifically, the power-on control method provided in the embodiment of the present application can be implemented in a control module of an electronic device, that is, the control module executes the power-on control method. Figure 4 , Figure 4 A structural block diagram of an electronic device provided in an embodiment of the present application.

[0077] The electronic device includes a control module, a battery, a first switch tube and a first functional module. The battery is coupled to the control module, and the battery is also coupled to the first functional module via the first switch tube, and the control module is coupled to the first switch tube. The battery is used to supply power to the control module and the first functional module, and the control module is used to control the state of the first switch tube so that the state of the first switch tube can be switched between an open state and a closed state. When the first switch tube is in a closed state, the battery can supply power to the first functional module, and the first functional module is powered on; when the first switch tube is in a disconnected state, the battery cannot supply power to the first functional module, and the first functional module is powered off.

[0078] It should be understood that Figure 4 The electronic device shown can be used in Figure 1 and Figure 2 The structure shown and Figure 3 The software architecture shown is implemented in an electronic device.

[0079] The control module can be Figure 2 The processor or controller in the processor shown, etc.

[0080] The battery can be Figure 1 The battery shown. Figure 4 Application Figure 2 In the hardware structure shown, the battery can be further divided into Figure 2 The main battery and the sub-battery are shown, wherein the main battery is coupled to the control module, and the sub-battery is coupled to the first functional module via the first switch tube.

[0081] The first switch tube is a switch tube used in electronic equipment to control the power on and off of some power-consuming functional modules. For example, the first switch tube can be a switch tube in the first charging management module that controls the power on and off of some power-consuming functional modules, and protects some power-consuming functional modules by controlling the power off of some power-consuming functional modules after being powered on. Figure 2 The switch tube Q4 is shown.

[0082] The first functional module is a power-consuming functional module coupled to the first switch tube and controlled to be powered on and off by the first switch tube. The first functional module may be a power-consuming functional module directly connected to the first switch tube, such as Figure 2 The PA or the first PMIC shown may also be a power-consuming functional module indirectly connected to the first switch tube, such as Figure 2 The camera or sub-screen shown. The first functional module can also be a plurality of power-consuming functional modules coupled to the first switch tube inside the electronic device.

[0083] It should be understood that the power-on control method provided in the embodiment of the present application is applicable to Figure 2 In addition to the above-mentioned problems, there are other scenarios, that is, the first switch tube controls the power-on and power-off of some power-consuming functional modules, but the electronic device cannot report after the first switch tube is disconnected.

[0084] Combine the following Figures 5 to 8 The power-on control method provided in the embodiment of the present application is described in the following embodiments. It should be understood that the power-on control method provided in the following embodiments can be used in a Figure 1 , Figure 2 as well as Figure 4 The hardware structure shown and Figure 3 It should be noted that the following embodiments are described by taking the control module executing the power-on control method as an example.

[0085] Please refer to Figure 5 , Figure 5 The process of the power-on control method provided in the embodiment of the present application Figure 1 For ease of explanation, only the parts related to this embodiment are shown, which are described in detail as follows:

[0086] S501, determining that the first functional module cannot run.

[0087] The first functional module state involved in S501 is already Figure 4 The above is described in the embodiment shown in the figure and will not be described in detail here.

[0088] Optionally, in S501, the first functional module has an abnormality reporting function, that is, reporting an interrupt signal when it cannot run, so as to report the event that it cannot run and the reason for the failure to run to the control module. The reason for the failure of the first functional module to run may be that the first functional module does not obtain the power supply voltage, or other reasons other than the first functional module does not obtain the power supply voltage. In the embodiment of the present application, the interrupt signal reported by the first functional module when the power supply voltage is not obtained is referred to as the first interrupt signal.

[0089] S502, obtaining a state of a first switch tube.

[0090] The first switch tube involved in S502 and the state of the first switch tube have been Figure 4 The above is described in the embodiment shown in the figure and will not be described in detail here.

[0091] The following takes the first switch as Figure 2 Taking the switch tube Q4 as an example, the process of obtaining the state of the first switch tube in S502 is described exemplarily.

[0092] Specifically, the state of the first switch tube can be stored in the state register of the switch tube Q4 (such as register Batfet_dis). For example, the data stored in Batfet_dis is bit 1, which means that the state of the first switch tube is open; the data stored in Batfet_dis is 0, which means that the state of the first switch tube is closed. The control module can obtain the state of the first switch tube by reading the value of Batfet_dis. The process of the control module reading Batfet_dis can be seen in Figure 3 The relevant contents in will not be repeated here.

[0093] S503: When the state of the first switch tube is in the open state, switch the state of the first switch tube to the closed state, so that the battery supplies power to the first functional module.

[0094] Next, we will continue to use the first switch tube as Figure 2 Taking the switch tube Q4 as an example, the process of switching the state of the first switch tube to the closed state in S502 is described exemplarily.

[0095] Specifically, the electronic device has a control register (such as register Batfet_dis) for switching the state of the first switch tube, and the state switching of the first switch tube is realized by writing an instruction for switching the state of the first switch tube into the control register. For example, the control module can write instruction bit 1 to Batfet_dis to switch the state of the first switch tube to the open state; the control module can write instruction bit 0 to Batfet_dis to switch the state of the first switch tube to the closed state. The specific process of the control module writing instructions to Batfet_dis can be found in Figure 3 The relevant contents in will not be repeated here.

[0096] In S503, when the state of the first switch tube is the open state, the control module can write an instruction into the control register to update the data of the control register to bit 0, so as to control the first switch tube to switch to the closed state.

[0097] Figure 5 In the power-on control method shown, when the first switch tube is disconnected, the first functional module coupled to the first switch tube will also be powered off at the same time and thus cannot operate. Conversely, it should be understood that when the first functional module coupled to the first switch tube cannot operate, it may represent that the first switch tube is disconnected at this time. Although the event of the first switch tube being disconnected in some electronic devices cannot be reported, the inability of the first functional module coupled to the first switch tube to operate can, to a certain extent, represent the event of the first switch tube being disconnected. Based on this, Figure 5 In the power-on control method shown, the failure of the first functional module coupled to the first switch tube to operate is used as a trigger signal to actively determine whether the first switch tube is actually disconnected. Specifically, when the first functional module coupled to the first switch tube fails to operate, the state of the first switch tube is actively acquired. Since the control module immediately acquires the state of the first switch tube when the first functional module fails to operate, if a disconnection event does occur in the first switch tube, the control module can be informed of the event of the first switch tube being disconnected at the first time. When it is acquired that the first switch tube is in a disconnected state, the first switch tube is reset to a closed state. In this way, the first functional module coupled to the first switch tube can be controlled to be powered on at the first time, so that it can operate normally and ensure the user experience.

[0098] It should be understood that the disconnection of the first switch tube is equivalent to cutting off the power supply of the first functional module, so that the first functional module cannot obtain the power supply voltage from the power supply and is powered off. According to the aforementioned reasons that cause the first functional module to fail to operate, it can be known that the failure of the first functional module to operate is not necessarily caused by the failure of the first functional module to obtain the power supply voltage and be powered off, but may also be caused by other reasons. Therefore, the failure of the first functional module to operate to a certain extent represents that the first functional module is powered off, and thus to a certain extent represents that the first switch tube is disconnected, but does not necessarily mean that the first switch tube is disconnected. Therefore, the result obtained by using the failure of the first functional module to operate as a trigger signal to obtain the state of the first switch tube is likely to be that the first switch tube is closed.

[0099] Based on this, in order to obtain the state of the first switch tube when the probability of the first switch tube being disconnected is higher, so as to improve the probability of obtaining the first switch tube being disconnected, optionally, the embodiment of the present application provides Figure 6 The embodiment shown.

[0100] Please refer to Figure 6 , Figure 6 The process of the power-on control method provided in the embodiment of the present application Figure 2 This embodiment is only applicable to Figure 5 The different parts of the embodiment shown are described below. Figure 5 In the embodiment shown, S501 can be implemented specifically by S501a as follows:

[0101] S501a, the control module determines that the first functional module is powered off. In other words, Figure 6 In the illustrated embodiment, when it is determined that the first functional module is powered off, the electronic device determines that the first functional module cannot operate.

[0102] It should be understood that since the first switch tube is turned off, the first functional module is powered off, which causes the first functional module to be unable to operate. Therefore, Figure 6 In the illustrated embodiment, when the first functional module is powered off, the state of the first switch tube is obtained, which can increase the probability of obtaining the event that the first switch tube is in the disconnected state in S501a.

[0103] Figure 6 In the power-on control method shown, when the first switch tube is disconnected, that is, the state of the first switch tube is switched from the closed state to the open state, the circuit between the first functional module and the battery is disconnected, so the first functional module coupled to the first switch tube will also be powered off. Conversely, it should be understood that when the first functional module coupled to the first switch tube is powered off, it means that the first switch tube may be disconnected. Although the event of the first switch tube being disconnected in some electronic devices cannot be reported, the power-off of the first functional module coupled to the first switch tube can, to a certain extent, represent the event of the first switch tube being disconnected. Figure 6 In the power-on control method shown, the failure of the first functional module coupled to the first switch tube to operate is used as a trigger signal to determine whether the first switch tube is actually disconnected. Specifically, when it is determined that the first functional module coupled to the first switch tube cannot operate, the state of the first switch tube is obtained. If a disconnection event does occur in the first switch tube, the electronic device can be informed of the event of the first switch tube being disconnected at the first time. When it is obtained that the first switch tube is in a disconnected state, the first switch tube is reset to a closed state. In this way, the first functional module coupled to the first switch tube can be controlled to be powered on at the first time, so that it can operate normally and ensure the user experience.

[0104] The following is an exemplary description of the way in which the control module determines that the first functional module is powered off in S501a. It should be noted that there are many ways for the control module to determine that the first functional module is powered off, as long as the first functional module is powered off in the first place. Five examples are provided below:

[0105] In the first example, the first functional module itself has a power-off reporting function, that is, when the first functional module is powered off, the first functional module outputs a first interrupt signal. The first interrupt signal can be used to indicate that the first functional module is powered off. When the first interrupt signal is obtained, the control module determines that the first functional module is powered off.

[0106] Specifically, the first functional module is coupled to the control module, and the first functional module is used to output a first interrupt signal to the control module when the first functional module is powered off; when the control module receives the first interrupt signal, it determines that the first functional module is powered off. Figure 2 The PA shown may have a power-off reporting function, and may generate a corresponding interrupt after power-off and report it to the control module to inform the control module that the PA is powered off. Figure 2 The first PMIC, the secondary screen and the camera shown in the figure can also have the power-off reporting function. It should be understood that the power-off reporting function of the first functional module can be implemented by the abnormal reporting function of the first functional module mentioned above.

[0107] In a second example, the electronic device further includes a first power management module, and the first power management module is coupled to a line that is coupled to the battery through the first switch tube of the first functional module. For example, between the first switch tube coupled to the first power management module and the first functional module, the voltage output by the battery is transmitted to the first power management module through the first switch tube, and then converted into a suitable power supply voltage by the first power management module to supply power to the first functional module. It should be understood that the first power management module can be Figure 2The first PMIC shown. The first functional module itself does not have a power-off reporting function, but the first power management module has a power-off reporting function. The first power management module is used to output a second interrupt signal when the first power management module is powered off, and the second interrupt signal is used to characterize that the first power management module is powered off. When the second interrupt signal is obtained, the control module determines that the first functional module is powered off. It should be understood that the specific implementation of the power-off reporting function of the first power management module can refer to the abnormal reporting function of the first functional module.

[0108] Specifically, the first power management module is coupled to the control module. When the first power management module is powered off, the first power management module can report a second interrupt signal to the control module. The second interrupt signal can be used to indicate that the first power management module is powered off. It should be understood that since the first power management module supplies power to the first functional module, when the first power management module is powered off, it means that the first functional module is also powered off. Based on this, when the control module receives the second interrupt signal, the control module can determine that the first functional module is also powered off. For example, Figure 2 The camera shown may not have the power-off reporting function, but the first PMIC may have the power-off reporting function. When the switch tube Q4 is disconnected, the first PMIC is powered off, and then the first PMIC generates a second interrupt signal to report to the control module. Of course, in other examples, Figure 2 The camera shown may also have a power-off reporting function.

[0109] It should be understood that in other examples, when the first functional module has a power-off reporting function, the power-off event of the first functional module can also be learned through the second interrupt signal reported by the first power management module.

[0110] In the third example, after the first functional module is powered off, the user may trigger a power-on operation on the first functional module. For example, when the user finds that the secondary screen is black, the user may try to wake up the secondary screen by pressing the power button, folding the folding screen, etc. It can be seen that the user triggering the power-on operation on the first functional module may represent that the first functional module is powered off. Therefore, in response to the user's power-on operation on the first functional module, the control module may actively detect the power-off condition of the first functional module to determine whether the first functional module is powered off. In the case of detecting that the first functional module is powered off, the control module determines that the first functional module is powered off. Exemplarily, the control module can detect the power-off condition of the first functional module by reading the pin voltage of the first functional module through an analog to digital converter (ADC).

[0111] The fourth example is that static electricity is extremely harmful to electronic devices. Static electricity events may cause electronic devices to malfunction or even be damaged, such as display abnormalities, touch failure, etc. Electronic devices have static electricity standards. Electronic devices are usually equipped with both hardware and software electrostatic discharge protection (ESD). The ESD on the software is called ESD check. ESD check is used to detect static electricity events that occur in the first functional module. The first functional module is abnormally powered off when a static electricity event occurs. When the ESD check detects the static electricity event that occurs in the first functional module, it will periodically trigger the power-on operation of the first functional module. The subsequent periodic triggering of the power-on operation of the first functional module by the ESD check is called the ESD power-on operation. It can be seen that the electronic device can determine that the first functional module is powered off based on the ESD power-on operation.

[0112] In a fifth example, the electronic device periodically (eg, every 10 ms) detects the power-off status of the first functional module, so that it can be determined at the first time that the first functional module is powered off.

[0113] Combine the following Figure 2 and Figure 7 Take the method shown in the first example above as an example of the control module determining the power-off of the secondary screen. Figure 6 The power-on control method provided is described in detail. It should be understood that Figure 7 The control module is Figure 2 The processor and the first switch tube shown are Figure 2 The switch tube Q4 and the first functional module shown are Figure 2 The secondary screen shown is used as an example for explanation.

[0114] Please refer to Figure 7 , Figure 7 The process of the power-on control method provided in the embodiment of the present application Figure 3 For ease of explanation, only the parts related to this embodiment are shown, which are described in detail as follows:

[0115] S701, the processor receives an interrupt signal sent by the secondary screen.

[0116] Among them, the secondary screen has an abnormality reporting function, that is, it actively sends an interrupt signal to the processor when an abnormality occurs to indicate its own abnormality and the cause of the abnormality. For example, when the secondary screen is powered off, the secondary screen reports the first interrupt signal.

[0117] S702, the processor determines whether the interrupt signal sent by the secondary screen is the first interrupt signal.

[0118] When the interrupt signal sent by the secondary screen is the first interrupt signal, it indicates that the secondary screen is powered off, resulting in a black screen, and S703 is executed.

[0119] When the interrupt signal sent by the secondary screen is not the first interrupt signal, it indicates that other reasons cause the secondary screen to go black, and S705 is executed.

[0120] S703: The processor obtains the state of the switch tube Q4.

[0121] For example, the processor reads data of the status register of the switch tube Q4 to obtain the status of the switch tube Q4.

[0122] S704, determining whether the state of the switch tube Q4 is in the off state.

[0123] For example, if the data of the status register of the switch tube Q4 is bit 1, it means that the state of the switch tube Q4 is the disconnected state; for example, if the data of the status register of the switch tube Q4 is bit 0, it means that the state of the switch tube Q4 is not the disconnected state.

[0124] If the switch tube Q4 is in the off state, execute S705.

[0125] If the state of the switch tube Q4 is not the open state, that is, the state of the switch tube Q4 is the closed state, S706 is executed.

[0126] S705, the processor switches the state of the switch tube Q4 to a closed state.

[0127] For example, the processor sets the register for switching the state of the switch tube Q4 to bit 0, so that the charging driver pulls down the control terminal of the switch tube Q4 based on the data in the register, thereby driving the switch tube Q4 to open, that is, switching to a closed state.

[0128] If the state of the switch tube Q4 is disconnected, it means that the switch tube Q4 is disconnected, causing the secondary screen to be black. At this time, S705 is executed to switch the state of the switch tube Q4 to a closed state. When the state of the switch tube Q4 is switched to a closed state, the secondary screen is powered on again and the screen is bright.

[0129] S706, end the process.

[0130] If the switch tube Q4 is in the closed state, it means that the secondary screen is black due to other reasons. Therefore, the process ends by executing S706.

[0131] In other embodiments, if the state of the switch tube Q4 is closed, it means that the secondary screen is black due to other reasons, and the electronic device re-executes the normal process of lighting the secondary screen of the electronic device (for example, the process of lighting the secondary screen after the electronic device is turned on) to light it up. Otherwise, it can be considered that the secondary screen is black due to reasons such as damage to the secondary screen itself that require hardware maintenance to solve. In this case, the corresponding instruction information can be output to indicate hardware maintenance.

[0132] Figure 2 In the electronic device shown, when the switch tube Q4 is disconnected, the secondary screen will also be powered off at the same time and immediately be in a black screen state. Figure 7 In the power-on control method shown, when the secondary screen is powered off, the secondary screen can report its own power-off event at the first time. In this way, the control module can learn about the secondary screen power-off event at the first time, and actively obtain the state of the switch tube Q4 at the first time, so that the switch tube Q4 can be known to be disconnected at the first time. When it is obtained that the switch tube Q4 is in the disconnected state, the switch tube Q4 is reset to the closed state. In this way, the secondary screen can be controlled to power on again at the first time, so that the secondary screen can be restored to the bright screen at the first time to ensure the user experience.

[0133] In addition, in this embodiment, when the interrupt signal sent by the sub-screen is the first interrupt signal, it means that the power-off of the sub-screen may be caused by the disconnection of the switch tube Q4. By executing S703, the probability of obtaining the event that the switch tube Q4 is in the disconnected state in S703 can be increased; and when the interrupt signal sent by the sub-screen is not the first interrupt signal, it means that the power-off of the sub-screen is not caused by the disconnection of the switch tube Q4. By executing S706, the process can be ended early when it is destined that the event of the disconnection of the switch tube Q4 cannot be obtained, so as to avoid occupying the operating resources of the electronic device.

[0134] In addition, in this embodiment, since the electronic device turns on the switch tube Q4 the first time it is turned off, when the user finds a black screen and performs a restart operation on the secondary screen, the electronic device restarts the electronic device in response to the user's restart operation on the electronic device. When the secondary screen is initialized during the first restart of the electronic device, since the switch tube Q4 has been closed at the first time, the secondary screen is powered on and initialized successfully, and the secondary screen is restored. It can be seen that this embodiment can restore the secondary screen by restarting the electronic device once.

[0135] Please refer to Figure 8 , Figure 8 The process of the power-on control method provided in the embodiment of the present application Figure 4 Different from Figure 7 , after S702 and before S703, Figure 8 The power-on control method shown also includes:

[0136] S801, the processor obtains the number of times the switch tube Q4 is turned off after the electronic device is turned on.

[0137] The number of shutdown times is used to represent the number of times the state of the switch tube Q4 is switched from the closed state to the open state.

[0138] Before S801, the electronic device can count the number of times the switch tube Q4 is turned off after the electronic device is turned on, so that the control module can obtain the number of times the switch tube Q4 is turned off after the electronic device is turned on when executing S801. Each time the switch tube Q4 is turned off, the electronic device adds one to the count of the number of times the switch tube Q4 is turned off after the electronic device is turned on.

[0139] During the specific implementation process, a variable can be set, and the variable can be cleared during the startup or shutdown process of the electronic device, and each time the switch tube Q4 is turned off, the variable is increased by one, so as to realize the statistics of the number of times the switch tube Q4 is turned off after the electronic device is turned on. It should be understood that the execution of S705 is due to the switch tube Q4 being turned off, so each execution of S705 indicates that the switch tube Q4 is turned off once. Therefore, the variable used to count the number of times the switch tube Q4 is turned off can be increased by one after each execution of S705. In this way, the next execution Figure 8 In the power-on control method shown, by obtaining the value of the variable, the number of times the switch tube Q4 is turned off after the electronic device is turned on can be obtained. Of course, in other embodiments, the variable can be counted at other nodes that characterize the increase in the number of times the switch tube Q4 is turned off after the electronic device is turned on. For example, after determining in S704 that the state of the switch tube Q4 is the disconnected state, one is added to achieve statistics, and the embodiment of the present application is not limited to this.

[0140] It should be understood that the power-on process refers to the process from when an electronic device is triggered to start up to when it is finally completed. Taking a mobile phone as an example, when the mobile phone receives a power-on operation from the user on the power button, it can be regarded as being triggered to start up, and when the mobile phone finally displays the screen saver, it can be regarded as finally completing the startup. The shutdown process refers to the process from when an electronic device is triggered to shut down to when it is finally completed. Also taking a mobile phone as an example, when the mobile phone receives a power-off operation from the user on the power button, it can be regarded as being triggered to start up, and when the mobile phone finally displays a black screen, it can be regarded as finally completing the shutdown.

[0141] S802, the processor determines whether the number of times the switch tube Q4 is turned off after the electronic device is turned on is less than or equal to a preset number of times.

[0142] For example, the preset shutdown times may be ten times.

[0143] If the number of times the switch tube Q4 is turned off after the electronic device is turned on is less than or equal to the preset number of times, S703 is executed.

[0144] If the number of times the switch tube Q4 is turned off after the electronic device is turned on is greater than the preset number of times, S706 is executed.

[0145] It should be understood that if the number of times the switch tube Q4 is turned off after the electronic device is turned on is greater than the preset number of times, that is, the preset number of times is reached, it means that the switch tube Q4 is frequently turned off after the electronic device is turned on, which indicates that the subsequent circuit of the switch tube Q4 may face safety hazards, and the electronic device protects the subsequent circuit by continuously turning off the switch tube Q4. Therefore, in order to avoid damage to the subsequent circuit of the switch tube Q4, the process is terminated by executing S706, so that the switch tube Q4 is no longer reopened to protect the subsequent circuit of the switch tube Q4.

[0146] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0147] The embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the power-on control method of any of the above embodiments when executing the computer program.

[0148] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the power-on control method as described in any of the above embodiments is implemented.

[0149] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.

[0150] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A power-on control method, applied to an electronic device, characterized in that: include: Determining that a first functional module in the electronic device cannot operate, wherein the first functional module is coupled to a battery in the electronic device through a first switch tube in the electronic device; Acquire the state of the first switch tube; When the state of the first switch tube is an open state, the state of the first switch tube is switched to a closed state, so that the battery supplies power to the first functional module.

2. The power-on control method according to claim 1, characterized in that: The determining that the first functional module in the electronic device cannot operate includes: When it is determined that the first functional module is powered off, it is determined that the first functional module in the electronic device cannot operate.

3. The power-on control method according to claim 2, characterized in that: The first functional module is used to output a first interrupt signal when the first functional module is powered off; When the first interrupt signal is obtained, it is determined that the first functional module is powered off.

4. The power-on control method according to claim 2, characterized in that: After determining that the first functional module in the electronic device cannot operate and before obtaining the state of the first switch tube, the method further includes: In response to a power-on operation performed by a user on the first functional module, detecting a power-off condition of the first functional module; In a case where it is detected that the first functional module is powered off, it is determined that the first functional module is powered off.

5. The power-on control method according to claim 2, characterized in that: In the case where an electrostatic discharge (ESD) power-on operation is detected, it is determined that the first functional module is powered off.

6. The power-on control method according to claim 2, characterized in that: The electronic device further comprises a first power management module, wherein the first power management module is coupled to a line through which the first functional module is coupled to the battery via the first switch tube; The first power management module is used to output a second interrupt signal when the first power management module is powered off, and the second interrupt signal is used to indicate that the first power management module is powered off; When the second interrupt signal is obtained, it is determined that the first functional module is powered off.

7. The power-on control method according to any one of claims 1 to 6, characterized in that: After determining that the first functional module in the electronic device cannot operate and before obtaining the state of the first switch tube, the method further includes: Obtaining the number of times the first switch tube is turned off after the electronic device is turned on; The obtaining the state of the first switch tube includes: When the number of shutdown times is less than or equal to the preset number of shutdown times, the state of the first switch tube is obtained.

8. The power-on control method according to any one of claims 1 to 7, characterized in that: The electronic device has a status register for storing the status of the first switch tube; The obtaining the state of the first switch tube includes: The state of the first switch tube is obtained from the state register.

9. The power-on control method according to any one of claims 1 to 8, characterized in that: The electronic device is a foldable mobile phone; the foldable mobile phone includes a main screen and a secondary screen; the foldable mobile phone also includes a processor and a first charging management module; wherein the first functional module is the secondary screen; The first switch tube is a switch tube in the first charging management module for controlling power on and power off of the secondary screen; The processor is coupled to the battery, and the processor is coupled to the battery without being coupled to the battery through the first switch tube.

10. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 9 when executing the computer program.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.