System clock

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

System clock

跳至解决方案
707 次查看
kayji
Contributor I

Hello. i'd like to ask something about system clock in the board MC9S12XEP100.

 

In the Manuel, this board has clock sources to support frequency to system. Things like Oscillator, Phased locked loop.

 

The problem is oscillator in this board only can provide not more than 4MHZ clock though i need a 16Mhz system clock.

 

As i've seen a Manuel, Phased lock loop mode can solve my problem. But i don't understand exactly what that mode is. Is that

 

a mode providing internal system clock source? 

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
498 次查看
kef
Specialist I

PLL allows you to multiply and divide your reference oscilator clock (4MHz in your case) to produce higher clocks. I'm not sure what do you mean by system clock. If it is a bus clock, then S12XE code to switch to 16MHz bus clock from 4MHz osc. clock could be like this:

 

   SYNR = 3;
   REFDV = 0x40;
   POSTDIV = 0;
   PLLCTL |= PLLCTL_PLLON_MASK;

   while( !(CRGFLG & CRGFLG_LOCK_MASK) )
   {           /* Wait until PLL lock */
   }
  CLKSEL |= CLKSEL_PLLSEL_MASK; // switch to PLL clock
 

If you need different bus clock, then use this software to calculate SYNR, REFDV and POSTDIV settings:

http://cache.freescale.com/files/microcontrollers/doc/user_guide/S12XEIPLLCUGSW.zip

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
499 次查看
kef
Specialist I

PLL allows you to multiply and divide your reference oscilator clock (4MHz in your case) to produce higher clocks. I'm not sure what do you mean by system clock. If it is a bus clock, then S12XE code to switch to 16MHz bus clock from 4MHz osc. clock could be like this:

 

   SYNR = 3;
   REFDV = 0x40;
   POSTDIV = 0;
   PLLCTL |= PLLCTL_PLLON_MASK;

   while( !(CRGFLG & CRGFLG_LOCK_MASK) )
   {           /* Wait until PLL lock */
   }
  CLKSEL |= CLKSEL_PLLSEL_MASK; // switch to PLL clock
 

If you need different bus clock, then use this software to calculate SYNR, REFDV and POSTDIV settings:

http://cache.freescale.com/files/microcontrollers/doc/user_guide/S12XEIPLLCUGSW.zip

 

0 项奖励
回复