GPIO performance 100x slower compared to Raspberry Pi 3
#10
Hello,
  With pleasure. I have uploaded it once in this post:
https://forum.pine64.org/showthread.php?...7#pid49547
I am attaching again here for convenience (file GPIOsrc.tar). I have been busy with other tasks, so have not developed it further. It is still in experimental phase and documentation is still very ‘sparse’...


.tar   GPIOsrc.tar (Size: 180 KB / Downloads: 308)

  I have to admit, that I tested the standard fs-interface again on another board, with the Allwinner A20 processor. This time I have operated the interface files directly from C-code. It means, I opened the interface files, like e.g. /sys/class/gpio/gpio86/value, and then written or read using the file descriptor. The resulting speed of operations was much, much higher than in tests performed with Shell commands. So maybe scripts (Shell or Python) are so slow in interaction with the files, and not the interface itself. The only peculiarity in C is during reading: It is necessary to seek to the beginning each time before reading new value. But it is still very fast.
So maybe it is not worthy to operate directly on registers. I will compare it on the A20 board, once I have some time. The standard interface has important advantages: It takes care of race conditions and allows using interrupts (async reading with select()).
  And there is also the 'new standard' - The character-device interface (libgpiod). But I have not tried it, so far.

  Best regards,
  Gienek.


Messages In This Thread
RE: GPIO performance 100x slower compared to Raspberry Pi 3 - by Gienek - 08-19-2020, 04:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GPIO on the RockPro64 - all pins high? colinmarc 2 202 11-18-2022, 10:20 AM
Last Post: colinmarc
  GPIO Expander HAT for ROCKPro64 and Quartz64 CounterPillow 7 2,447 07-18-2022, 10:05 PM
Last Post: zer0sig
  Using GPIO interrupts antonlyap 3 2,390 06-30-2021, 01:32 PM
Last Post: antonlyap
  GPIO in sleep mode Mentaluproar 2 2,520 04-08-2019, 03:50 PM
Last Post: Mentaluproar

Forum Jump:


Users browsing this thread: 1 Guest(s)