Guide on configuring pins

Hi,

I’ve been using a BBB for a couple of years now and have always struggled to configure pins.
There have been plenty of methods that have changed with kernel updates. As a result lots of information on the internet contradicts other posts and many of them are simply not working anymore.

Is there something like “a definitive guide on how to configure and control the pins on the current kernel version”?

I’ve seen pin manager, pin config, overlays, dtbo files loaded in slots, dtbo loaded in uboot and (it seems like) many others.

I can’t get P9_41 to work as an output (it has two different “balls” going to it), but would really like to understand what I’m doing.
Currently at kernel 4.14.71-ti-r80, but willing to update to newer if I can get everything working again.

Thanks in advance!

Yes, kernel pinmuxing is terrible. And when you use the config-pin tool in a bad manner on pins P9_41/P9_42 it can damage your CPU.

That’s why I developed libpruio. It can do all pin-muxing from user space in a safe manner (headers P8, P9, JT and also SD-Card-slot or user LEDS). Ie you can switch a PIN from input to output while your program is running. And your software is working on all kernel versions from 3.8 to the current 5.x without any adaption.

Find details at

http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/index.html

Regards

Dear Thomas,

Thank you for your reply. I’ve cloned the repository and I’m going through the documentation now!
Still, a guide on how to do this without going through third-party libraries would be nice…

Dieter

Make your choice: one third-party library or several guides for each kernel version …