User manual

...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 134
www.energymicro.com
Figure 11.6. HW-support for RC Oscillator Calibration
CMU_CALCTRL.REFSEL
AUXHFRCO
HFRCO
LFRCO
HFXO
LFXO
20-bit up-counter
CMU_CALCTRL.DOWNSEL
AUXHFRCO
HFRCO
LFRCO
HFXO
LFXO
TOP
Write top-value using
CMU_CALCNT before
starting calibration.
DOWNCLK Domain
UPCLK Domain
HFCLK Domain
= 0 ?
SYNC
(Default) HFCLK
SYNC
20-bit up-counter
buffer
SYNC
20-bit down-counter
Set CMU_IF.CALRDY
CMU_CALCNT
DOWNCLK
UPCLK
Reload down-counter with
top value in continouous
mode.
Take snapshot of up-counter
in up-counter bufffer. If in
cont inouous m ode, restart
up-counter from 0.
The counter operation for single and continuous mode are shown in Figure 11.7 (p. 134) and
Figure 11.8 (p. 134) respectively.
Figure 11.7. Single Calibration (CONT=0)
TOP
0
Calibration Started
Calibration Stopped
(counters st opped)
0
Down-counter
Up-counter
Up-counter sam pled and CALRDY
interrupt flag set.
Sam pled value available in
CMU_CALCNT.
Figure 11.8. Continuous Calibration (CONT=1)
TOP
0
Calibration Started
0
Down-counter
Up-counter
Up-counter sam pled and CALRDY
interrupt flag set.
Sam pled value available in
CMU_CALCNT.
Up-counter sam pled and CALRDY
interrupt flag set.
Sam pled value available in
CMU_CALCNT.