179
Clock Generator
Chapter 4
Preliminary User’s Manual U17566EE1V2UM00
4.3.3
Power save mode activation
In the following procedures for securely entering a power save mode are
described.
Stepper-C/D shut
down
In order to minimize power consumption during power save modes the Stepper
Motor Controller/Driver needs to be shut down in a special sequence. Refer to
“MCNTCn0, MCNTCn1 - Timer mode control registers” on page 799
.
(1)
HALT mode
For entering the HALT mode proceed as follows:
1. Mask all interrupts which shall not have wake-up capability by
xxIC.xxMK = 0 and discard all possibly pending interrupts by xxIC.xxIF = 0.
2. Unmask all interrupts which shall have wake-up capability by
xxIC.xxMK = 1.
3. Execute the “halt” instruction.
(2)
WATCH, Sub-WATCH, STOP and IDLE mode
For entering these power save mode proceed as follows:
1. In case maskable interrupts shall be used for wake-up unmask these
interrupts by IMRm.xxMK = 0 (refer to
“IMR0 to IMR5 - Interrupt mask
registers” on page 214
).
2. Mask all other interrupts, i.e.
– none wake-up capable interrupts
– wake-up capable interrupts which shall not be used for wake-up
by IMRm.xxMK = 1. This prevents the power save mode entry procedure
from being interrupted by these interrupts.
3. It is recommended to disable interrupt acknowledgement by the “di”
instruction.
4. Specify the desired power save mode in PSM.PSM[1:0].
5. Enable writing to the write-protected register PSC by writing to PRCMD.
6. Write to PSC for specifying permitted wake-up events and activate the
power save mode by setting PSC.STP to 1.
Example
The following example shows how to initialize and enter a WATCH, Sub-
WATCH, STOP or IDLE power save mode.
First the desired power save mode is specified (WATCH mode in this example,
that means PSM.PSM[1:0] = 10
B
).
The PSC register is a write-protected register, and the PRCMD register is the
corresponding write-enable register. PRCMD has to be written immediately
before writing to PSC.
electronic components distributor