[En-Nut-Discussion] CPU frequency on Charon board

Harald Kipp harald.kipp at egnite.de
Wed Oct 31 11:58:55 CET 2007


Jakub Marsik schrieb:
> I'm trying to run Nut/OS on Charon 2 board which should be hardware
> compatible with Ethernut 1.3 (ATmega128 CPU). There is a crystal with ~14.7
> MHz frequency on the board. When I use say the simple example application
> for Nut/OS and add just UART communication and printing of the result of
> NutGetCpuClock() function, I receive value around 2944 Hz - which is 5 times
> lower than expected.
>   
I assume that you use

  printf("CPU Clock %u\n", NutGetCpuClock()); /* Wrong! */

instead of

  printf("CPU Clock %lu\n", NutGetCpuClock()); /* Correct. */

Harald







More information about the En-Nut-Discussion mailing list