[U-Boot-Users] bug in at91rm9200 interrupt.c [udelay()] ?

Mirco Fuchs mircofuchs at web.de
Wed Jul 20 12:04:40 CEST 2005


hello,

i'm porting u-boot to the csb637 board from cogent.

I think i found a bug in the udelay (); function in file interrupt.c (at91rm9200).

Assume the following C code:

...
start = get_timer(0);

/* some code */

udelay(1500)     // delay of about 1500us
next = get_timer(start);
...

what we expect is that the value of next holds the difference between next and start in milliseconds. This works fine without the udelay() function between the get_timer() function calls. But in udelay() the global variable timestamp is reset to zero and so there is no longer any relationship between next and start. The effect will be that any time measurements will fail.

I allready looked in some other interrupt.c files, but the udelay() function is handled in a similar way.

Maybe i'm wrong with my assumption, but i don't think so. I'm very interested in your answers.


Regards

Mirco

_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle 
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179







More information about the U-Boot mailing list