AnsweredAssumed Answered

PLL and Timers

Question asked by Harshitha C B on Jun 18, 2018
Latest reply on Jun 19, 2018 by Harshitha C B




I want to know how PLL and Timers are interrelated?


This is my PLL code and Timer code that has an interrupt which produces a 10ms delay


static void PLL_Init(unsigned char synr, unsigned char refdv, unsigned char postdiv)
PLLCTL = 0B00000001; // CME=0,PLLON=0,FM1=0,FM2=0,FSTWKP=0,PRE=0,PCE=0,SCME=1
SYNR = synr; // Set the multiplier register
REFDV = refdv; // Set the divider register
POSTDIV = postdiv; // Set the post divider register
PLLCTL_PLLON = 1; // Enable the Phase Lock Loop
while(!CRGFLG_LOCK); // Wait till the PLL VCO is within tolerance
CLKSEL_PLLSEL = 1; // Select clock source from PLLCLK
//ECLKCTL_NECLK=0; // Enable the BusClk output at ECLK pin


They have configured many things i want to know how they are related to each other, why PLL is required for timers