Skip to contentSkip to conversation

Resulution of udelay and co

U-Boot-Users Jens Scharsig 2 participants 5 messages Nov 3, 2006

lore
Share & tools
lore
#0 lore raw

Hallo,

I am a little bit confused about udelay(unsigned long usec), get_timer(ulong base) and wait_ticks (unsigned long ticks).

Witch resolution should have this functions?

Thanks

Jens

#2 lore raw
Quoted 1 line · In message <[email protected]> you wrote:

By the way, what means the value of CFG_HZ

The number of ticks per second, like HZ in Linux.

For U-Boot, CFG_HZ is a constant of 1000.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I often quote myself; it adds spice to my conversation.  - G. B. Shaw
#3 lore raw
In reply to Jens Scharsig
Quoted 5 lines · In message <[email protected]> you wrote:

I am a little bit confused about udelay(unsigned long usec), get_timer(ulong base) and wait_ticks (unsigned long ticks).

Witch resolution should have this functions?

unsigned long usec = microseconds.

unsigned long ticks = ticks.

With the recommended setting of CFG_HZ=1000 a tick is a millisecond.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Bus error -- driver executed.
#4 lore raw
Quoted 8 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:

I am a little bit confused about udelay(unsigned long usec), get_timer(ulong base) and wait_ticks (unsigned long ticks).

Witch resolution should have this functions?

unsigned long usec = microseconds.

Quoted 8 lines

unsigned long ticks = ticks.

With the recommended setting of CFG_HZ=1000 a tick is a millisecond.

Best regards,

Wolfgang Denk

Thanks

I will correct the timer functions for my target cpu to be really CLK dependently.

Jens