Datasheet
Figure 30-2. Main Clock (MAINCK) Block Diagram
XIN
X
OUT
MOSCXTEN
Main Crystal
Oscillator
MOSCRCEN
Main RC
Oscillator
MOSCRCS
MOSCRCF
MOSCSEL
MOSCSELS
1
0
MAINCK
Main Cloc
k
CKGR_MOR CKGR_MOR
CKGR_MOR
PMC_SR
PMC_SR
CKGR_MOR
30.5.1 Main RC Oscillator
After reset, the Main RC oscillator is enabled with the 12 MHz frequency selected. This oscillator is selected as the
source of MAINCK. MAINCK is the default clock selected to start the system.
Only the 8/12 MHz RC oscillator frequencies are calibrated in production. Refer to the section “Electrical
Characteristics”.
The software can disable or enable the Main RC oscillator with the MOSCRCEN bit in the Clock Generator Main
Oscillator Register (CKGR_MOR).
The output frequency of the Main RC oscillator can be selected among
4, 8 or 12 MHz. Selection is done by
configuring the field MOSCRCF in CKGR_MOR. When changing the frequency selection, the MOSCRCS bit in the
Power Management Controller Status Register (PMC_SR) is automatically cleared and MAINCK is stopped until the
oscillator is stabilized. Once the oscillator is stabilized, MAINCK restarts and PMC_SR.MOSCRCS is set. Note that
enabling the Main RC oscillator (MOSCRCEN = 1) and changing its frequency (MOSCRCF) at the same time is not
allowed.
This oscillator must be enabled first and its frequency changed in a second step.
When disabling the Main RC oscillator by clearing the CKGR_MOR.MOSCRCEN bit, the PMC_SR.MOSCRCS bit is
automatically cleared, indicating that the oscillator is OFF.
Setting the MOSCRCS bit in the Power Management Controller Interrupt Enable Register (PMC_IER) triggers an
interrupt to the processor.
Related Links
58. Electrical Characteristics for SAM V70/V71
59. Electrical Characteristics for SAM E70/S70
30.5.2 Main RC Oscillator Frequency Adjustment
The 8 MHz and 12 MHz frequencies are factory-centered to the typical values by using Flash calibration bits (refer to
the “Electrical Characteristics” chapter).
The Flash calibration bits setting the Main RC oscillator frequency to
8 MHz and 12 MHz vary from device to device.
To get a starting point when changing the CAL8 or CAL12 fields, it is recommended to first read their corresponding
Flash calibration bits in the Flash Controller.
The user can adjust the value of the Main RC oscillator frequency by modifying the trimming values done in
production on 8 MHz and 12 MHz. This may be used to compensate frequency drifts due to temperature or voltage.
The values stored in the Flash cannot be erased by a Flash erase command or by the ERASE signal. Values written
by the user application in the Oscillator Calibration Register (PMC_OCR) are reset after each power-up or peripheral
reset.
SAM E70/S70/V70/V71 Family
Clock Generator
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 245










