VDDPLL max = 1.98V
EXTAL max = VDDPLL + 0.3V ; you have 1.95V => OK
VDDPLL must be connected to GND via C=220nF ; You have written VDDpll is bypassed to ground. => ???
I suppose you have \XCLKS connected to GND (log.0)
In order to calculate PLL setup the easiest way is to use: https://community.freescale.com/docs/DOC-103954
short example for PLL setup:
//==============================================================================
// The example present PLL setup example
// OSCCLK=16MHz
//==============================================================================
#include <MC9S12XEP100.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12xep100"
//==============================================================================
void set_pll(unsigned char _synr, unsigned char _refdv, unsigned char _postdiv);
//==============================================================================
void set_pll(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
CLKSEL = 0B00000011; // PLLSEL=0,PSTP=0,PLLWAI=0,RTIWAI=1,COPWAI=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 to see busclk if necessary
}
//==============================================================================
void set_plloff(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
CLKSEL = 0B00000011; // PLLSEL=0,PSTP=0,PLLWAI=0,RTIWAI=1,COPWAI=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 = 0; // Select clock source from PLLCLK
ECLKCTL_NECLK=0; // Enable the BusClk output at ECLK pin to see busclk if necessary
}
//==============================================================================
void main(void)
{
//set_pll(0xD8, 0x01, 0x00); // BUSCLK=50MHz from OSCCLK=4MHz
//set_pll(0x05, 0x40, 0x00); // BUSCLK=24MHz from OSCCLK=4MHz
set_pll(0x05, 0x40, 0x00); // BUSCLK=24MHz from OSCCLK=4MHz
DDRB = 0xFF;
for(;;)
{
PORTB = ~PORTB;
}
}
To check the schematic look into attachment.
Best regards,
Ladislav