Why do some microcontrollers have numerous oscillators (and what are their functions)?

32kHz ultra low power oscillator: Used for RTCs (Real-time-clock). These can run in the background and enable time-keeping, even when the controller core is sleeping. This enables to have a running clock without the high power consumption of the controller core. The 32kHz oscillators are pretty precise and typically have an error of less than a minute per month.

32kHz RC oscillator: Similar to the above, but way less precise. RC oscillators can easily be integrated into the µC itself and don't require external parts, but have not very good tolerances. The low clock speed still enables some background stuff going on, while most of the controller is sleeping to safe power.

1MHz RC oscillator: A lot faster than the 32kHz oscillator (obviously) and enables to do some faster processing. Used for normal operation in non-sleep mode and is integrated in the controller. So for this RC oscillator no external parts are needed (again). Clock is not very precise and can vary by several percent (although often it is possible to calibrate these).

Crystal oscillator up to 30MHz: An external 30MHz crystal can speed up operation by a factor of 30 in comparison to the internal 1MHz oscillator and can be pretty precise, but needs the additional external parts. The higher clock also increases power consumption.

PLL: Enables the controller to run of a precise crystal frequency and derive an even higher clock frequency, if that is needed.

It is up to the developer to choose which clock source is the best compromise of cost, power consumption, board area, precision and performance (Which is not necessarily a static decision: The controller might run a few seconds on the high clock speed to do some acquisitions, calucations, data transfers, etc. After that it might go to deep sleep mode and only the RTC is running in the background, until some event (either by the RTC or some external trigger) wake the controler up to repeat the cycle.


What these are for:

  • 32kHz low power: "digital watch" crystal. Use this when you want to power down the main oscillator but not lose track of what time it is so you can wake up periodically.

  • 32kHz RC: cheaper (no crystal), but less accurate. When you want a digital watch that doesn't tell the correct time.

  • external fast crystal: for things like USB where you need a precise high-speed frequency.

  • fast RC 80MHz: for providing the main system clock cheaply when precision is not required.

  • RC 4/8/12MHz: low-speed (therefore probably lower-power) version of the above, may be useful for clocking peripherals as well

  • DFLL/PLL: for generating faster frequencies than the available range of crystals.


They are not strictly necessary but the vendor is attempting to cover as many use-cases with one part as they can.

Some applications may want to use the internal oscillator, others may need a precise clock source, others may want low power consumption.

Generally you will use only one in a specific design although in some cases the clock mode is changed dynamically by the application software.

I think you will find that most of the parts in the same class as the ATSAM will have similar clock and other peripheral features. Yes, it can seem intimidating at first since there are what seem to be a bewildering array of options but often you will only need to concern yourself with one or two of them. In many cases the default will work to get you started.