Some pins don't work as digital output

Hi, I wrote the same code for some gpio’s, but some don’t change his states. I have to change another parameter? That’s the code written on terminal:


echo 66 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio66/direction
echo 0 > /sys/class/gpio/gpio66/value

Don’t work:

echo 34 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio34/direction
echo 0 > /sys/class/gpio/gpio34/value

I made the test on all P8 pins. These don’t work:3-6,11,20-25,27-46.

The /sys/class/gpio interface controls the gpio block which has signals that can be connected to pins through the pad control/pin mux registers? Did you make sure to connect gpio to the pin with the pin mux using a device tree overlay?

You can use these overlay to mux to gpio:

If you get an error loading one, you can use dmesg to see what else is using that pin. The last two production images have a bug that spams the kernel log with “gadget: rndis reqa1.01 v0000 i0000 l4096” type messages, so you might have to set your ssh windows scrollback to a few thousand lines to find it.

If you look at the system reference manual (SRM) on page 82 and 83 you’ll see that Pins 27 to 46 are used by the hdmi framer, and pins 11 to 21 are used by the emmc. If you don’t plan on using HDMI, you can disable it by changing the uEnv.txt in the first partition (where the beaglebone docs and drivers are) to:

optargs=quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

After this, the HDMI pins are free to use, with constraits. The LCD_DATA 0 to 15 are used for SYS_BOOT (page 92 of the SRM). The value on these pins when the beaglebone powers on is used to configure the boot, so these pins must be floating when the beaglebone powers on (either disconnect your stuff before you boot or use an isolator).

To use the emmc pins, you can disable the emmc and boot from the sd card (using the beaglebone white sd card image), but this has issues. Check the wiki for how to use the emmc pins.

Or, stay away from these pins altogether. :slight_smile: