> .I have confused on the description of the three pin. Are they just only useful in booting sequecne?
MCF52259 Reference Manual:
7.3.5 Clock Mode Selection (CLKMOD[1:0])
These digital inputs are sampled during reset (all resets including cold and warm resets) and determine
which clock source should be used as the system clock, as illustrated in Table 7-1.
CLKMOD[1:0] XTAL Clocking Mode
Yes, they are only sampled at reset, which for you is when you boot. After that your code can change the clock setup by writing to control registers.
You should wire it to start in "PLL disabled, clock driven by on-chip oscillator". CLKMOD [0:1] are dedicated pins on this chip so you can tie them both to ground.
The XTAL pin needs to be pulled high. I'd pull it high with a 1k to 10k resistor in case it gets enabled as an output somehow.
Start up on the internal clock, start the external oscillator, wait a while for it to stabilise and then switch to the external clock.
Then you should look for some example code that shows how to enable the PLL and switch over to it (if you are using the PLL). I suspect you have to start the PLL while in PLL Bypass mode, then you have to WAIT until the PLL is stable (SYNSR[LOCK] bit and maybe others) and only then switch over to the PLL.
Tom