I'm happy to leave the pinmux alone, but if all I'm doing is reading or writing to the GPIO can I do so from /dev/mem?According to this post, it's about 1000x faster: http://chiragnagpal.com/examples.htmlIt's also how hal_bb_gpio is implemented: https://github.com/machinekit/machinekit-hal/blob/master/src/hal/drivers/hal_bb_gpio/hal_bb_gpio.cIf necessary, it could be rewritten to use sysfs, but if it means being 1000x slower, that's not ideal.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2ee15690-0da0-4cc0-889b-6f3c8326c5aa%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAEf4M_DgSg%3Dse0LCpsB%2BzV5sAq4-SphR6tNKiECd29jqOFwAOw%40mail.gmail.com.
Dynamic pinmux changes on AM5x have issues specific to AM5x.For GPIO, accessing via register writes in userspace (/dev/mem) has no more negative consequences than on AM3x or on any system running Linux for that matter. Standard caveats apply.Ideally, we’d create a kernel module to avoid latency and keep kernel resource control. This doesn’t have to be that complicated. In short of that, the same old hacks will work fine on AM5x—just don’t touch the pinmux without doing a LOT more digging.
You my want to consider using libgpiod with the /dev/gpiochipN character device. You can get and set multiple lines in one syscall.The libgpiod tools are installed on the Debian image.More info:
On Fri, 27 Mar 2020 05:37:02 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user John Allwine