ST92141 - RESET AND CLOCK CONTROL UNIT (RCCU)
Figure 30. Example of Low Power Mode programming
PROGRAM FLOW
Begin
COMMENTS
SYSTEM CLOCK FREQUENCY
FQ=5 MHz, Vcc=5 V and T=25°C
SET UP AFTER RESET PHASE:
DIV2 = 1
XTSTOP = 0
CSU_CKSEL = 0
MX(1:0) = 00
Quartz divided by 2
Xtal is selected to
restart the PLL quickly
PLL multiply factor
fixed to 10.
2.5 MHz
DX2-0 ← 000
WAIT
CSU_CKSEL
1
Wait for the
PLL locking
(LOCK->1)
WFI_CKSEL ← 1
XTSTOP ← 1
Multiplier divider’s factor set
to 1, and PLL turned ON
PLL is
T1*
system clock source
CK_AF clock selected when WFI
To stop PLL and Xtal when
a WFI occurs
LPOWFI ← 1
Low Power Mode enabled
User’s Program
25 MHz
Interrupt
Interrupt
Routine
WAIT
WFI
WFI status
XTSTOP ← 0
CKAF_SEL <- 0
Main code execution
continued
CSU_CKSEL<- 1
User’s Program
End
Wait For Interrupt
No code is executed until
an interrupt is requested
Interrupt served
while the CK_AF is
the system clock
To restart Xtal and PLL
The system CK
switches to Xtal
The PLL is locked
and becomes the
system clock
CK_AF/16
T2** CK_AF
T1*
2.5 MHz
25 MHz
* T1 = PLL lock-in time
** T2 = Quartz oscillator start-up time
68/179
1