--- In Matt Godbolt <> wrote:
>
>
> > tate = *PBDR;
> > > while (!(state & 0x01)) {
> > > state = *PBDR;
> > > }
> > >
> > > printf("boo\n");
> > > }
> > >
> >
> > Your delay is unlikely the pins. It's more likely to be the IO.
> > You might want to try to flush the io buffer after each printf:
> > "fflush(stdout);"
> >
> Hi there, I tried all manner of IO flushing, ioctl()s, etc (including
> flashing the LEDs on the circuit board) and none of that helped - even
> without flushing it wouldn't have missed some of the edges as my
> experiments suggested, it would have just bunched them up until the
> printfs() got flushed.
>
> I'm still not sure what was going on, but writing kernel-level drivers
> has obviated the issue. In fact, if anyone is interested in either a
> /dev/lcd driver (a patch to lcdmod), or a driver to act on interrupts on
> a DIO pin from an infra-red detector (I have a driver to lirc), let
me know.
>
> Thanks to those who helped - one day I will revisit this user-mode issue
> and try and work out what it was, but until then I'm happy in
kernel-space.
>
> Thanks,
>
> Matt
>
Hi again all, regarding this issue, something in the recently-posted
thread 'Increasing kernel clock_tick' made me realise - the problem
I'm getting is exactly the issue solved by the O_SYNC flag Peter
Elliot mentions! http://www.simtec.co.uk/appnotes/AN0014/ notes this
too -- I really was reading cached memory (as all the example code,
including Jim Jackson's adio library do). Without the O_SYNC flag you
get a cached representation of the IO...which gives exactly the
symptoms I was observing!
I hope this helps anyone else who's suffering from problems with
user-mode GPIO access :)
Cheers,
Matt
-==-
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|