Microchip Technology megaAVR 0 Series Manual page 80

Hide thumbs Also See for megaAVR 0 Series:
Table of Contents

Advertisement

Figure 9-2. Main Clock and Prescaler
32.768 kHz crystal Osc.
The Main Clock and Prescaler configuration registers (CLKCTRL.MCLKCTRLA,
CLKCTRL.MCLKCTRLB) are protected by the Configuration Change Protection Mechanism, employing a
timed write procedure for changing these registers.
9.3.3
Main Clock After Reset
After any Reset, CLK_MAIN is provided by the 20 MHz Oscillator (OSC20M) and with a prescaler division
factor of 6. The actual frequency of the OSC20M is determined by the Frequency Select bits (FREQSEL)
of the Oscillator Configuration fuse (FUSE.OSCCFG). Refer to the description of FUSE.OSCCFG for
details of the possible frequencies after Reset.
9.3.4
Clock Sources
All internal clock sources are enabled automatically when they are requested by a peripheral. The crystal
oscillator, based on an external crystal, must be enabled by writing a '1' to the ENABLE bit in the 32 KHz
Crystal Oscillator Control A register (CLKCTRL.XOSC32KCTRLA) before it can serve as a clock source.
The respective Oscillator Status bits in the Main Clock Status register (CLKCTRL.MCLKSTATUS) indicate
whether the clock source is running and stable.
9.3.4.1
Internal Oscillators
The internal oscillators do not require any external components to run. See the related links for accuracy
and electrical characteristics.
20 MHz Oscillator (OSC20M)
This oscillator can operate at multiple frequencies, selected by the value of the Frequency Select bits
(FREQSEL) in the Oscillator Configuration Fuse (FUSE.OSCCFG).
After a system Reset, FUSE.OSCCFG determines the initial frequency of CLK_MAIN.
During Reset, the calibration values for the OSC20M are loaded from fuses. There are two different
calibration bit fields. The Calibration bit field (CAL20M) in the Calibration A register
(CLKCTRL.OSC20MCALIBA) enables calibration around the current center frequency. The Oscillator
Temperature Coefficient Calibration bit field (TEMPCAL20M) in the Calibration B register
(CLKCTRL.OSC20MCALIBB) enables adjustment of the slope of the temperature drift compensation.
For applications requiring more fine-tuned frequency setting than the oscillator calibration provides,
factory stored frequency error after calibrations are available.
The oscillator calibration can be locked by the Oscillator Lock (OSCLOCK) Fuse (FUSE.OSCCFG). When
this fuse is '1', it is not possible to change the calibration. The calibration is locked if this oscillator is used
as main clock source and the Lock Enable bit (LOCKEN) in the Control B register
(CLKCTRL.OSC20MCALIBB) is '1'.
The calibration bits are protected by the Configuration Change Protection Mechanism, requiring a timed
write procedure for changing the main clock and prescaler settings.
Refer to the Electrical Characteristics section for the start-up time.
©
2018 Microchip Technology Inc.
OSC20M
32 KHz Osc.
CLK_MAIN
External clock
Datasheet Preliminary
megaAVR
Clock Controller (CLKCTRL)
Main Clock Prescaler
CLK_PER
(Div 1, 2, 4, 8, 16, 32,
64, 6, 10, 24, 48)
®
0-Series
DS40002015A-page 80

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the megaAVR 0 Series and is the answer not in the manual?

This manual is also suitable for:

Atmega4808Atmega4809Atmega3208Atmega3209

Table of Contents