Datasheet
37
7734Q–AVR–02/12
AT90PWM81/161
1. Clock stability before switching
Once the new clock source is selected, the count procedure is running. The user (code)
should wait for the setting of the CLKRDY flag in CLKSCR register before to perform a
switching.
2. Clock available on request
AT any time, the user (code) can ask for the availability of a clock source. The user (code)
can request it writing the appropriate command in the CLKSCR register. A full status on
clock sources then can be done.
5.3.6 Clock Switching
To drive the system clock, the user can switch from the current clock source to the following
ones (one of them is the current clock source):
1. Calibrated internal RC oscillator 8.0MHz/1.0MHz,
2. Internal watchdog oscillator 128kHz,
3. External clock,
4. External Crystal/Ceramic Resonator,
5. PLL output divided by four.
The clock switching is performed in a sequence of commands. First, the user (code) must make
sure that the new clock source is running. Then the switching command can be entered. At the
end, the user (code) can stop the previous clock source. It will be better to run this sequence
once the interrupts disabled. The user (code) has the responsibility of the clock switching
sequence.