Just following up on this thread with my own experiences:
First, opening /dev/mem with O_RDWR|O_SYNC is essential to making this thing
work without printfs. Now I have a good micro-second resolution timer.
What's a little odd is that if you convert the T4Ticks.c routines to a C++
class, the timing is super accurate down to +/- 1 microsecond whereas straight
C has a +/- 100 microsecond variation. Go figure.
--- In "Blair" <> wrote:
>
> That was it. Thank you.
>
> --- In "Charlie Wallace" <charlie@> wrote:
> >
> > just a guess, the optimiser might be looking at the timer pointer and not
> > seeing as as volatile, so assuming it never changes?
> >
> >
> > > Okay, this is an official WTF. If you take the T4ticks.c code and
> > > comment
> > > out the printf statements in the while loop, the loop never exits. Why?
> > > Kinda makes it really difficult to build some hardware-based delay
> > > functions.
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|