
11-6
Power Power Management
Programmer’s Manual
mode.
If a Wake-up condition is met anytime during Doze mode before the
time-out countdown for Sleep is reached, PPSM will reset the
countdown and return the system to Wake-up mode.
This automatic Sleep mode time-out countdown is repeatedly performed in Doze
mode until the Sleep mode period is set to zero, i.e. disabling Sleep mode transi-
tion.
11.4.3.3 Waking up from Sleep
Any one of the following internal or external interrupts can wake up PPSM from
Sleep mode. The interrupts are:
Pen Interrupt
Real Time Clock Alarm, Periodic and Mid-night Interrupts
External Interrupts from IRQ1, IRQ2, IRQ3, IRQ6, INT0-7, UART
and PWM
For Mid-night interrupt, system will wake up from Sleep mode, update system
date and time and then go back to Sleep mode. For other interrupts listed above,
system will wake up from Sleep mode and go to Normal mode.
11.5
Power Management Tools
11.5.1
Setting Duty Cycle
U16
SetDutyCycle
(U16
percentage
)
This tool allows the application task to set the duty cycle level for itself in NorIn Wake-up mode, the system determines
mode. Applications within a system can have different duty cycle percentages.
PPSM automatically changes the PCM accordingly when an application task
becomes active.
11.5.2
Setting Doze Period
STATUS
SetDozePeriod
(U16
millisecond
)
Sets the countdown period, in units of millisecond, to switch the system from Nor-
mal mode to Doze mode. A value of PPSM_NO_DOZE disables the system from
going into Doze mode automatically which implies no automatically to sleep mode.
A value of zero will bring back the system to default doze setting. The default doze
setting is to go to doze mode whenever there is no task swap nor message in cur-
rent task to be handled.
11.5.3
Setting Sleep Period
STATUS
SetSleepPeriod
(U16
second
)
Sets the countdown period, in units of second, to switch the system from Doze
Personal Portable System Manager
Programmer’s Manual
11-3
Applications need not be concerned with the three System Internal Modes. They
are included in this chapter as a reference on the design of PPSM Power Man-
agement. All of these are intermediate modes among the Application Modes,
where PPSM takes control to perform necessary system operations, such as task
swapping, message passing and power management decisions.
This is the power on or system reset mode. Boot strapping and initialization of
PPSM occur in this mode. The system never enters into this mode again once
PPSM is initialized, unless system reset occurs.
11.3.2
System Mode
PPSM performs all of its task swapping, message passing, interrupt handling,
power module controlling and modes switching in the System mode. This mode is
frequently invoked, only for a very short duration, when the system is actively run-
ning, for example, to handle pen sampling, task swapping and message passing.
To minimize the actual time spent in this mode, the duty cycle is set to 100%
regardless of its set value prior to entering System mode. When the system
leaves System mode, it will restore the duty cycle of the previous mode.
11.3.3
Wake-up Mode
This is invoked either from Doze or Sleep mode. When the system is in Doze or
Sleep mode, only internal or external interrupts can wake up the system (please
refer to Section 11.4.2.3 - Waking up from Doze
from Sleep for the Wake-up conditions).
Section 11.4.3.3 - Waking up
which of the interrupts occurred,
where the interrupt messages, if any, should be sent to,
which application, if any, needs rescheduling, and
which mode the system should go into next.
For example, mid-night interrupt from the Real Time Clock, the system will:
1)
2)
3)
4)
Go into Wake-up mode from Sleep
Determine that the interrupt is intended for system only
Update the system date
Go directly back to Sleep mode
11.4
Application Modes
Normal, Doze and Sleep modes are the application modes. These are the modes
that an application sees and can have control over.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.