
341
11028E–ATARM–22-Apr-13
SAM9G46
25.5.1
Switch from Internal RC Oscillator to the 32768 Hz Crystal
To switch from internal RC oscillator to the 32768 Hz crystal, the programmer must execute the
following sequence:
Switch the master clock to a source different from slow clock (PLLA or PLLB or Main
Oscillator) through the Power management Controller.
Enable the 32768 Hz oscillator by setting the bit OSCEN to 1.
Wait 32768 Hz Startup Time for clock stabilization (software loop)
Switch from internal RC to 32768Hz by setting the bit OSCSEL to 1.
Wait 5 slow clock cycles for internal resynchronization
Disable the RC oscillator by setting the bit RCEN to 0.
25.5.2
Bypass the 32768 Hz Oscillator
The following step must be added to bypass the 32768Hz Oscillator.
An external clock must be connected on XIN32.
Enable the bypass path OSC32BYP bit set to 1.
Disable the 32768 Hz oscillator by setting the bit OSC32EN to 0.
25.5.3
Switch from 32768 Hz Crystal to the Internal RC oscillator
The same procedure must be followed to switch from 32768Hz crystal to the internal RC
oscillator.
Switch the master clock to a source different from slow clock (PLLA or PLLB or Main
Oscillator)
Enable the internal RC oscillator by setting the bit RCEN to 1.
Wait internal RC Startup Time for clock stabilization (software loop)
Switch from 32768Hz oscillator to internal RC by setting the bit OSCSEL to 0
Wait 5 slow clock cycles for internal resynchronization
Disable the 32768Hz oscillator by setting the bit OSC32EN to 0
25.5.4
Slow Clock Configuration Register
Register Name:
SCKCR
Address:
0xFFFFFD50
Access Type:
Read/Write
31
30
29
28
27
26
25
24
––––––––
23
22
21
20
19
18
17
16
––––––––
15
14
13
12
11
10
9
8
––––––––
76543210
––––
OSCSEL
OSC32BYP
OSC32EN
RCEN