ST92F124/F150/F250 - RESET AND CLOCK CONTROL UNIT (RCCU)
Figure 63. Example of Low Power mode programming in WFI using CK_AF external clock
PROGRAM FLOW
Begin
Reset State
INTCLK FREQUENCY
FXtal = 4 MHz
MX[1:0] ← 00
DX[2:0] ← 000
WAIT
CSU_CKSEL ← 1
WFI_CKSEL ← 1
XTSTOP ← 1
LPOWFI ← 1
User’s Program
WFI instruction
PLL multiply factor
set to 10
Divider factor set
to 1, and PLL turned ON
Wait for the PLL to lock
T1*
PLL is system clock source
CK_AF clock selected
in WFI state
Preselect Xtal stopped
when CK_AF selected
Low Power Mode enabled
in WFI state
Wait For Interrupt
activated
CK_AF selected and Xtal stopped
automatically
Interrupt
WFI status
Interrupt Routine
XTSTOP ← 0
WAIT
CKAF_SEL ← 0
WAIT
No code is executed until
an interrupt is requested
Interrupt serviced
while CK_AF is
the System Clock
and the Xtal restarts
Wait for the Xtal to stabilise
The System Clock
T2**
switches to Xtal
Wait for the PLL to lock
CSU_CKSEL ← 1
User’s Program
PLL is System Clock source
Execution of user program
resumes at full speed
2 MHz
20 MHz
FCK_AF
2 MHz
20 MHz
* T1 = PLL lock-in time
** T2 = Quartz oscillator start-up time
132/429
9