ST90158 - RESET AND CLOCK CONTROL UNIT (RCCU)
Figure 35. Example of Low Power mode programming in WFI using CLOCK2/16
PROGRAM FLOW
Begin
Reset State
INTCLK FREQUENCY
FXtal = 4 MHz, VDD = 2.7 V min
MX(1:0) ← 01
DX2-0 ← 000
WAI T
CSU_CKSEL ← 1
PLL multiply factor
set to 6
Divider factor set
to 1, and PLL turned ON
Wait for the PLL to lock
T1*
PLL is system clock source
2 MHz
LPOWFI ← 1
User’s Program
WFI instruction
Low Power Mode enabled
in WFI state
Wait For Interrupt
activated
CLOCK2/16 selected and PLL
stopped automatically
12 MHz
Interrupt
WFI status
Interrupt Routine
No code is executed until
an interrupt is requested
Interrupt serviced
PLL switched on
CLOCK2 selected
125 KHz
WAIT
CSU_CKSEL ← 1
Wait for the PLL to lock
T1*
PLL is system clock source
User’s Program
Execution of user program
resumes at full speed
2 MHz
12 MHz
* T1 = PLL lock-in time
73/190
9