Datasheet
168
SAM9G15 [DATASHEET]
11052D–ATARM–31-Oct-12
21.4.3 Switch from the 32768 Hz Crystal to Internal 32 kHz RC Oscillator
The same procedure must be followed to switch from a 32768 Hz crystal to the internal 32 kHz RC oscillator.
z Switch the master clock to a source different from slow clock (PLL or Main Oscillator).
z Enable the internal 32 kHz RC oscillator for low power by setting the bit RCEN to 1
z Wait internal 32 kHz RC Startup Time for clock stabilization (software loop).
z Switch from 32768 Hz oscillator to internal RC by setting the bit OSCSEL to 0.
z Wait 5 slow clock cycles for internal resynchronization.
z Disable the 32768 Hz oscillator by setting the bit OSC32EN to 0.
z Switch the master clock back to the slow clock domain