AT91RM9200 ticker error

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Mon Nov 29 07:20:08 UTC 2004


Hello Dierk,

greetings from munich :-)

In CVS, the file "clock.c" is still in its initial version, see

http://www.rtems.com/cgi-bin/cvsweb.cgi/rtems/c/src/lib/libcpu/arm/at91rm9200/clock/

I have filed a PR on this problem for this bug in 

http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS

in PR 727

wkr,
Thomas Doerfler.
> 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

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list