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 capacitance in the traces and wiring. Sure, this is a 3 orders of magnitude less than gpiod, but there are folks out there working in femtoseconds for whom a nanosecond would be far too long. Time is a very stretchy thing.
> On Aug 10, 2020, at 11:33 AM, Mark A. Yoder <mark.a.yo...@gmail.com> wrote: > > Interesting.... I wrote a c version > <https://github.com/MarkAYoder/BeagleBoard-exercises/blob/master/gpiod/bulk.c> > 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: > 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 > <applewebdata://859AA44B-14C9-4D61-8598-4CE2D095E0F7> wrote: > 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 19=1 >> done >> >> This is toggling pins P9_14 and P9_16. I expect to see the two pins toggle >> on at the same time, but what I get is >> a 4 microsecond delay from P9_14 switching and P9_16 switching. >> >> Should there be such a long delay? I'd expect the two to switch at the same >> time (which is what happens when toggle pins via the PRU). >> >> I do the same experiment with python and I see a 70 us delay. >> >> --Mark >> On Friday, March 27, 2020 at 3:58:21 PM UTC-4 Drew Fustini wrote: >> On Fri, Mar 27, 2020 at 8:45 PM John Allwine <jo...@allwinedesigns.com <>> >> 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 explains the differences and improvements that new gpiod >> interface provides in this talk: >> https://www.youtube.com/watch?v=cdTLewJCL1Y >> <https://www.youtube.com/watch?v=cdTLewJCL1Y> >> >> Essentially, if you need read or set multiple lines, it is faster. >> Also, it has an improved way to read events as well. >> >> Slides if you prefer over video: >> https://ostconf.com/system/attachments/files/000/001/532/original/Linux_Piter_2018_-_New_GPIO_interface_for_linux_userspace.pdf?1541021776 >> >> <https://ostconf.com/system/attachments/files/000/001/532/original/Linux_Piter_2018_-_New_GPIO_interface_for_linux_userspace.pdf?1541021776> >> > >> -- >> For more options, visit http://beagleboard.org/discuss >> <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...@googlegroups.com <>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/16a18eef-a649-46d9-b126-f774a8eb1522n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beagleboard/16a18eef-a649-46d9-b126-f774a8eb1522n%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > -- > For more options, visit http://beagleboard.org/discuss > <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 > <mailto:beagleboard+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/ab17b85d-7f42-42cb-9793-ed7d04a44e27n%40googlegroups.com > > <https://groups.google.com/d/msgid/beagleboard/ab17b85d-7f42-42cb-9793-ed7d04a44e27n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/A0B87564-F04B-48AA-9D42-0E258010DD3C%40gmail.com.