Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-11 Thread TJF
There're two options to control the 32 outputs of a GPIO subsystem: 1. writes to register GPIO_DATAOUT, or 2. writes to registers GPIO_SETDATAOUT and GPIO_CLEARDATAOUT In the first case all pins switch at the exact same time. But there's a downside in controlling all 32 pins at once: it

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread Steve Lentz
Alright then. Something in the chip is indeed flipping them on the same clock edge. > On Aug 10, 2020, at 11:58 AM, Mark A. Yoder wrote: > > > > On my 100MHz 'scope they look the same. I think it's one instruction > toggling the pair. They are toggling at some 268KHz. > > --Mark > On

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread Steve Lentz
It’s unlikely to be exactly the same time, it’s just within some undefined margin for error. Compiled C code can get the two pins set within a small number of 1 GHz clocks. With a fast enough scope, you’’ll probably find at least a few ns difference, if this isn’t obscured by parasitic

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread Mark A. Yoder
Interesting I wrote a c version and the pins are toggle *at the exact same time*. Now, how to get gpioset to work correctly. --Mark On Monday, August 10, 2020 at 10:27:08 AM UTC-4 Mark A. Yoder wrote: >

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread Mark A. Yoder
Yes, but the hardware on the am335x can toggle multiple pins on the same chip in the same clock cycle. Seems like the software should be able to support it. On Monday, August 10, 2020 at 10:20:10 AM UTC-4 evilw...@gmail.com wrote: > software takes time to execute. > > > On 8/10/2020 7:09 AM,

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread evilwulfie
software takes time to execute. On 8/10/2020 7:09 AM, Mark A. Yoder wrote: I'm starting to play with gpiod on a Beaglebone Black.  One of the advantages of gpiod is you can toggle multiple pins on the same chip all at once. So I try: while true; do     gpioset 1 18=0 19=0     gpioset 1 18=1

Re: [beagleboard] libgpiod on Beaglebone AI

2020-08-10 Thread Mark A. Yoder
I'm starting to play with gpiod on a Beaglebone Black. One of the advantages of gpiod is you can toggle multiple pins on the same chip all at once. So I try: while true; do gpioset 1 18=0 19=0 gpioset 1 18=1 19=1 done This is toggling pins P9_14 and P9_16. I expect to see the two

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread Drew Fustini
On Fri, Mar 27, 2020 at 8:45 PM John Allwine wrote: > > I don't intend to toggle a GPIO as fast as possible (except to test), but > from a performance standpoint that demonstration seemed to indicate that > there are issues with sysfs. Hopefully, libgpiod will prove to be better! Bartosz

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread John Allwine
I don't intend to toggle a GPIO as fast as possible (except to test), but from a performance standpoint that demonstration seemed to indicate that there are issues with sysfs. Hopefully, libgpiod will prove to be better! -- For more options, visit http://beagleboard.org/discuss --- You

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread William Hermans
On Fri, Mar 27, 2020 at 11:46 AM Drew Fustini wrote: > On Fri, Mar 27, 2020 at 4:48 PM John Allwine > wrote: > > > > That was it! gpioget gpiochip3 10 worked. > > It would be interesting to know if libgpiod proves fast enough for > your application. It has C++ and Python bindings that allow

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread Drew Fustini
On Fri, Mar 27, 2020 at 4:48 PM John Allwine wrote: > > That was it! gpioget gpiochip3 10 worked. It would be interesting to know if libgpiod proves fast enough for your application. It has C++ and Python bindings that allow you to set and get multiple lines on a gpiochip with a single ioctl().

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread John Allwine
That was it! gpioget gpiochip3 10 worked. Thanks Robert! On Friday, March 27, 2020 at 9:42:15 AM UTC-6, RobertCNelson wrote: > > On Fri, Mar 27, 2020 at 10:34 AM John Allwine > wrote: > > > > I'm looking into using libgpiod to control the GPIO on the Beaglebone AI > in user space. I'm

Re: [beagleboard] libgpiod on Beaglebone AI

2020-03-27 Thread Robert Nelson
On Fri, Mar 27, 2020 at 10:34 AM John Allwine wrote: > > I'm looking into using libgpiod to control the GPIO on the Beaglebone AI in > user space. I'm starting small and trying to use the included command line > tools gpioget and gpioset, but not having any success. > > The Beaglebone AI System