1. Technical Field
The present disclosure relates to electronic devices, and particularly, to an electronic device which can enter a sleep mode and a method for awaking the electronic device from the sleep mode.
2. Description of the Related Art
Many electronic devices include a normal mode and a sleep mode. In the normal mode, a CPU of an electronic device can track status of a battery of the electronic device, such as charge state and temperature of the battery. If there is anything wrong with the battery or the charge is too low, the CPU can take steps such as turning off the electronic device or switching to an alternate power supply. However, when the electronic device is in the sleep mode, the CPU does not track status of the battery.
Therefore, there is room for improvement within the art.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of an electronic device with sleep mode and a method for awaking the electronic device. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
Referring to
The monitoring unit 13 includes a testing module 130, a comparing module 131, a storage module 132, and a signal generating module 133.
The testing module 130 is configured to measure one or more parameters of the battery 11. In the embodiment, the one or more parameters may include at least one selected from the group consisting of temperature, output voltage, and output current. Accordingly, the testing module 130 may include a temperature sensor, a voltage sensor, and/or a current sensor, corresponding to more than one of the one or more parameters to be measured.
The storage module 132 is configured for storing one or more predetermined ranges corresponding to the one or more parameters of the battery 11. The comparing module 131 is configured for determining whether the measured one or more parameters are within a predetermined range stored in the storage module 132. The one or more predetermined ranges may include a temperature range, a voltage range, and a current range.
The signal generating module 133 is configured for generating signals to awake the CPU 12 when any one of the measured one or more parameters is not within the corresponding predetermined range. After the CPU 12 is awaked, the CPU 12 executes protection operation to protect the electronic device 10. In the embodiment, after the CPU 12 is awaked, the CPU 12 compares a current voltage of the battery 11 measured by the testing module 130 with a predetermined reference voltage, the predetermined reference voltage represents a minimum voltage level needed to power the electronic device 10 in the normal mode. The CPU 12 turns off the electronic device 10 if the current voltage of the battery 11 is lower than the predetermined reference voltage.
In step S21, the testing module 130 measures a parameter of the battery 11.
In step S22, the comparing module 221 determines whether the measured parameter of the battery 11 is within a predetermined range stored in the storage module 132. If no, the procedure goes to step S23, otherwise, the procedure returns to step S21.
In step S23, the signal generating module 133 generates signals to awake the CPU 12.
In step S24, the CPU 12 executes protection operation to protect the electronic device 10.
It is understood that the present disclosure may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
201010261456.5 | Aug 2010 | CN | national |