MC9S08GB60 Clock Options for SCI Baud of 31.25K

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

MC9S08GB60 Clock Options for SCI Baud of 31.25K

ソリューションへジャンプ
669件の閲覧回数
danielhembree
Contributor III

I am using an MC9S08GB60 as part of a system that will communicate to external devices via the SCI at 31.25K baud rate. The development board I have has a 32.768 external crystal. The code I have written thus far is configuring the ICG for a 4.19MHz bus frequency in FEE mode. I took this section of code directly from the data sheet. I have noticed what appears to be quite a bit of jitter (instability) on the SCI bit stream, and consequently, many communication errors with my receiving device. The question(s) I have are 1) Is there a more accurate clock scheme (such as FBE mode), and 2) can I get to 4.19MHz bus frequency using the external crystal in FBE mode. The information I have found covering the ICG is not completely intuitive, and my attempts to use FBE mode have been unsuccessful.

 

Also, is there something else that could be causing the instability withe the SCI bitstream?

 

Thanks in advance.

 

Dan

ラベル(1)
0 件の賞賛
1 解決策
476件の閲覧回数
danielhembree
Contributor III

Solved.

I figured out that you CAN"T use a 32.768KHz external crystal in FEE or FBE modes to achieve a bus clock that will divide in the baud rate divide register (SPI) down to a rate close enough to produce a 31.25K baud rate. It took five minutes to come up with a configuration in FEI mode that satisfies the requirement.

My head hurts.

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
476件の閲覧回数
bigmac
Specialist III

Hello Dan,

To achieve an accurate SCI baud rate at 31250, you will need a bus frequency that is a multiple of 0.500 MHz.

For FBE mode, a crystal frequency of 16 MHz would give a maximum bus frequency of 8 MHz.
For FEE mode, you might choose a crystal frequency of 4 MHz for possible bus frequencies of 8, 12, 16 or 20 MHz.

For FEI mode, using the standard reference trim setting of 243 kHz, the multiplier factor would need to be 18 to achieve a DCO frequency very close to 40 MHz.  The bus frequency can then be one of 5, 10 or 20 MHz.

Regards,

Mac

0 件の賞賛
476件の閲覧回数
danielhembree
Contributor III

Thanks for the reply, Mac. I'm leaning toward using an external clock oscillator module and configuring for FBE mode. For the remainder of development I'll stick with the solution came up with using the internal config and a 5MHz bus clock. I suppose I'll ultimately need to use a 10MHz oscillator module as I believe this gets divided by two within the ICG.

Thanks again,

Dan

Thanks again

0 件の賞賛
477件の閲覧回数
danielhembree
Contributor III

Solved.

I figured out that you CAN"T use a 32.768KHz external crystal in FEE or FBE modes to achieve a bus clock that will divide in the baud rate divide register (SPI) down to a rate close enough to produce a 31.25K baud rate. It took five minutes to come up with a configuration in FEI mode that satisfies the requirement.

My head hurts.

0 件の賞賛