Electronic – the purpose of PLL in a general microcontroller

microcontrollerplltm4c123g

An ARM Cortex-M4 based microcontroller like TM4C123GH6PM is designed with multiple clock sources with a processor core clocked at 80MHz provided by the PLL, which, from what've read in NI-What is a PLL? and All About Circuit – What exactly is a PLL?, is some sort of feedback x oscillator circuitry that detects phase shift and stabilizes input frequencies through feedback. I don't understand how PLL relates to microcontroller. I'm not sensing any phase shift or trying to stabilize any signal here, and I don't get how the PLL magically produce a 400MHz clock.

Why is this PLL embedded in the microcontroller? If I want my processor to clock at max 80MHz as written in the specs then I just use an 80MHz external crystal. If some peripherals like USB require faster clock sources then I use a faster crystal and divide the clock to supply multiples of slower clock to other devices. External crystals are more accurate than internal oscillators anyway, so why bother stuffing a PLL in between an accurate external crystal and the processor, especially when I'm not dealing with any high frequency or RF application?

TM4C123 clock source

Best Answer

The PLL lets you be flexible with clock speed even after you've built the board, and of course, it lets you generate many different frequencies from the one onboard oscillator.

Honestly, just having a PLL so you can generate many frequencies off the onboard RC oscillator makes it worth having a PLL. That way you can operate flexibly with no external oscillator at all if you don't need one. From there, it's not too much more effort to make it so you can also re-route that PLL to an external oscillator.

The PLL lets you produce clocks faster than what is possible in a quartz crystal. Even though MEMS oscillators are available which can oscillate at much higher frequencies than quartz, you still might not want to operate directly off of one since a 400MHz external oscillator requires you to route a 400MHz trace.

As for how the PLL works. Do you know anything about music? Do you know how you can listen to a song and clap to the beat? You just keep equal timing between each clap and adjust the timing until each clap lands on a beat. Easy, right?

Now, do you know how you could do two, or even four claps per beat? A PLL does the same thing. You count your own claps and make sure the time between each clap is equal, but you adjust the time between claps until every fourth clap lands on the beat that you hear in the song, at which point you stop adjusting. In that way, you can produce a clap that is four times as fast even though the beat of the song is four time slower.

Related Topic