I used a 48 MHz crystal in my board MCF52259(Circuit connect as the same as the MCF52259EVB),I used the below code to PLL,but not successful , system clock is 16Mhz,and still is 16Mhz in EXTAL pin . why?
/*Required if booting with internal relaxation oscillator on, crystal off, & pll off, clkmod[1:0]=00 & xtal=1 */
MCF_CLOCK_OCLR = 0xC0; //turn on crystal //0xF0
MCF_CLOCK_CCLR = 0x00; //switch to crystal
MCF_CLOCK_OCHR = 0x00; //turn off relaxation osc
/* The PLL pre divider - 48MHz / 6 = 8MHz */
MCF_CLOCK_CCHR = 0x05;
/* The PLL pre-divider affects this!
* Multiply 48Mhz reference crystal /CCHR+1 by 8 to acheive system clock of 64Mhz
*/
MCF_CLOCK_SYNCR = 0x0;
MCF_CLOCK_SYNCR |= MCF_CLOCK_SYNCR_CLKSRC | MCF_CLOCK_SYNCR_PLLMODE;
//48
MCF_CLOCK_SYNCR |= MCF_CLOCK_SYNCR_MFD(4) | MCF_CLOCK_SYNCR_RFD(1);
MCF_CLOCK_SYNCR |= MCF_CLOCK_SYNCR_PLLEN;
while (!(MCF_CLOCK_SYNSR & MCF_CLOCK_SYNSR_LOCK))
{
;
}
I learned that it maybe has problem with external 48 MHz crystal ----" you use a 48Mhz crystal on 3rd overtone, you need a 48Mhz crystal working on fundamental frequency.", i dont know which crystal is 3rd overtone or not??
why system clock is not change when used the above code and modifed the parameters of MCF_CLOCK_SYNCR_MFD??
I see the table 7-1 and table 7-2, i want to know what is the crystal oscillator ,Relaxation oscillator ,external oscillator and on-chip oscillator? what is the different of those?
Table 7-1. Clocking Modes
CLKMOD[1:0] XTAL Clocking Mode
00 0 MHz crystal oscillator bypass with PLL disabled
00 1 Relaxation oscillator with PLL disabled
01 Not applicable MHz crystal oscillator with PLL disabled
Table 7-4. Clocking Modes
CLKMOD[1:0] XTAL Clocking Mode
00 0 PLL disabled, clock driven by external oscillator
00 1 PLL disabled, clock driven by on-chip oscillator
01 N/A PLL disabled, clock driven by external crystal
I found Table 7-14 in MCF52259RM involves the external oscillator mode and the external crystal mode, what is the different between the external oscillator mode and external crystal mode?
Table 7-14. OCLR Field Descriptions
bit[6]--Reference Source bit.
0 External oscillator is running in external oscillator mode.
1 External oscillator is running in external crystal mode.
Thanks for you reading ,waiting for your answer ....
已解决! 转到解答。
I replied earlier suggesting you might have installed a Third Harmonic crystal when you need a Fundamental Mode one.
Did you miss it, know it isn't your problem, or??
For reference, look for "overtone oscillator" here:
http://www.electronics-tutorials.ws/oscillator/crystal.html
Here's one of the previous posts I pointed you to:
https://community.freescale.com/message/66903#66903
YodaC Wrote:I make a new design for MCF 52259 with a common HC49crystal of 48MHz.But the crystal oscillate @16Mhz.BugMan responded:Because you use a 48Mhz crystal on 3rd overtone, you needa 48Mhz crystal working on fundamental frequency.pgo responded:Just an extra note - the 48MHz ABM7 crystal is 3rd overtone bydefault - You need to specify the fundamental mode operation whenordering. This may be true of the other one. (Just to re-enforcewhat BugMan said!)e.g. ABM7-48.000MHZ-D2Y-F-T (The 'F' is important!)
Tom
Possibly because you're using a third-harmonic crystal in a non-harmonic circuit.
Just type "48MHz" into the Search Box at upper right and read through the two pages of previous questions.
You need a 48MHz Fundamental Mode crystal.
Tom
Hi Cathychang,
I am running on the MCF52259EVB, with the 48MegaHz external crystal.
The crystal is selected for the USB section in my INIT_USB subroutine, because the USB section required 48MegaHz, and from what I've read it just plain won't work with any other frequency.
But before the INIT_USB is called, the external crystal is enabled and the pll is setup to run the system clock at 80 megahz. This part of my system has been running fine for a while now. (Although I did have some problems figuring it out early on).
Attached is an excerpt from my power up module that does the clock configuration.
Mudwog
I replied earlier suggesting you might have installed a Third Harmonic crystal when you need a Fundamental Mode one.
Did you miss it, know it isn't your problem, or??
For reference, look for "overtone oscillator" here:
http://www.electronics-tutorials.ws/oscillator/crystal.html
Here's one of the previous posts I pointed you to:
https://community.freescale.com/message/66903#66903
YodaC Wrote:I make a new design for MCF 52259 with a common HC49crystal of 48MHz.But the crystal oscillate @16Mhz.BugMan responded:Because you use a 48Mhz crystal on 3rd overtone, you needa 48Mhz crystal working on fundamental frequency.pgo responded:Just an extra note - the 48MHz ABM7 crystal is 3rd overtone bydefault - You need to specify the fundamental mode operation whenordering. This may be true of the other one. (Just to re-enforcewhat BugMan said!)e.g. ABM7-48.000MHZ-D2Y-F-T (The 'F' is important!)
Tom