Method for supplying electric power to a timekeeping circuit within a portable electronic device

An apparatus for providing electric power to a portable computer is disclosed. The apparatus includes a timekeeping circuit, a voltage regulator, a set of battery cells and a controller. The timekeeping circuit includes a clock circuit and a memory for storing a calendar time that is updated based on time information generated by the clock circuit. The battery cells can supply electric power to the voltage regulator, and the voltage regulator is capable of supplying electric power to the timekeeping circuit. When the output voltage from the battery cells exceeds a first voltage threshold, the controller directs the voltage regulator to supply electric power to the timekeeping circuit. When the output voltage from the battery cells drops below the first voltage threshold, the controller directs one of the battery cells to supply electric power to the timekeeping circuit.

PRIORITY CLAIM

The present application claims benefit of priority under 35 U.S.C. §§120, 365 to the previously filed Japanese Patent Application No. JP2011-139969 entitled, “ELECTRIC POWER SYSTEM FOR PORTABLE ELECTRONIC DEVICE EQUIPPED WITH TIMEKEEPING CIRCUIT” with a priority date of Jun. 24, 2011, which is incorporated by reference herein.

BACKGROUND

1. Technical Field

The present invention relates to portable electronic devices in general, and in particular to a method for supplying electric power from a common battery system to a system device and a calendar timekeeping circuit, and for keeping the timekeeping circuit functional as long as possible as the system device's remaining battery charge decreases.

2. Description of Related Art

In a computer system, a semiconductor chip called a Real Time Clock (RTC) chip is typically utilized to provide calendar time to the computer system. In a portable computer, a system battery can be utilized to power the RTC chip. However, the system battery may not always be available—it may be completely discharged or not installed. Hence, the RTC chip is also powered by a dedicated backup battery, generally an RTC coin battery mounted on the system motherboard.

The backup battery also powers an RTC memory, which is used to store the system's calendar time, wakeup time, BIOS setup data, and the like. The RTC chip performs a periodic timekeeping operation to update the stored calendar time. The calendar time in the RTC memory is initialized by a user or in synchronization with a Network Time Protocol (NTP) server.

The RTC memory is usually a volatile memory such as an SRAM. So, if mistaken setup data renders the computer unbootable, the battery system and the RTC coin battery can be removed to erase data stored in the RTC memory. The RTC coin battery cannot be removed unless the system housing is opened, which prevents the user from erasing time information or setup data by mistake.

Previous inventions disclose operating an RTC chip with a main battery and no coin cell. Data that is meant to be non-volatile may be saved into a non-volatile storage when the voltage across the main battery has dropped to a predetermined value. However, without the coin cell and when the system battery is not user-replaceable, the user cannot disable power to the RTC chip to reset the RTC memory. Further, when the system and RTC chip use a common battery system, the need to power the RTC chip should not affect system battery life.

In addition, even when the remaining capacity of the battery system has dropped, there is a need to supply electric power to the RTC chip as long as possible. Also, it is desired that the RTC circuit receiving the supply of electric power from the common battery system should keep its function as much as it can in the case of being supplied with electric power from the RTC coin battery.

SUMMARY

In accordance with a preferred embodiment of the present invention, an apparatus includes a timekeeping circuit, a voltage regulator, a set of battery cells and a controller. The timekeeping circuit includes a clock circuit and a memory for storing a calendar time that is updated based on time information generated by the clock circuit. The battery cells can supply electric power to the voltage regulator, and the voltage regulator is capable of supplying electric power to the timekeeping circuit. When the output voltage from the battery cells exceeds a first voltage threshold, the controller directs the voltage regulator to supply electric power to the timekeeping circuit. When the output voltage from the battery cells drops below the first voltage threshold, the controller directs one of the battery cells to supply electric power to the timekeeping circuit. When the output voltage of the battery cells drops below a second voltage threshold that is lower than the first voltage threshold, the controller stops providing power to the timekeeping circuit.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

I. Structure of an Electric Power System

FIG. 1is a functional block diagram showing main components of a laptop personal computer (hereinafter called a laptop PC)10in which an electric power system is incorporated to supply electric power to an RTC circuit. The laptop PC10is an example of a portable electronic device, and the portable computer can be a tablet computer or a smart phone. An AC/DC adapter11converts AC voltage to DC voltage to supply electric power to a system device and a battery charger13. The AC/DC adapter11may be incorporated in a housing of the laptop PC10, or connected to the laptop PC10through a plug from outside the housing. In the present embodiment, it is assumed that the output voltage of the AC/DC adapter11is 20V.

When the AC/DC adapter11is connected, the battery charger13operates in response to a charge request from a built-in battery system (hereinafter called a battery system)100to charge a battery set101. An LDO15converts voltage received from the AC/DC adapter11or the battery system100into a voltage of 3.3V to power a power management controller (PMC)21, and further power an RTC circuit29via a switching circuit23. The LDO15controls the resistance value of a variable resistive element to keep output voltage within a predetermined range, but a difference between input voltage and output voltage needs to be dissipated as heat. Since efficiency is reduced as the load increases, it is suitable for a low-load power source.

DC/DC converters17and18are step-down PWM control switching regulators to convert voltage applied by the AC/DC adapter11or the battery system100into two or more predetermined voltages within a 1V-5V range so that they can correspond to the power state of the laptop PC10and the operating voltage of each of the system devices. The DC/DC converter17powers an EC19and an interface27in a chip set25. The DC/DC converter18is composed of multiple switching regulators to supply electric power to the LDO15and other devices or functional blocks not supplied by the DC/DC converter17.

The DC/DC converters17and18are less efficient in light loading than the LDO15, but they are more efficient in heavy loading. InFIG. 1, destinations to which the DC/DC converters17and18supply electric power are shown only in a scope necessary to describe the present invention.

The laptop PC10conforms to the ACPI standard, and supports a number of power states: a power-on state (S0), a suspended state (S3), a hibernation state (S4), and a power-off state (S5). In S3, S4, and S5, the operation of the CPU37is stopped to put the laptop PC10into a halting sate. Electric power consumed during this halting state is called standby electricity.

The LDO15operates in all power states, and is stopped only when the AC/DC adapter11and the battery system100are removed or the voltage across battery cells101ato101cdrops to turn a switch121off. The LDO15and the DC/DC converters17and18operate to power predetermined devices depending on the power state.

In the power-off state, only the LDO15is operating to supply electric power to the PMC21and the RTC circuit29. At this time, the standby electricity is least among the power states. The EC19is a microcomputer consisting of a CPU, a ROM, an EEPROM, a DMA controller, an interrupt controller, a timer, and the like, further including an A/D input terminal, a D/A output terminal, an SM bus port, an SPI bus port, and a digital input-output terminal.

The EC19operates independently of the CPU37to control electric power to devices within the laptop PC10, and control temperature inside the housing. When receiving a signal from the chip set25or the PMC21to change the power state, the EC19instructs the PMC21to control the operation of the DC/DC converter17,18. The EC19periodically communicates with an yMPU105of the battery system100to receive the remaining capacity of the battery set101, set charging voltage and charging current, and receive other data such as voltage across the battery cells101ato101c. Further, before stopping the operation of the DC/DC converter17, the EC19causes the battery system100to generate a calendar time so that the calendar time will continue to be generated even when power to the RTC circuit29is completely stopped.

The PMC21is manufactured as an Application Specific Integrated Circuit (ASIC) composed of logic circuitry such as a NAND and a NOR circuit, a single transistor, and passive parts, such as resistors and capacitors, including a control circuit and resistors. Since the PMC21is constructed only of hardware circuitry without including any processor, the power consumption is quite small. In addition to the EC19, the control circuits of the DC/DC converters17and18, a power button to be pressed to boot the laptop PC10, a lid sensor for detecting the opening and closing of the housing to boot the laptop PC10, and the like are connected to the PMC21.

Based on instruction from the EC19, a press of the power button, or an action of the lid sensor, the PMC21controls the operation of the DC/DC converter17to control the operation of the switching circuit23based on the output of the LDO15. The PMC21operates as long as it is supplied with electric power from either the AC/DC adapter11or the built-in battery system100.

The switching circuit23consists of an FET and a diode to uninterruptedly switch RTC power from either the LDO15or the battery cell101c, so as not to affect the operation of the RTC circuit29. A control signal from the PMC21performs the switch, so the LDO15powers the RTC circuit29while the LDO15is supplying electric power, and the battery cell101cpowers the RTC when the LDO15stops providing power.

The chip set25includes the CPU37, the GPU39to which a liquid crystal display (LCD) is connected, the main memory41, the BIOS_ROM43, the interface27with the HDD45or the like, and the RTC circuit29. The RTC circuit29consists of an RTC33and an RTC memory35.

The RTC33consists of a crystal oscillator and an oscillating circuit to perform timekeeping to generate a calendar time for system use. Calendar time means a specific moment in time on a calendar, including year, month, day, hour, minute, and second. The RTC memory35is a volatile storage device for storing the calendar time generated based on the timekeeping operation of the RTC33. This calendar time stored is supplied to the OS for use as a time stamp on a file, for schedule management, and the like. Setup and configuration data and a system password are also stored in the RTC memory.

Since the setup data reflects the current system environment most appropriate to the user, it is necessary to make data loss difficult. The LDO15powers the RTC circuit29while the AC/DC adapter11or the battery set101is supplying electric power through the switching circuit23. If neither the AC/DC adapter11nor the battery set101can supply electric power, the RTC circuit29will be powered by the battery cell101cuntil the voltage drops to one at which it is necessary to stop electric discharge.

The CPU37, the GPU39, the main memory41, the BIOS_ROM43, the HDD45, and the like are connected to the chip set25. BIOS code stored in the BIOS_ROM43contains setup code for configuring hardware while POST (Power On Self Test) is being carried out after the laptop PC10is booted. The setup code includes code for changing the switch115and the switch117to the OFF state to stop power to the RTC circuit29while it is being supplied from the battery cell101c.

When the operation of the laptop PC10becomes unstable or the system is to be largely altered, the user often desires to erase the setup data stored in the RTC memory35, thus using the default setup information instead. When the user makes this choice in the system setup screen, the CPU37executes BIOS code to stop the LDO15, the DC/DC converter17, and the DC/DC converter18through the EC19, and further instructs the MPU105to turn off the switches115and117.

Alternatively, the CPU37may change a reset terminal of the RTC circuit29to LOW. When erasing the setup data stored in the RTC memory35, the BIOS uses the default setup data held to carry out POST. A mechanical switch held down with a long and thin rod may be provided in the housing of the laptop PC10to operate the switches115and117in order to reset the RTC memory35.

The battery system100consists mainly of the battery set101, an analog interface circuit (AFE)103, an MPU105, and the like mounted on a printed-circuit board, and housed within the housing of the laptop PC10. This battery system cannot easily be detached, so it is suitable for powering the RTC circuit29.

The battery set101consists of three or four lithium-ion battery cells101a,101b, and101cconnected in series. Each of the battery cells may also consist of two or more battery cells connected in parallel. When three battery cells101ato101care connected in series, the output voltage of the battery set101rises to 12.6V immediately after being charged to full capacity, and the output voltage decreases with electric discharge. When the output voltage drops to 9V, the supply of electric power to the system devices is stopped. When it drops to 8.1V, the battery set101stops electric discharge and the battery cell101csupplies electric power to the RTC circuit29. Further, when it drops to 7.5V, the supply of electric power from the battery system100to the outside is completely stopped.

In the present invention, the supply of electric power to the RTC circuit29is maintained as long as possible. After the battery system100completely stops its output, it generates a calendar time on behalf of the RTC circuit29until power can be restored to the RTC circuit29.

The AFE103measures a difference in potential between both ends of each of the battery cells101ato101cand a difference in potential between both ends of the sense resistor121, converts the differences to digital values, and sends the digital values to the MPU105. The AFE103is also connected to the control circuits of the switches115,117, and121, and in the event of a failure in the battery system100, the switches are turned off in accordance with an instruction from the MPU105. MOS type FETs can be used for the switches115,117, and121.

The AFE103calculates charging current flowing through the battery set101and discharging current from the potential difference across the sense resistor121, converts them to digital values, and sends the digital values to the MPU105. The AFE103is provided with bypass discharge circuits104ato104cso that when a difference in voltage between the battery cells101ato101cexceeds a predetermined value, only a battery cell higher in voltage is discharged to equalize voltage between the battery cells. Each of the bypass discharge circuits104ato104cconsists of a switch and a resister connected in series, and is connected to both ends of each of the battery cells. The AFE103periodically measures the difference in voltage between battery cells to operate one of the bypass discharge circuits104ato104cfor a battery cell higher in voltage.

The MPU105is an integrated circuit with a CPU107, a RAM109, a timer111, and an EEPROM113provided in one package. The MPU105measures the amount of charge and the amount of discharge based on the voltage and electric current sent from the AFE103to calculate the remaining battery capacity. The MPU105is also provided with an overcurrent protection function, an overvoltage protection function (also called overcharge protection function), and a low-voltage protection function (also called overdischarge protection function) to control the switches115,117, and121through the AFE103when an abnormality is detected from the voltage or current values received from the AFE103.

The AFE103and the MPU105both operate on electric power from the battery set101. When electric power to the RTC circuit29is stopped, the MPU105uses the timer111to generate the calendar time, and when power to the RTC circuit29is restored, the MPU105can send the updated calendar time back to the RTC memory35. The MPU105performs control to turn on the switch115at normal times or turn it off when the RTC circuit29is reset and an abnormality occurs.

The switch117and a voltage drop element119are connected in series to form a bypass circuit for the switch115. The voltage drop element119is an element, such as a diode, a resistor, or a transistor, to drop voltage to a range appropriate for RTC circuit29operation when the voltage across the battery cell101cis high. Unlike the LDO15, the voltage drop element119does not need to be able to adjust voltage. When the voltage across the battery cell101cexceeds the RTC circuit's tolerance, the MPU105turns switch115off and turns switch117on until the voltage drops to the tolerance. When that happens, the MPU105turns switch115on and turns switch117off. The MPU105and the AFE103are considered together as a battery management unit (BMU)104.

II. Structure of a Switching Circuit

FIG. 2is a diagram showing the structure of the switching circuit23. This switches the RTC circuit's power source to the LDO15while it can supply power, and powers the RTC circuit from battery cell101cwhen the LDO15is stopped. The switching circuit23consists of a p-channel FET51, an n-channel FET53, and a diode55. The source of FET51is connected to the battery cell101cvia the switch115, and the drain is connected to the RTC circuit29. The anode of diode55is connected to the source of FET51, and the cathode is connected to RTC circuit29. The drain of FET53is connected to LDO15, and the source is connected to RTC circuit29.

Voltage is applied to the gates of FET51and FET53from the PMC21. The PMC21applies or stops applying voltage so that FET51and FET53operate opposite to each other. While the PMC21is applying voltage to the gates of FETs51and53, FET53is on and FET51is off. The BMU104keeps switch115on until the remaining capacity of the battery cell101cis so low it can no longer discharge. During this period, electric power can be supplied from the battery cell101cto the RTC circuit29via the diode55. However, since the output voltage of the LDO15is high, it supplies power to the RTC circuit29.

When the voltage across any of the battery cells101ato101cbecomes so low that the BMU104turns the switch121off, the output of the LDO15is stopped, and the operation of the PMC21is also stopped to lower the gate voltage of FETs51and53. As a result, FET51is changed to the on state and FET53is changed to the off state. During switching, when the voltage across the LDO15drops, since electric current flows through the diode55until the FET51is changed to the ON state, the supply of electric power to the RTC circuit29is maintained. Then, when the output of the LDO15is restored, the PMC21applies voltage to the gates of the FETs51and53. At the moment of switching, since electric current flows via the diode55, power to the RTC circuit29is never interrupted.

III. Power System Operation

Next, operation of the RTC circuit power supply will be described with reference to the flowchart ofFIG. 3.FIG. 4is a diagram showing the operating states of essential system devices when the electric power system is operated.

In block201ofFIG. 3, the laptop PC10is operating in a power-on state. Suppose that the AC/DC adapter11is connected, operating the battery charger13, and hence the battery set101is fully charged.

Since the voltage across the battery cells101ato101cis at least a predetermined value, the BMU104turns on the switches115and121and turns off the switch117so that electric power can be supplied to the LDO15and the DC/DC converters17and18when the AC/DC adapter11is detached. Since the output voltage of the AC/DC adapter11is higher than the output voltage of the battery set101, the LDO15and the DC/DC converters17and18operate with power from the AC/DC adapter11, and the switching circuit23switches the power source of the RTC circuit29to the LDO15. About 1 mA flows into the primary side of the LDO15, about 30 mA flows into the primary side of the DC/DC converter17, and about 1 A flows into the primary side of the DC/DC converter18. Further, about 3 μA to 6 μA flows into the RTC circuit29.

In block203, the AC/DC adapter11is detached, leaving only the battery system100as the system's power source. The battery set101supplies electric power to the LDO15and DC/DC converters17and18, and the remaining battery capacity gradually drops. The EC19periodically reports remaining battery capacity to the OS.

In block205, when the remaining capacity of the battery set101drops to threshold A, if hibernation is enabled, the OS requests programs currently running to stop all processes and save their data, to prepare to change the system power state to the hibernation state. The OS provides threshold A to allow enough time for an orderly power state change. As an example, the default threshold A is 5% of a full battery charge.

When the OS notifies the chip set25that preparation for hibernation is complete, the chip set25stops the DC/DC converter18through the EC19. In block207, the laptop PC10makes a transition to the hibernation state. The battery set101continues discharging to power to the LDO15and the DC/DC converter17, thereby further reducing remaining battery capacity.

If discharging were to continue to where the voltage across the battery cells is below 3.0V, voltage would drop sharply. Power to system devices should be stopped before that sharp drop. In block209, the EC.19receives data from the MPU105and determines whether the voltage across any of the battery cells101ato101cor the remaining capacity of the battery set101has dropped to threshold B. At threshold B, remaining battery capacity is considered zero and system operation must stop. In this case, 3.0V can be set for the voltage across any of the battery cells101ato101c, or 500 mWh can be set for the remaining capacity of the battery set101.

In block211, the EC19, having determined that remaining battery capacity has dropped below threshold B, copies data stored in the RTC memory35into a data area of the BIOS_ROM43, an EEPROM in the EC19, or the EEPROM113in the MPU105. This processing may also be performed earlier, upon transition to the hibernation state in blocks205and207.

Then, in block213, the EC19acquires the current calendar time from the RTC memory35and sends it to the MPU105to start it generating calendar time. The CPU107receiving the instruction from the EC19stores the received calendar time in the RAM109, and further gets the timer111to work to update the calendar time in the RAM109. As a result, the MPU105generates the calendar time in parallel with the RTC circuit29until the remaining capacity of the battery set101once again exceeds threshold B and the EC19tells the MPU105to stop generating calendar time.

Next, in block215, the EC19instructs the PMC21to stop the DC/DC converter17. After this, the supply of electric power to system devices is completely stopped, and the battery set101powers only the BMU104and the LDO15.

In block217, the MPU105determines whether the voltage across any of the battery cells101ato101cor the remaining capacity of the battery set101has further dropped to threshold C. Threshold C is a value at which the battery set101completely stops supplying power. In this case, 2.7V can be set for the voltage across any of the battery cells101ato101c, or 100 mWh can be set for the remaining capacity of the battery set101.

Threshold B denotes the minimum value of battery capacity available for the user, while threshold C denotes a value at which battery output must be stopped for safety to keep the battery set usable. In block219, the MPU105, determining that the remaining battery capacity has dropped to threshold C, turns off the switch121to stop power to the LDO15. When the output of the LDO15is stopped, in block221, the switching circuit23switches the RTC circuit's power source to the battery cell101c. Since electric power is supplied from the LDO15to the RTC circuit29until the remaining capacity of the battery set101drops to threshold B, the battery cell101cis not burdened.

At this time, if the voltage across the battery cell101cis higher than the operating voltage of the RTC circuit29, the MPU105turns off the switch115and turns on the switch117to supply electric power to the switching circuit23after the voltage drop element119drops the voltage. Then, when voltage between the battery cells101ato101cbecomes imbalanced, the AFE103discharges the battery cell high in voltage to strike a balance.

In block223, the MPU105determines whether the voltage across any of the battery cells101ato101cor the remaining capacity of the battery set101has dropped to threshold D. The voltage across the battery cell101cis normally lowest, but the MPU105determines the voltages across all the battery cells101ato101c. Threshold D is a value at which electric discharge from the battery cell101cto the RTC circuit29must stop. In this case, 2.5V can be set for the voltage across the battery cell101c, or 0 mWh can be set for the remaining capacity of the battery set101. Threshold D is intended to allow an orderly circuit shutdown.

In block225, the BMU104, determining that threshold D has been reached, turns off the switch115and the switch117to stop power to the RTC circuit29. As a result, RTC operation stops in block227, and the calendar time stored in the RTC memory35, the BIOS setup data, and the like are lost.

Battery cell101ccan power the RTC circuit29directly from threshold B until threshold D. This is because the RTC circuit's power consumption is low enough that the BMU104can safely control battery cell101cto keep it usable.

When the remaining capacity of the battery set101reaches threshold D, the MPU105reduces the clock frequency or the sampling period to operate in a power-saving mode. The electric current flowing through the BMU104is about 400 μA in the normal mode, but about 20 μA in the power-saving mode.

After that, the battery system100cannot power the system at all, but the BMU104further operates to continue calendar time generation. If this state continues, the voltage across the battery cells101ato101cfurther drops. In block229, the BMU104determines whether the voltage across any of the battery cells101ato101chas dropped to threshold E, a value for ensuring the safety of the battery set101or guaranteeing its reuse. The battery manufacturer can set threshold E within the 2.5V to 1.3V range.

When it determines that the voltage across any of the battery cells101ato101chas dropped to threshold E, the BMU104stops its operation in block231and will not operate unless the battery set101is replaced, even if the battery charger13tries to charge the battery set101. As a result, the calendar time stored in the RAM109is lost in block233.

Later in block235, the AC/DC adapter11is connected to enable the startup of the laptop PC10, or the battery set101or the entire battery system100are replaced with charged units, the BIOS first tries to read BIOS setup data from the RTC memory35. If the BIOS cannot read the setup data from the RTC memory35, it uses its default setup data.

In block237, the EC19receives the calendar time from the MPU105during POST, stores it in the RTC memory35, and instructs the RTC33to update the calendar time stored in the RTC memory35. After that, the RTC33updates the calendar time in the RTC memory35.

In block239, if data in the RTC memory35had been lost, the EC19will restore it from the setup data that was stored in the nonvolatile memory in block211. After that, the BIOS can read the setup data from the RTC memory35on every startup as normal.

IV. Alternate Power System Operation

Next, an alternate power system operation will be described with reference to the flowchart ofFIG. 5and a diagram (FIG. 6) describing device states. In the procedure ofFIG. 5, processes corresponding to those inFIG. 3are cross-referenced to the blocks inFIG. 3to omit redundant description. Processes of block301and block303correspond to the processes of block201and block203, respectively. In the procedure ofFIG. 5, the processes of blocks205and207inFIG. 3can be omitted. A process of block309corresponds to the process of block209. In the procedure ofFIG. 5, processes corresponding to those of block211and block213inFIG. 3are not performed.

In block315, the EC19notifies the OS that remaining battery power is low. The OS notifies the user that the system will be stopped soon, to prompt the user to finish the operation, transition to the hibernation state, or shut the system down. When the OS orders a system stop, the EC19stops the operation of the DC/DC converters17and18through the PMC21. As a result, only the PMC21and the RTC circuit29as the load on the LDO15operate powered by the battery set101. Processes from block317to block327correspond to processes from block217to block227, respectively. In block328, the calendar time generated by the RTC circuit29and data stored in the RTC memory35are lost. At this time, the BMU104operates in the power-saving mode, while the MPU105operates normally because it generates no calendar time (unlike in block213ofFIG. 3).

In the procedure ofFIG. 5, since the battery system100does not have the timer111generate the calendar time, it takes longer for the voltage of battery cells101ato101cto reach threshold E. The procedure inFIG. 3and the procedure inFIG. 5may be chosen on the BIOS setup screen, so that when the laptop PC10is stored for a long time before shipment, the procedure inFIG. 5will be adopted, while when a user starts using the laptop regularly, the procedure inFIG. 3can be used instead.

As has been described, the present invention provides a method for supplying electric power from a common battery system to a system device and a calendar timekeeping circuit.