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


Currently I am reading through the Arm based ATSAM4L series datasheet, and in the sections BSCIF and SCIF I have encountered at least 8 different oscillators/clocks (see image below). I understand that an oscillator is necessary for a clock signal for the MCU, but why are so many different sources necessary for this MCU family and MCU's in general?

EDIT: And what are the functions of these specific oscillators?

enter image description here

enter image description here

Best Answer

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.