K60 clock running at half speed. Why?

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

K60 clock running at half speed. Why?

ソリューションへジャンプ
938件の閲覧回数
PhilH
Contributor II

I am trying to port to a new development board. It has a K60 chip and is using a 50Mhz external clock input.  I started with the 3.8.1 release and just compiled the libraries in debug mode and tried one of the examples.  It hung in the clock setup code.  Since all my previous experience is with 3.8.0, I downloaded the older release and tried that.  That code comes up and runs (does not get hung in the clock setup code).  I tried to configure UART5 as that is wired through a MAX232 chip for serial access.  I was getting garbage characters on both input and output but it did get an interrupt when I typed a char into hyperterminal.  I tried a small loop of "_time_delay(1000); printf("x");"  and found it was taking twice as long to output the garbage char.  This led me to think the clock was running slow by 2 x so I tried to connect at 4800 baud (instead of the configured by me of 9600) and success.  I can now talk correctly to a serial port.  The question is why is the clock running 2x slow?  This is the same exact startup code as run on the  TOWER hardware platform which also has a 50 Mhz input clock. Anyone have a clue?

Thanks

Phil H.

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
689件の閲覧回数
PhilH
Contributor II

I resolved the problem.  A hardware layout problem on the board resulted in a 25 Mhz clock instead of 50 Mhz.  This has been fixed with cuts/jumpers.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
690件の閲覧回数
PhilH
Contributor II

I resolved the problem.  A hardware layout problem on the board resulted in a 25 Mhz clock instead of 50 Mhz.  This has been fixed with cuts/jumpers.

0 件の賞賛
689件の閲覧回数
crezyoz
Contributor IV

Not sure what your problem is specifically. But UART 0 & 1 use the system clock and the others use the bus clock.

0 件の賞賛