32kHz External Clock Source for HCS08

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

32kHz External Clock Source for HCS08

ソリューションへジャンプ
1,329件の閲覧回数
Smiffytech
Contributor III

Firstly, a confession: until recently, I regarded clock generation as a Black Art and, whilst quite happy with the concept of clock division, could not get my head around FLL/clock multiplication. That is, until I read this article: http://blogs.freescale.com/2012/08/20/the-bare-metal-enthusiast-winding-the-clock/ 

Reading this made the FLL concept a lot clearer, and left me only slightly flummoxed

 

Having a quick search, I have found that I can clock a Kinetis part using the EXTAL32 pin to feed a 32kHz into the clocking system. Can I achieve the same with HCS08 (specifically, MC9S08AC128,) with only the EXTAL pin?

 

My reason for asking is that I would like to run a high-accuracy RTC, using a DS32KHZ TCXO as the clock source.

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
954件の閲覧回数
Derrick
NXP Employee
NXP Employee

Hi Mathew,

I'm happy to help remove the veil of mystery surrounding MCU clock generation. :smileyhappy:

In the MC9S08AC128 Reference Manual (Rev. 3, 09/2008), section 10.5.2 provides an example that uses an external 32kHz crystal.  We can use this setup for an external 32kHz oscillator (i.e., connected to the EXTAL pin) by changing the REFS bit to 0 in order to select the external clock.  So ICGC2 = 0x18.  As shown in the example, leaving ICGC2 = 0x00 will result in a bus frequency of 4.19MHz.

If you want to run faster, you can get the bus speed up to 18.874368MHz (almost the 20MHz maximum) by changing N to 18 (i.e., MFD = 7 in ICGC2).  This translates to setting ICGC2 = 0x70.

Best Regards,

Derrick

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
954件の閲覧回数
Smiffytech
Contributor III

Excellent, thanks Derrick! It's starting to make sense now. Now that I know it's do-able from a hardware standpoint, I'll have a play around with Processor Expert and see what it all looks like. (I'm finding it easier to let PE do the hard work, then try to make sense of what it's done.)

0 件の賞賛
返信
955件の閲覧回数
Derrick
NXP Employee
NXP Employee

Hi Mathew,

I'm happy to help remove the veil of mystery surrounding MCU clock generation. :smileyhappy:

In the MC9S08AC128 Reference Manual (Rev. 3, 09/2008), section 10.5.2 provides an example that uses an external 32kHz crystal.  We can use this setup for an external 32kHz oscillator (i.e., connected to the EXTAL pin) by changing the REFS bit to 0 in order to select the external clock.  So ICGC2 = 0x18.  As shown in the example, leaving ICGC2 = 0x00 will result in a bus frequency of 4.19MHz.

If you want to run faster, you can get the bus speed up to 18.874368MHz (almost the 20MHz maximum) by changing N to 18 (i.e., MFD = 7 in ICGC2).  This translates to setting ICGC2 = 0x70.

Best Regards,

Derrick

0 件の賞賛
返信