An important design goal of handheld battery-powered devices (e.g., calculators, PDAs, etc.) is to provide “instant-on” capability while minimizing power consumption required to provide this capability. The instant-on capability allows a user to quickly power-up a device in the state it was in when powered down without a long boot-up time. Delivering on this feature while preserving (or maximizing) battery life has become more and more challenging as CMOS IC technology process geometries have become smaller and smaller.
In the past few decades, CMOS technology, due to its extremely low static state power consumption, allowed designers to keep all circuits, processors, memories, etc. in a device powered, even when the device is turned off. This was accomplished by simply stopping or disabling clocks in the device when the user turns the device off. The device could then be returned to immediate and fully operational mode by simply restarting the clocks (without having to go through any type of re-boot process to restore operating state) when the user turned the device on.
However, the continued advancement of CMOS IC technology has led to a significant increase in static state power consumption, which can have detrimental impact to the battery life of a device. Thus, in order for designers to take advantage of the latest CMOS technology advancements while continuing to deliver on instant-on capabilities and providing adequate battery life, new design approaches are needed.
Particular embodiments in accordance with the invention will now be described, by way of example, and with reference to the accompanying drawings:
Specific embodiments of the invention will now be described in detail with reference to the accompanying figures. Like elements in the various figures are denoted by like reference numerals for consistency.
Certain terms are used throughout the following description and the claims to refer to particular system components. As one skilled in the art will appreciate, components and modules of computer and handheld calculator systems may be referred to by different names and/or may be combined in ways not shown herein without departing from the described functionality. This document does not intend to distinguish between components/modules that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . ” Also, the term “couple” and derivatives thereof are intended to mean an indirect, direct, optical, and/or wireless connection. Thus, if a first device couples to a second device, that connection may be through a direct connection, through an indirect connection via other devices and connections, through an optical connection, and/or through a wireless connection.
In the following detailed description of embodiments of the invention, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to one of ordinary skill in the art that the invention may be practiced without these specific details. In other instances, well-known features have not been described in detail to avoid unnecessarily complicating the description. In addition, although method steps may be presented and described herein in a sequential fashion, one or more of the steps shown and described may be omitted, repeated, performed concurrently, and/or performed in a different order than the order shown in the figures and/or described herein. Accordingly, embodiments of the invention should not be considered limited to the specific ordering of steps and/or number of steps shown in the figures and/or described herein.
Embodiments of the invention provide for “instant on” functionality in handheld battery-powered devices such as calculators. More specifically, in embodiments of the invention, various hardware components are arranged into two power domains such that when the device is turned off, one power domain will remain powered and the other, i.e., the controllable power domain, will have power removed. The assignment of components to the power domains may be made such that static current is minimized while the device is turned off but sufficient components remain powered to be able to quickly, e.g., in less than one second, restore the state of the device when it was turned off when the device is turned on. Further, a power-down sequence is provided that is executed when the device is turned off. This power-down sequence stores the relevant state, i.e., context, of the device, sets a boot indicator to indicate that the device state has been stored, and causes power to be removed from the controllable power domain. A power-up boot sequence, i.e., a quick boot sequence, is also provided that is executed when the device is turned on when the boot indicator indicates that there is a stored device state. This quick boot sequence causes power to be restored to the controllable power domain and restores the state of the device. At least one additional boot sequence, i.e., a cold boot sequence, may also be provided that is executed when the device is turned on and the boot indicator indicates that there is not a stored device state, e.g., when the device is turned on after all power has been removed from the device by, for example, removal and insertion of batteries. This cold boot sequence performs a full system initialization process.
The controllable power domain (204) includes the following components: an LCD controller (208), a flash memory controller (210), an external memory controller (212), an external bus interface (EBI) (214) to external, i.e., off-chip, memory, an analog-to-digital converter (ADC) control (216), a secure digital input/output interface (SDIO) (218), universal serial bus (USB) controllers (220), a boot ROM (230), a frame buffer (222), a vector interrupt controller (VIC) (224), an AHB-APB bus bridge (234), and a CPU (206). These components are all connected by an AHB bus. As is well-known in the art, an AHB bus is an advanced microprocessor bus architecture (AMBA) high performance bus designed to be used on-chip.
The non-controllable power domain (204) includes the following components: a power management unit (236), a quick boot memory (238), a phase locked loop (PLL) component (242), a power on reset (POR) component (248), a real-time clock (RTC) (250), a secure watchdog timer (252), a non-secure timer component (254), a keypad interface component (262), and various other peripheral interfaces including serial ports (258, 268), general purpose input/output interfaces (264, 266), a battery monitoring interface (260), and an interface for connecting the calculator to a computer (256). These components are all connected by an APB bus. As is well-known in the art, an APB bus is an AMBA advanced peripheral bus designed to be used on-chip.
The general functionality of many of the components listed above will be understood by one of ordinary skill in the art and is not described herein. The frame buffer (222) is on-chip memory, e.g., static random access memory (SRAM), used as a frame buffer by the LCD controller (208). In one or more embodiments of the invention, the size of the frame buffer (222) is 78 KB. The external memory controller (212) controls accesses to external memory, e.g., synchronous dynamic random access memory (SDRAM). The external memory may be any suitable memory that can retain its contents with minimal power consumption when the external memory controller (212) is disabled. For example, SDRAM may be placed in a self-refresh mode in which a timer generates internal refresh cycles as needed to retain contents. This mode allows the memory controller to be disabled entirely and the clock may also be stopped.
The boot ROM (230) is read only memory that stores the initial part of the boot code for the handheld calculator (100). As is explained in more detail below, this initial boot code includes functionality to determine whether a quick boot or a cold boot is to be performed. If a cold boot is indicated, the initial boot code validates and loads into the external memory a secondary part of the boot code stored in external flash memory and transfers control to the secondary part. If a quick boot is indicated, the initial boot code performs validations as described in more detail below, and transfers control to a recovery routine stored in the external memory. In one or more embodiments of the invention, the size of the boot ROM (230) is 128 KB. The flash controller (210) controls accesses to external flash memory, e.g., NAND and/or NOR flash memory. The external flash memory stores the secondary part of the boot code that is responsible for initializing the file system and validating and loading the operating system. The external flash memory stores the operating system code and may also store applications to be executed on the handheld calculator (100).
The quick boot memory (238) is an internal memory, e.g., SRAM, used to store quick boot data, e.g., validation data, the address of a resume function stored in the external memory, etc., generated during the power-down sequence and a boot indicator that is used by the boot code stored in the boot ROM (230) to determine whether a quick boot or a cold boot is to be performed. The quick boot memory (238) is also used to execute portions of the power-down sequence. In one or more embodiments of the invention, the size of the quick boot memory (238) is 2 KB.
In one or more embodiments of the invention, when the user presses the on/off key (106) to turn the handheld calculator (100) off, the power-down sequence is executed to save the state of the calculator and to remove power from the controllable power domain (202). In some embodiments of the invention, the power-down sequence is also executed after a period of inactivity. The length of this inactivity period may be user configurable. An example power-down sequence is described in more detail below in reference to
The PMU (236) includes functionality to manage the dynamic and state power consumption of the handheld calculator (100). More specifically, the PMU (236) includes functionality to turn the controllable power domain (202) on and off and for enabling and disabling clocks to individual modules including the CPU (206). The PMU (236) also provides for power management in three modes of operation: active, i.e., when the handheld calculator (100) is powered up and in use, standby, e.g., when waiting for user input, and power down, i.e., when the handheld calculator (100) is powered down and state is to be retained for a quick boot. The standby mode and the power down mode are entered by commands issued to the PMU (236) and are exited based on wake up events specified before entering the mode. As is explained in more detail below, the power down mode is set in the PMU (236) during the power down sequence. In addition, the power down sequence also sets the wake up events for this mode. Wake-up events can be from a number of sources such as timers (252, 254), the RTC (250), GPIO (266), the keypad (262), etc. For example, when the quick boot sequence is executed in response to the on/off key (106), the depression of the key causes a wake up event that causes the PMU (236) to perform power management functions to return the calculator to an operational state.
The POR component (248) includes functionality to provide a valid reset to the CPU (206) and other components when a wake-up event occurs. The POR component (248) provides the reset responsive to a system reset request from the PMU (236).
In one or more embodiments of the invention, when a system wake-up event is detected by the PMU (236), the PMU (236) immediately enables power to the controllable power domain (202), enables the PLL (242) and system clocks, and sends a system reset request to the POR component (248). The POR (248) then issues a system reset signal to the CPU (206) and other system components after the power and clocks have had sufficient time to stabilize.
If a quick boot is indicated, the initial boot module (304) initializes some of the hardware components, including the external memory controller (212). The initial boot module (304) also validates at least the part of the quick boot memory (238) that stores quick boot information generated by the power down sequence. In one or more embodiments of the invention, the quick boot information includes the boot indicator, the address of a resume function, and validation values, e.g., CRC (cyclic redundancy check) values, for selected sections of the external memory along with addresses of the selected sections. In one or more embodiments of the invention, the selected sections of external memory include sections where application code is stored, sections where variable values for applications are stored, and sections where the context information for the CPU (206) and for device controllers (e.g., 218, 220) in the controllable power domain (202) are stored during the power down sequence.
In some embodiments of the invention, the quick boot information may also include a “magic number.” The magic number is a number stored during the power down sequence to be used by the initial boot module (304) to validate the contents of the quick boot memory (238). More specifically, the magic number is used to detect whether power was removed from the handheld calculator (100) while the handheld calculator was in the power down mode. The value of the magic number may be any predetermined relatively large number, e.g., a number 32 to 64 bits in length. If the quick boot memory (238) is volatile memory such as SRAM, the removal of power from the quick boot memory (238), e.g., by loss of battery power in the handheld calculator (100), will cause the magic number to change. The magic number is checked by the initial boot module (304) and if the value is invalid, the quick boot information is presumed to be invalid and a cold boot is preformed.
If the validation of the quick boot memory (238) is successful, the initial boot module (304) also validates the selected sections of the external memory based on the validation values. If this validation is successful, the initial boot module (304) then transfers control to the specified resume function to complete the quick boot, e.g., to restore the context information from external memory, and transfer control back to normal operation. In some embodiments of the invention, the initial boot module (304) also clears the quick boot data in the quick boot memory (238) before transferring control to the resume function. An example quick boot sequence is described in more detail below in reference to
The power management module (308) includes functionality for managing power in the handheld calculator (100) such as, for example, monitoring battery level and the battery door, detection of keypad activity, e.g., pressing of the on/off key (106), and APD. The power management module (308) also includes functionality for managing the power down sequence and for performing portions of the quick boot sequence. More specifically, the power management module (308) includes functionality to receive a signal to power down the handheld calculator (100), e.g., APD or pressing of the on/off key (106), and, responsive to the signal, to cause the actions needed to place the handheld calculator (100) in a state where a quick boot may be performed to restart the calculator. These actions may include turning the display (104) off, saving context, i.e., state information, of the various drivers of devices in the controllable power domain (202) in external memory (212) as needed and turning off the devices, storing the contents of the frame buffer (222) and the CPU (206) context, e.g., register contents, in external memory (212), computing validation data for the selected sections of the external memory (212) and storing the validation data in the quick boot memory (238), setting the boot indicator in the quick boot memory (238) to indicate a quick boot, and placing the external memory (212) in the lowest power mode that will retain memory contents, e.g., self-refresh. The power management module (308) also causes the PMU (236) to disable the controllable power domain (202), specifies the wake up event(s) for the PMU (236), e.g., pressing of the on/off key (106), and causes the PMU (236) to enter a state waiting for the specified wake up event(s). An example power down sequence is described in more detail below in reference to
The actions of the power management module (308) for managing portions of the quick boot sequence may include restoring the CPU (206) registers and the frame buffer from external memory (212), restoring the driver data of the various drivers of the devices in the controllable power domain (202) from external memory (212), turning the display (104) on, and returning control to the scheduler of the operating system (302).
In one or more embodiments of the invention, the non-controllable power domain includes a small memory for storing data needed for the quick boot process, sufficient circuitry for detecting a power up signal from an on/off key, sufficient circuitry for controlling the power state of an external memory, and sufficient circuitry for initiating the boot process. In some embodiments of the invention, other circuitry is included in the non-controllable power domain. In one or more embodiments of the invention, the controllable power domain includes the CPU, on-chip memory, a display controller, one or more memory controllers, e.g., an external memory controller and/or a flash memory controller, and/or controllers for other devices.
Referring now to
Next, validation information for selected sections of the external memory is calculated and stored in a memory in the non-controllable power domain (704). The validation information may be calculated in any suitable way. In one or more embodiments of the invention, a CRC value is calculated for each of the selected section. The selected sections may include any memory sections that are needed for resuming operation of the calculator, such as, for example, sections where the state data is stored, sections where executable code is stored, sections where variable values are stored, etc. Location information, e.g., an address, an offset, etc., for each of the selected sections is also stored in this memory in association with the validation information. This validation information with associated location information may be referred to as quick boot data. In some embodiments of the invention, a pointer to a resume function and/or a magic number as previously described may also be stored in the memory in the non-controllable power domain.
A boot indicator in the non-controllable power domain is also set to indicate that a quick boot is to be performed when the calculator is powered up (706). In some embodiments of the invention, the boot indicator is stored in the memory in the non-controllable power domain. The external memory is then placed into the lowest power state that will allow the memory to retain its current contents, e.g., self-refresh (708). Finally, the controllable power domain is turned off (710) and the calculator enters a power down mode waiting for a power up signal.
Referring now to
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. For example, one skilled in the art will appreciate that embodiments of the invention may be implemented in battery-powered devices other than handheld calculators, such as, for example, personal digital assistants (PDAs), cellular telephones, MP3 players, netbook computers, laptop computers, etc. In another example, one skilled in the art will appreciate embodiments of the invention having fewer or more hardware components than those described herein and having more, fewer, and/or different hardware components allocated between the two power domains. Accordingly, the scope of the invention should be limited only by the attached claims. It is therefore contemplated that the appended claims will cover any such modifications of the embodiments as fall within the true scope and spirit of the invention.