Hello,
I would like to put this question to this plenum:
Is it possible to engage PLL when no osc and no clock is available (the MCU is in self-clock mode)? I suppose, that this is not possible.
And, next question, PLL can get the reference clocks from osc, can be referenced by clock connected to EXTAL too? My attempt to get this working is not successful.
I'm using clock of 5MHz on EXTAL and code from DRM:
void PLLINIT() {
CLKSEL &= ~BM_PLLSEL; // make sure PLL is *not* in use
PLLCTL |= BM_PLLON+BM_AUTO;// enable PLL module, Auto Mode
REFDV = S12_REFDV; // set up Reference Divider
SYNR = S12_SYNR; // set up Synthesizer Multiplier
while((CRGFLG & BM_LOCK) == 0) ;// wait until PLL is locked
CLKSEL |= BM_PLLSEL; // switch over to PLL clock
}
Any constructive reply will be appreciated.
Thanks.