External Clock in Processor Expert

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

External Clock in Processor Expert

ソリューションへジャンプ
4,071件の閲覧回数
Alexandre_Mello
Contributor II
I'm using the CodeWarrior 3.1 with the MC9S08GB60. I wanto to configure the processor expert to use an external clock.

My question is: How do I do so that when the MCU start, it uses the internal clock, until the external clock can be configured, and after that switch to the external clock?
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,854件の閲覧回数
ProcessorExpert
Senior Contributor III
Hello,
I am sorry, but the current version doesn't support to have the low-speed mode clock higher that the high-speed mode.
There is only one option remaining - use the "User code before PE initialization" item from the cpu bean "Build options". This item enables to put a user defined code on the beggining of the EntryPoint function, before the cpu is switched to the external clock. However, because this code is executed before an initilization of the stack you cannot use method calls and you cannot use any bean to do SPI communication. The initialization of the external clock source has to be hand coded.

Petr Hradsky
Processor Expert Support Team
UNIS

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,854件の閲覧回数
alex_spotw
Contributor III
Hi:

Processor Expert does that for you automatically. Check the internal function _EntryPoint() in Cpu.c, and this will show the code that PE uses to wait until the External Clock is ready, before switching from the internal clock.

Regards,

Alex
0 件の賞賛
返信
1,854件の閲覧回数
Alexandre_Mello
Contributor II
Well, but I still have a Problem. The problem is that the MCU have to initiate the external clock using the SPI, and so the MCU have to initiate with the internal clock, and then switch to the external. How could I do that?
0 件の賞賛
返信
1,854件の閲覧回数
ProcessorExpert
Senior Contributor III

It is possible to use "User code before PE initialization" item at Build Options page in CPU Inspector. The second way is to use speed modes, to set internal clock as high speed and low mode as external clock.

Best Regards, Jan Pospisilik, Processor Expert Support

0 件の賞賛
返信
1,854件の閲覧回数
Alexandre_Mello
Contributor II
I tried to use the speed modes, but CodeWarrior doesn't let me because the low speed mode is faster than the high speed. What can I do?
0 件の賞賛
返信
1,855件の閲覧回数
ProcessorExpert
Senior Contributor III
Hello,
I am sorry, but the current version doesn't support to have the low-speed mode clock higher that the high-speed mode.
There is only one option remaining - use the "User code before PE initialization" item from the cpu bean "Build options". This item enables to put a user defined code on the beggining of the EntryPoint function, before the cpu is switched to the external clock. However, because this code is executed before an initilization of the stack you cannot use method calls and you cannot use any bean to do SPI communication. The initialization of the external clock source has to be hand coded.

Petr Hradsky
Processor Expert Support Team
UNIS
0 件の賞賛
返信