CN115963913A - Real-time clock power supply method, power supply circuit and storage medium - Google Patents

Real-time clock power supply method, power supply circuit and storage medium Download PDF

Info

Publication number
CN115963913A
CN115963913A CN202310257289.4A CN202310257289A CN115963913A CN 115963913 A CN115963913 A CN 115963913A CN 202310257289 A CN202310257289 A CN 202310257289A CN 115963913 A CN115963913 A CN 115963913A
Authority
CN
China
Prior art keywords
battery
real
time clock
power supply
electronic device
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.)
Pending
Application number
CN202310257289.4A
Other languages
Chinese (zh)
Inventor
张瑜
池咏伦
连振泰
徐菘哲
张喜条
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Lianbao Information Technology Co Ltd
Original Assignee
Hefei Lianbao Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hefei Lianbao Information Technology Co Ltd filed Critical Hefei Lianbao Information Technology Co Ltd
Priority to CN202310257289.4A priority Critical patent/CN115963913A/en
Publication of CN115963913A publication Critical patent/CN115963913A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Power Sources (AREA)

Abstract

The application provides a real-time clock power supply method, a power supply circuit and a storage medium. The real-time clock power supply method comprises the following steps: monitoring the power-off state of the portable electronic equipment; when the power supply enters a closed state, storing the first current time of the real-time clock module and the data to be backed up in the random access memory of the embedded controller into the read only memory of the embedded controller within a preset time length, and controlling the timing module to continue timing; and when the power supply exits the off state, controlling the timing module to stop timing, obtaining second current time according to the timing and the first current time stored in the read-only memory of the embedded controller, and storing the second current time and the data to be backed up into the random access memory of the embedded controller so that the real-time clock module can read the second current time and the data to be backed up. According to the method and the device, the portable electronic equipment can complete the backup of the time of the real-time clock module and the data to be backed up without setting an independent battery for the processor.

Description

Real-time clock power supply method, power supply circuit and storage medium
Technical Field
The present disclosure relates to electronic circuits, and particularly to a real-time clock power supply method, a power supply circuit, and a storage medium.
Background
At present, in order to ensure the system Time of an electronic device, for a portable electronic device that needs to use a battery, a Real-Time Clock (RTC) battery, such as a button battery, is generally needed to be provided for a RTC circuit, and the RTC battery can provide a Clock frequency for calculating daily Time for the electronic device and is used for storing Time information and electric energy set by an integrated circuit, so as to ensure that the electronic device maintains a normal Clock frequency. However, when the button cell is exhausted, the timing information and the Basic Input Output System (BIOS) configuration data stored in the CMOS (Complementary Metal Oxide Semiconductor) are lost. Although there are portable electronic devices in which the RTC battery is integrated into the main battery, when the battery needs to be temporarily removed, such as in the case of hardware upgrade or maintenance of the electronic device, the timing information and the BIOS (Basic Input Output System) configuration data stored in the CMOS (Complementary Metal Oxide Semiconductor) are still lost.
Disclosure of Invention
The present application has been made keeping in mind at least one of the above problems occurring in the prior art. According to an aspect of the present application, there is provided a real-time clock power supply method applied to a portable electronic device having a battery, the method including:
monitoring a power off state of the portable electronic device;
when the power supply enters a closed state, storing first current time of a real-time clock module and data to be backed up in a random access memory of an Embedded Controller (EC) into a read only memory of the embedded controller within a discharge time period of a capacitor of a power supply circuit, and controlling a timing module to continue timing;
and when the power supply exits the off state, controlling the timing module to stop timing, obtaining second current time according to the timing and the first current time stored in a read-only memory of the embedded controller, and storing the second current time and the data to be backed up into a random access memory of the embedded controller so that the real-time clock module can read the second current time and the data to be backed up.
In some embodiments, monitoring the power off state of the portable electronic device comprises:
monitoring whether the portable electronic device enters a transport mode;
determining that the power source enters an off state when the portable electronic device enters a transport mode;
determining that the power source exits the off state when the portable electronic device exits the transport mode.
In some embodiments, monitoring the power off state of the portable electronic device comprises:
monitoring that a battery of the portable electronic device is unloaded while the portable electronic device is in a non-transport mode;
determining that the power source enters an off state when the battery is unloaded;
determining that the power source exits an off state when the battery is assembled.
In some embodiments, monitoring the portable electronic device for battery unloading includes:
monitoring the level of the input end of the embedded controller;
when the condition that the level of the input end of the embedded controller is changed from high level to low level is monitored, determining that the battery is unloaded;
and when the level of the input end of the embedded controller is monitored to be changed from low level to high level, determining that the battery is assembled.
In some embodiments, the data to be backed up includes at least one of: timing data of the timing module, the time when the power supply enters the off state and configuration data of a basic input output system.
In some embodiments, when the embedded controller comprises a real-time clock module, the timing module comprises a fuel gauge of the battery or a real-time clock module of the embedded controller; when the embedded controller does not include a real-time clock module, the timing module includes a fuel gauge of the battery.
Another aspect of the embodiments of the present application provides a real-time clock power supply circuit, which is applied to a portable electronic device having a battery, where the power supply circuit includes an embedded controller, a processor, a voltage regulator, and a battery; the embedded controller is connected with the battery through a bus so as to monitor the unloaded condition of the battery; the processor is provided with a real-time clock module, and is connected with the embedded controller through a bus so as to carry out data communication with the embedded controller; the battery is connected with the processor through the voltage regulator to supply power to a real-time clock module in the processor.
In some embodiments, the battery is connected to an anode of a first diode, a cathode of the first diode is connected to the first terminal of the voltage regulator, a cathode of the first diode is further connected to a first terminal of a capacitor, a second terminal of the capacitor is grounded, a second terminal of the voltage regulator is connected to an anode of a second diode, and a cathode of the second diode is connected to the real-time clock module of the processor.
In some embodiments, wherein the battery is further grounded through a resistor.
A further aspect of the embodiments of the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to execute the real-time clock power supply method as described above.
According to the real-time clock power supply method, the power supply circuit and the storage medium of the embodiment of the application, by monitoring the closing state of the operating system of the portable electronic device, when the operating system enters the closing state, the first current time of the real-time clock module and the data to be backed up in the random access memory of the embedded controller are backed up, and when the operating system exits the closing state, the second current time and the data to be backed up are obtained according to the first current time, so that the portable electronic device can also complete the backup of the time of the real-time clock module and the data to be backed up under the condition that an independent battery does not need to be set for a processor.
Drawings
Fig. 1 shows a schematic flow chart of a real-time clock power supply method in the conventional art;
FIG. 2 shows a schematic flow diagram of a method of powering a real time clock according to an embodiment of the application;
FIG. 3 illustrates a schematic flow chart diagram of a BIOS synchronizing and backing up data in RTC registers according to an embodiment of the present application;
FIG. 4 shows a schematic flow diagram of an EC backing up the time of an RTC according to an embodiment of the present application;
FIG. 5 shows a schematic flow diagram of an EC backing up data in an RTC according to an embodiment of the present application;
FIG. 6 shows a schematic block diagram of a real time clock supply circuit according to an embodiment of the present application;
fig. 7 shows a schematic block diagram of a portable electronic device according to an embodiment of the present application.
Detailed Description
For those skilled in the art to better understand the technical solutions of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and the detailed description.
As shown in fig. 1, a schematic block diagram of a real-time clock power supply circuit 100 in the conventional art is shown. The real-time clock power supply circuit 100 is applied to a portable electronic device, such as a notebook computer. The real-time clock power supply circuit in the figure includes a battery 105, and the battery 105 is connected to a Central Processing Unit (CPU) 101 through a voltage Regulator (Regulator) 104 and a diode 106 to supply power to the CPU 101. In the conventional art, the RTC module of the CPU is powered by a separate button battery in a Shipping mode (Shipping mode) or in the case where the battery is removed. Under normal conditions, the RTC battery supplies power, and if the RTC battery is exhausted, the battery divides a portion of the 3.3v voltage originally allocated to the Embedded Controller (EC) power supply to supply power to the RTC module.
Therefore, in the real-time clock power supply circuit 100, the timing and the data storage are independently performed by the RTC module of the CPU, but in case of power off, the RTC 102 can still continue timing, because the button battery 103 needs to be separately provided for the RTC module 102 in the clock power supply circuit 100 to supply power to the RTC module 102. Therefore, when the portable electronic device is turned on again, the timer clock built in the portable electronic device reads the current time from the RTC 102, and the time is displayed under the mechanism of the timer clock while power is supplied on the basis, and at the moment, the system clock can be consistent with the standard clock, and the user does not need to perform operations such as setting the system time and the like. However, when the portable electronic device needs to be temporarily removed, such as during a repair, the timing information and the BIOS configuration data are lost.
That is, since the Memory cell of the RTC module is a Random Access Memory (RAM), power needs to be supplied all the time, and if power is off, all data stored in a Complementary Metal Oxide Semiconductor (CMOS) module, including BIOS configuration data, system time, etc., will be lost.
Based on at least one of the foregoing technical problems, the present application provides a real-time clock power supply method applied to a portable electronic device having a battery, the method including: monitoring a power off state of the portable electronic device; when the power supply enters a closed state, storing the first current time of the real-time clock module and the data to be backed up in the random access memory of the embedded controller into the read only memory of the embedded controller within the discharge duration of the capacitor of the power supply circuit, and controlling the timing module to continue timing; and when the power supply exits the off state, controlling the timing module to stop timing, obtaining second current time according to the timing and the first current time stored in a read-only memory of the embedded controller, and storing the second current time and the data to be backed up into a random access memory of the embedded controller so that the real-time clock module can read the second current time and the data to be backed up. According to the embodiment of the application, the portable electronic equipment can also finish the function of storing the time of the RTC module and the data to be backed up under the condition that an independent battery is not required to be arranged for the CPU.
FIG. 2 shows a schematic flow diagram of a method of powering a real time clock according to an embodiment of the application; as shown in fig. 2, a real-time clock power supply method 200 according to an embodiment of the present application may include steps S201, S202, and S203:
in step S201, the power off state of the portable electronic device is monitored.
Generally, a power supply of an electronic device has the following operating states:
first, S0 (G0) indicates a normal operating state in which the electronic device is in full operation and the CPU, DIM, PCH, and hard disk all start operating.
Secondly, the G1 (sleep) state and the sleep state of the electronic device include four states S1 to S4, and power consumption corresponding to different sleep modes is different, which is specifically as follows:
(1) The S1 state is the most power-consuming sleep mode, all registers of the CPU are refreshed, the CPU stops executing instructions, but the CPU and a DIM power supply are not lost;
(2) In the S2 state, the CPU is powered off and is not used normally;
(3) In the S3 state, the task is hung in the memory, when the state is awakened (S3- > S0), the work of the user just right can be recovered to the same state before sleeping, but if AC is suddenly powered down in the state, the data processed by the user before is lost;
(4) In the S4 state, the task is hung on the hard disk, when the state is awakened (S4- > S0), the work of the user just right now can be recovered to the same state before the sleep, but if the AC is suddenly powered down in the state, the data processed by the user before can not be lost, and the work state before the sleep mode can still be recovered after the restart.
And thirdly, in the S5 state, all equipment including the power supply is completely closed.
Fourth, in the G3 state, the AC is powered down, and only the RTC power supply is arranged on the mainboard.
In the embodiment of the application, when the electronic device enters the S5 state, all devices including the power supply are turned off, the first current time of the RTC module and the data to be backed up in the EC RAM cannot be saved, and in order to prevent the first current time and the data to be backed up in the EC RAM from being lost, the off state of the power supply of the portable electronic device needs to be monitored, so that the data to be backed up in the EC RAM and the first current time are backed up before the battery enters the off state. For example, the BIOS backs up data in the RTC register, the EC backs up the time of the RTC, and the EC backs up the time of the RTC.
Generally, when the portable electronic device is in a transport mode (ship mode), and the battery is unloaded, the power supply of the portable electronic device is turned off, and therefore, the two situations need to be monitored.
In one embodiment of the present application, monitoring the power off state of the portable electronic device comprises:
a1, monitoring whether the portable electronic equipment enters a transportation mode;
a2, when the portable electronic equipment enters a transportation mode, determining that the power supply enters a closed state;
and A3, when the portable electronic equipment exits the transportation mode, determining that the power supply exits the off state.
The transport mode in the embodiment of the present application refers to a minimum quiescent current state of the electronic device, and in order to maximally extend the storage life, the manufacturer already enables the state before the electronic device leaves the factory, so that the battery power is not exhausted when a consumer obtains the electronic device, the transport mode substantially disconnects the battery, reduces the battery power loss, and activates the battery when the consumer turns on the electronic device for the first time. Thus, whether to enter or exit the off state may be determined based on an enter transport mode command of the controller.
In another embodiment of the present application, wherein monitoring the power off state of the portable electronic device comprises:
b1, monitoring the condition that a battery of the portable electronic equipment is unloaded when the portable electronic equipment is in a non-transportation mode;
b2, when the battery is unloaded, determining that the power supply enters an off state;
and B3, determining that the power supply exits the off state when the battery is assembled.
In one example, monitoring the portable electronic device for battery unloading includes:
c1, monitoring the level of the EC input end;
c2, when the input end level of the EC is monitored to be changed from a high level to a low level, the battery is determined to be unloaded;
and C3, when the input end level of the EC is monitored to be changed from low level to high level, determining that the battery is assembled.
In step S202, when the power supply enters the off state, the first current time of the real-time clock module and the data to be backed up in the random access memory of the embedded controller are stored in the read only memory of the embedded controller within the discharge duration of the capacitor of the power supply circuit, and the timing module is controlled to continue timing.
In one embodiment of the present application, the data to be backed up includes at least one of: timing data of the timing module, the time when the power supply enters the off state, and configuration data of the BIOS.
In one embodiment of the application, when the EC comprises the RTC module, the timing module comprises the fuel gauge of the battery or the RTC module of the EC; when the EC does not include an RTC module, the timing module includes a fuel gauge of the battery.
Since the fuel gauge in the battery is still counting time in the case where the battery is removed, when the electronic device enters the transportation mode (shifting mode), the battery is not removed from the electronic device, and therefore, when the electronic device receives an instruction to exit the shifting mode and enter the Non-transportation mode (Non-shifting mode), the counted time can be read from the battery. The same is true for the case where the battery is removed.
The process of backing up data to be backed up according to the embodiment of the present application is described below.
FIG. 3 shows a schematic flow diagram of a BIOS backing up data in RTC registers according to an embodiment of the present application. As shown in fig. 3, the method 300 for backing up data in RTC registers by the BIOS according to the embodiment of the present application may include the following steps S301, S302, S303, S304 and S305:
in step S301, the system enters a power-on state.
In step S302, the BIOS reads the EC RAM to determine whether a power-off action is available; if so, step S303 is performed, otherwise step S305 is performed. When the electronic equipment is powered off, the data stored in the EC RAM is lost.
In step S303, the BIOS reads the backup time and the data to be backed up from the EC RAM. If there is a power-off action, the time and the data to be backed up need to be backed up. Both the time and the data to be backed up are stored in the EC RAM.
In step S304, the BIOS writes to the RTC register. In the RTC module, registers in the RTC module are used to store time and other data.
In step S305, the BIOS writes the backup time and the data to be backed up stored in the RTC register into the EC RAM.
FIG. 4 shows a schematic flow diagram of an EC backing up the time of an RTC according to an embodiment of the present application; as shown in fig. 4, a method 400 for backing up time of an RTC by an EC according to an embodiment of the present application may include the following steps S401, S402, and S403:
in step S401, the RTC is in a time counting state.
In step S402, the BIOS synchronously updates the time of RTC time keeping to the EC RAM second by second.
In step S403, it is determined whether there is an action to unload the battery or a ship mode instruction; if yes, go to step S404; otherwise, return to execute step S403.
In step S404, EC records the time T counted by the electricity meter counter in the current battery 1 And the action of powering off each household and the time T in the current EC RAM 2 Stored in the EC ROM.
It is worth noting that the electricity meter counter starts counting from the moment the electronic device is activated, so T 1 Indicates the time that has elapsed since the time of activation until the action of unloading the battery or entering the ship mode, for example, the electronic apparatus has elapsed 200 hours from the time of activation. While the time T in the current EC RAM 2 The system time is represented, for example, by the current time of 1 month, 1 day, 9 o' clock, 01 min in 2000.
In step S405, when the main board is powered down, the electricity meter counter in the battery is still in a timing state.
In step S406, when the motherboard is powered up again, the EC reads the latest timing T of the electricity meter counter 3 And calculating the current time, and writing the current time and the power-off action into the EC RAM.
At this time, the electricity meter counter is last timed for a time T 3 Which represents the time that has elapsed since the electronic device was activated until the motherboard was powered up again, e.g., 205 hours.
Then, the current time = (T) 3 -T 1 )+T 2
When T is 1 Is 200 hours, T 2 At 9 o' clock 01 time of 1 month and 1 day of 2000, T 3 The current time when the mainboard is powered on again is 1 month, 1 day, 1 year, 14 o' clock 01 min in 2000.
FIG. 5 shows a schematic flow diagram of an EC backing up the time of an RTC according to an embodiment of the present application; as shown in fig. 5, a method 500 for backing up time of an RTC by an EC according to an embodiment of the present application may include the following steps S501, S502, and S503:
in step S501, the BIOS updates the RTC data.
In step S502, the BIOS simultaneously updates the RTC data to the EC RAM.
In step S503, whether there is an instruction to unload the battery or enter the ship mode; if yes, executing step S504; otherwise, step S503 is executed.
In step S504, the EC records the RTC data in a charged Erasable Programmable read only memory (EEPROM) or ROM of the EC.
In step S505, the EC is started, and the RTC data stored in the ROM is stored in the EC RAM.
In step S203, when the power supply exits the off state, the timing module is controlled to stop timing, a second current time is obtained according to the timing and the first current time stored in the rom of the embedded controller, and the second current time and the data to be backed up are stored in the ram of the embedded controller, so that the real-time clock module can read the second current time and the data to be backed up.
From the above description of step S406, it is known how to determine the second current time based on the time recorded by the timing module. And will not be described in detail herein.
According to the embodiment of the application, by monitoring the off state of the power supply of the portable electronic equipment, when the power supply enters the off state, the first current time of the RTC module and the data to be backed up in the EC RAM are backed up, and when the power supply exits the off state, the second current time is obtained according to the first current time and the data to be backed up are obtained, so that the portable electronic equipment can also finish the function of storing the time of the RTC module and the data to be backed up under the condition that an independent battery is not required to be set for the processor.
As shown in fig. 6, a schematic block diagram of a real-time clock supply circuit according to an embodiment of the present application is shown. The real-time clock power supply circuit 600 is applied to a portable electronic device such as a notebook computer. The real-time clock power supply circuit 600 according to an embodiment of the present application may include a battery 601, a CPU 605, and an Embedded Controller (EC) 606. The CPU 605 is provided with an RTC module.
The battery 601 of the real-time clock supply circuit 600 in fig. 6 is connected to the CPU 605 through a voltage Regulator (Regulator) 604 and a first diode 603 to supply power to the CPU 605.
In one example, the battery 601 is connected to an anode of a first diode 603, a cathode of the first diode 603 is connected to a first terminal of the voltage regulator 604, a cathode of the first diode 603 is further connected to a first terminal of a capacitor 609, a second terminal of the capacitor 609 is connected to ground, a second terminal of the voltage regulator 604 is connected to an anode of a second diode 608, and a cathode of the second diode 608 is connected to the RTC module 607 of the CPU. The voltage output by the battery in the embodiment of the application is not exactly consistent with the actual voltage when the CPU runs, so that the voltage regulator is required to regulate the voltage output by the battery. Here the first diode 603 may function to prevent current from flowing backwards. A capacitor 609 is provided between the first diode 603 and the voltage regulator, and the capacitor 609 can be charged by the battery 601 when the electronic device is in normal use. When the battery 601 is unloaded most, the capacitor 609 will discharge, and the discharge current will flow through the voltage regulator 604 to the RTC module. The RTC module is allowed to have enough time, and the time and data stored in the RTC module are stored in a storage device such as an EC ROM.
Wherein the CPU is connected with the EC through a bus (eSPI) to communicate data with the EC. The EC of this embodiment can read the time and other data to be backed up stored in the RTC module in the CPU, so as to store the time and other data to be backed up in the storage device such as the EC ROM. In other embodiments, when the EC itself has the RTC, the time may be stored into the EC's own RTC.
Wherein the EC is connected to the battery via a bus (SMbus) to monitor the unloaded condition of the battery.
In a particular embodiment, the EC is connected to the battery via a bus (SMbus) and transmits commands to the battery. For example, when the battery enters a shutdown state, an instruction is sent to the battery instructing the amount of charge in the battery to begin timing, and when the battery is reassembled, the timing time of the fuel gauge in the battery is read. The EC and the battery may also be connected via a second line for monitoring whether the battery (in particular the level at the EC input is high or low) is unloaded.
Wherein the battery is also grounded through a resistor. The resistor is required to have a large resistance, for example, 1M Ω.
The present application will now be described with respect to the two scenarios described above in conjunction with a real time clock supply circuit.
In a first scenario, the electronic device moves mode to non-moving mode.
Firstly, when the electronic equipment receives a command of entering a bridging mode, the BIOS reads the time and the data stored in the CMOS, stores the time and the data in the CMOS into the ROM of the BIOS, simultaneously informs an electricity meter in the battery to start timing through the SMbus, and the system enters an S5 state and the battery stops supplying power.
And secondly, when the electronic equipment enters a Non shifting mode, starting up the system for the first time, and supplying power to the battery. And reading the total time and data of the fuel gauge by the EC through the SMBUS, superposing the total time and data to the time point saved in the bridging mode, writing the total time and data into the EC RAM, and reading the backup time and data from the EC RAM by the BIOS and writing the backup time and data into the CPU RTC module for continuous timing.
Thirdly, when the system command is received and S5 is entered, BIOS writes the time and data of RTC register into EC RAM.
And fourthly, if the EC has the self RTC module, the EC RTC starts to time, and if the EC does not have the RTC module, the EC RTC informs the battery ammeter of timing.
Fifthly, when the computer is started again, the BIOS reads the EC RAM to confirm whether the action of power failure exists or not, if not, the BIOS does not do any action, the BIOS keeps the timing and data of the current CPU RTC module, and if the action of power failure exists, the BIOS reads backup time and data from the EC RAM and writes the backup time and data into the CPU RTC module.
In the second scenario, in case the battery is removed, for example, a user upgrades the computer hardware or repairs the battery, the motherboard may suddenly power down, at which time the EC has no way to read the data out and give an off-battery command for the first time, the following steps will be performed:
firstly, a set of detection monitoring (detect) signals is added, and the detection monitoring signals are output from a General-purpose input/output (GPIO) pin of the electricity meter and input from a GPIO pin of the EC. The input of EC is low when the battery is removed and high when the battery is inserted.
And secondly, adding a diode and a capacitor to the input end of the EC 3.3V power supply chip, wherein when the battery is removed, the capacitor plays a role of discharging to prolong the duration of 3.3V, and the diode plays a role of preventing the discharging of the capacitor from leaking to other places.
Thirdly, when the normal battery is removed, the computer is in an S5 state, when the battery is removed, the EC detects the action, the time and the data in the EC RAM are read out and stored in the ROM of the EC by utilizing the discharge time of the capacitor, and the electricity meter continues to count time.
Fourthly, the battery is reassembled, the electricity meter stops timing and stores the time length, the EC starts, the timing value of the electricity meter is read and added to the time recorded before the power failure, and the time is stored in the EC RAM.
And fifthly, starting up again, and entering the fifth step under the non-transportation mode in the same transportation mode.
The portable electronic device of the present application is described below with reference to fig. 7, where fig. 7 shows a schematic block diagram of the portable electronic device according to an embodiment of the present application.
As shown in fig. 7, the portable electronic device 700 includes: one or more memories 701 and one or more processors 702, the memory 701 having stored thereon a computer program to be run by the processor 702, the computer program, when run by the processor 702, causing the processor 702 to perform the real-time clock powering method as described above.
The portable electronic device 700 may be part or all of a computer device that may implement the design method of the power device layout by software, hardware, or a combination of software and hardware.
As shown in fig. 7, the portable electronic device 700 includes one or more memories 701, one or more processors 702, a display (not shown), a communication interface, and the like, which are interconnected via a bus system and/or other form of connection mechanism (not shown). It should be noted that the components and configuration of the portable electronic device 700 shown in fig. 7 are exemplary only, and not limiting, and that the portable electronic device 700 may have other components and configurations as desired.
The memory 701 is used for storing various data and executable program instructions generated during the operation of the associated train, for example, for storing various application programs or algorithms for implementing various specific functions. May include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, etc.
The processor 702 may be a Central Processing Unit (CPU), image processing unit (GPU), application Specific Integrated Circuit (ASIC), field Programmable Gate Array (FPGA) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may be other components in the portable electronic device 700 to perform the desired functions.
In one example, the portable electronic device 700 further includes an output that the portable electronic device can output various information (e.g., images or sounds) to an external (e.g., user), and can include displaying one or more of the portable electronic device, speakers, and the like.
The communication interface may be any interface of any presently known communication protocol, such as a wired interface or a wireless interface, wherein the communication interface may include one or more serial ports, USB interfaces, ethernet ports, wiFi, wired network, DVI interfaces, device integrated interconnect modules, or other suitable various ports, interfaces, or connections.
Furthermore, according to an embodiment of the present application, there is also provided a storage medium on which program instructions are stored, which when executed by a computer or a processor are used for executing the corresponding steps of the real-time clock power supply method of the embodiment of the present application. The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, or any combination of the above storage media.
The portable electronic device and the storage medium according to the embodiments of the present application have the same advantages as the real-time clock power supply method described above because the real-time clock power supply method described above can be implemented.
Although the example embodiments have been described herein with reference to the accompanying drawings, it is to be understood that the above-described example embodiments are merely illustrative and are not intended to limit the scope of the present application thereto. Various changes and modifications may be effected therein by one of ordinary skill in the pertinent art without departing from the scope or spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as claimed in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the description of exemplary embodiments of the present application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the method of the present application should not be construed to reflect the intent: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
It will be understood by those skilled in the art that all of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where such features are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some of the modules according to embodiments of the present application. The present application may also be embodied as portable electronic device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several portable electronic devices, several of these portable electronic devices can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above description is only for the specific embodiments of the present application or the description thereof, and the protection scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope disclosed in the present application, and shall be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A real-time clock power supply method is applied to a portable electronic device with a battery, and comprises the following steps:
monitoring a power off state of the portable electronic device;
when the power supply enters a closed state, storing first current time of a real-time clock module and data to be backed up in a random access memory of the embedded controller into a read only memory of the embedded controller within the discharge duration of a capacitor of a power supply circuit, and controlling a timing module to continue timing;
and when the power supply exits the off state, controlling the timing module to stop timing, obtaining second current time according to the timing and the first current time stored in a read-only memory of the embedded controller, and storing the second current time and the data to be backed up into a random access memory of the embedded controller so that the real-time clock module can read the second current time and the data to be backed up.
2. The method of claim 1, wherein monitoring the power off state of the portable electronic device comprises:
monitoring whether the portable electronic device enters a transport mode;
determining that the power source enters an off state when the portable electronic device enters a transport mode;
determining that the power source exits the off state when the portable electronic device exits the transport mode.
3. The method of claim 1, wherein monitoring the power off state of the portable electronic device comprises:
monitoring that a battery of the portable electronic device is unloaded while the portable electronic device is in a non-transport mode;
determining that the power source enters an off state when the battery is unloaded;
determining that the power source exits an off state when the battery is assembled.
4. The method of claim 3, wherein monitoring the portable electronic device for battery unloading comprises:
monitoring the level of the input end of the embedded controller;
when the condition that the level of the input end of the embedded controller is changed from high level to low level is monitored, determining that the battery is unloaded;
and when the level of the input end of the embedded controller is monitored to be changed from low level to high level, determining that the battery is assembled.
5. A method for supplying power to a real time clock as claimed in any one of claims 1 to 4, wherein the data to be backed up includes at least one of: timing data of the timing module, the time when the power supply enters the off state and configuration data of a basic input output system.
6. A real time clock power supply method as claimed in any one of claims 1 to 4, wherein when the embedded controller comprises a real time clock module, the timing module comprises a fuel gauge of the battery or a real time clock module of the embedded controller; when the embedded controller does not include a real-time clock module, the timing module includes a fuel gauge of the battery.
7. A real-time clock power supply circuit, which is applied to a portable electronic device with a battery, and is used for realizing the real-time clock power supply method according to any one of claims 1-6; the real-time clock power supply circuit comprises an embedded controller, a processor, a voltage regulator and a battery; the embedded controller is connected with the battery through a bus so as to monitor the unloaded condition of the battery; the processor is provided with a real-time clock module, and is connected with the embedded controller through a bus so as to carry out data communication with the embedded controller; the battery is connected with the processor through the voltage regulator to supply power to a real-time clock module in the processor.
8. The real-time clock supply circuit of claim 7, wherein the battery is connected to an anode of a first diode, a cathode of the first diode is connected to the first terminal of the voltage regulator, a cathode of the first diode is further connected to a first terminal of a capacitor, a second terminal of the capacitor is grounded, a second terminal of the voltage regulator is connected to an anode of a second diode, and a cathode of the second diode is connected to the real-time clock module of the processor.
9. The real time clock supply circuit of claim 7, wherein the battery is further coupled to ground through a resistor.
10. A storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to execute a real time clock supply method according to any one of claims 1 to 6.
CN202310257289.4A 2023-03-17 2023-03-17 Real-time clock power supply method, power supply circuit and storage medium Pending CN115963913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310257289.4A CN115963913A (en) 2023-03-17 2023-03-17 Real-time clock power supply method, power supply circuit and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310257289.4A CN115963913A (en) 2023-03-17 2023-03-17 Real-time clock power supply method, power supply circuit and storage medium

Publications (1)

Publication Number Publication Date
CN115963913A true CN115963913A (en) 2023-04-14

Family

ID=87353307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310257289.4A Pending CN115963913A (en) 2023-03-17 2023-03-17 Real-time clock power supply method, power supply circuit and storage medium

Country Status (1)

Country Link
CN (1) CN115963913A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823769A (en) * 2012-11-19 2014-05-28 纬创资通股份有限公司 Computer system and data recovery method
CN106557438A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 A kind of method of power down protection, device and electronic equipment
US20170185101A1 (en) * 2014-07-25 2017-06-29 Hewlett-Packard Development Company, L.P. Bios real-time clock update
US20210018970A1 (en) * 2019-07-16 2021-01-21 Dell Products L.P. Real time clock battery power management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823769A (en) * 2012-11-19 2014-05-28 纬创资通股份有限公司 Computer system and data recovery method
US20170185101A1 (en) * 2014-07-25 2017-06-29 Hewlett-Packard Development Company, L.P. Bios real-time clock update
CN106557438A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 A kind of method of power down protection, device and electronic equipment
US20210018970A1 (en) * 2019-07-16 2021-01-21 Dell Products L.P. Real time clock battery power management

Similar Documents

Publication Publication Date Title
US11635800B2 (en) System on chip for reducing wake-up time, method of operating same, and computer system including same
JP4535170B2 (en) Microcomputer system
US9841805B2 (en) Power management circuit and electronic device employing the same
CN109739563B (en) Terminal control method, device, system and storage medium
US9367446B2 (en) Computer system and data recovery method for a computer system having an embedded controller
JP6018113B2 (en) Method, computer and host device for preventing data loss of nonvolatile memory
CN109885343A (en) A kind of controller low-power consumption starting method, apparatus, computer equipment and storage medium
US8151130B2 (en) Plural voltage level detection upon power drop for switching to standby mode with or without complete state saving interrupt processing
CN107797642B (en) power backup method and device
TW200419334A (en) System and method for preserving state data of a personal computer in a standby state in the event of an AC power failure
US10379874B1 (en) Expedited resume process from low battery
JP2004192350A (en) Computer device, electric power management method and program
US9356459B2 (en) Method for charging battery and electronic device thereof
WO2023109300A1 (en) Battery level calibration method, electronic device, and storage medium
US9594517B2 (en) Vehicle device
JP2000215112A (en) Electronic equipment and low-voltage detecting method
CN115963913A (en) Real-time clock power supply method, power supply circuit and storage medium
JP2015170332A (en) NAND flash module control method
US7877631B2 (en) Detection of system battery errors
JP2006195560A (en) Electronic device
US8560873B1 (en) Determination of transitional characteristic attributes of components during scheduled wake-up power transition of computing device
CN109298992A (en) Electronic device and starting time calculation method
JP2009151489A (en) Information processor
CN115933809A (en) RTC clock circuit and SoC chip
JP7380016B2 (en) air conditioning controller

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230414

RJ01 Rejection of invention patent application after publication