K60 clock running at half speed. Why?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K60 clock running at half speed. Why?

Jump to solution
924 Views
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.

Labels (1)
Tags (3)
0 Kudos
1 Solution
675 Views
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.

View solution in original post

0 Kudos
2 Replies
676 Views
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 Kudos
675 Views
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 Kudos