K60 clock running at half speed. Why?

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

K60 clock running at half speed. Why?

跳至解决方案
972 次查看
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 解答
723 次查看
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 回复数
724 次查看
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 项奖励
723 次查看
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 项奖励