AT91RM9200 ticker error

Haberhausen, Dierk Dierk.Haberhausen at wincor-nixdorf.com
Fri Nov 26 15:14:38 UTC 2004


Hello,
I'm started working on a CSB337 board with a AT91RM9200 CPU.
I make a simple blinking LED test and I was wondering why
the ticker of 10ms was only 9.365ms long.
After some investigation I found out that in the
c\src\lib\libcpu\arm\at91rm9200\clock\clock.c file the
reload timer value is calculated wrong.
I change line 73 from
    st_pimr_reload = ((BSP_Configuration.microseconds_per_tick * 1000) /
                      slck);
to
    st_pimr_reload = ((BSP_Configuration.microseconds_per_tick * slck) /
                      1000000);
and now the ticker ticks with 10ms!
(bloody mathematic...)

Currently I work with the rtems-4-6-1 version from 
      http://www.lopingdog.com/rtems
because I'm not able to access the cvs server out off my office.
So I'm not sure if the problem solved currently???
Therefore can someone check this and change it if necessary...
Thanks and have a nice weekend!
Dierk



More information about the users mailing list