Why not write this with a Kernel Module:

http://derekmolloy.ie/kernel-gpio-programming-buttons-and-leds/

This is much faster and will do what you want. 

Regards,
John




> On Apr 2, 2016, at 7:42 PM, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
> 
> 
>       o/~             I'm Talking to Myself in Public         o/~
> 
> On Sat, 02 Apr 2016 21:37:26 -0400, Dennis Lee Bieber
> <wlfr...@ix.netcom.com> declaimed the following:
> 
> 
> 
>>      I attempted to generate something in C++ which took hours. For some
>> reason I can't seem to find a GPIO pin that was actually toggling when
>> under an oscilloscope. Even when manually setting the pin value using the
>>      echo 1 > /sys/class/gpio/gpio#/value
>> from a command line. I could read back the 1 (or 0) value, but never found
>> a level change on the 'scope -- the pin was either tied high, or tied to
>> ground.
>> 
>>      My last version is showing some activity, but is still failing, as
>> shown (I'm wondering if usleep() has some obscenely large granularity on
>> the BBB, because it took 53 seconds to go from "beginning measurement" to
>> the first timeout error on the first byte, sixth bit):
>> 
> 
>       Actually, I suspect it's the overhead of all the I/O calls needed to
> access GPIOs via a pseudo file system.
> 
>       After all, to detect a 0 bit, requires being able to do three at least
> six I/O function calls in 27usec (the HIGH period of the bit --
> open/read/close to detect the transition to HIGH, and open/read/close to
> detect the end transition back to LOW -- and preferably multiple cycles to
> get some idea of the length)
> 
>       Might need to try the mmap route... Hopefully won't need the PRU.
> -- 
>       Wulfraed                 Dennis Lee Bieber         AF6VN
>    wlfr...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
> 
> -- 
> For more options, visit http://beagleboard.org/discuss
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to beagleboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to