How to find which GPIO pins can be used?

I’m sure I’ve seen a list or table somewhere that shows which GPIO pins can be used without interfering with the BBB’s basic functions. I’m running a BBB headless with no display connected and currently using the EMMC (but I could easily move to a micro-SD card).

So, how do I find out which GPIO pins I can use? I believe moving from EMMC to micro-SD frees up more pins but I don’t think I’ll be that short. However having a block of pins together on the connector makes wiring easier and less error prone.

Hello,

gpioinfo works and then checking the docs. will help too.

Also, there was a script to see what pins are being utilized by mvduin on github. GitHub - mvduin/bbb-pin-utils: Pin utilities for BeagleBone Black

Seth

P.S. If this is not what you are describing, please let me know. Also, the docs.beagleboard.org have some good ideas based around the BBB.

Hi,
I’m new to Beaglebone black, and having a hard time understanding which pins I can use for IO. I installed and run the show-pins and get the results below as output (also an error about locale not being set?)

I am using this “most recent???” OS :
bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb

All I want to do is get access to as many IO pins as possible, since my project requires 21 interrupt enabled INPUT pins, 30 other input pins, SPI and I2C pins. That makes 51 I/O pins plus 2 I2C pins plus 4 SPI pins… Is that possible with the BB black? Is there any way to make all the pins available?

I currently access the board via SSH from a linux pc, but maybe it would be nice to have a desktop and use VNC to access it as well?

Thanks for any help and sorry for such noobie questions :wink:
Bob

P8.03 / eMMC d6                    6 fast rx  up  1 mmc 1 d6         mmc@481d8000 (pinmux_emmc_pins)
P8.04 / eMMC d7                    7 fast rx  up  1 mmc 1 d7         mmc@481d8000 (pinmux_emmc_pins)
P8.05 / eMMC d2                    2 fast rx  up  1 mmc 1 d2         mmc@481d8000 (pinmux_emmc_pins)
P8.06 / eMMC d3                    3 fast rx  up  1 mmc 1 d3         mmc@481d8000 (pinmux_emmc_pins)
P8.07                             36 fast rx  up  7 gpio 2.02 << hi  P8_07 (pinmux_P8_07_default_pin)
P8.08                             37 fast rx  up  7 gpio 2.03 << hi  P8_08 (pinmux_P8_08_default_pin)
P8.09                             39 fast rx  up  7 gpio 2.05 << hi  P8_09 (pinmux_P8_09_default_pin)
P8.10                             38 fast rx  up  7 gpio 2.04 << hi  P8_10 (pinmux_P8_10_default_pin)
P8.11                             13 fast rx down 7 gpio 1.13 << lo  P8_11 (pinmux_P8_11_default_pin)
P8.12                             12 fast rx down 7 gpio 1.12 << lo  P8_12 (pinmux_P8_12_default_pin)
P8.13                              9 fast rx down 7 gpio 0.23 << lo  P8_13 (pinmux_P8_13_default_pin)
P8.14                             10 fast rx down 7 gpio 0.26 lo >>  P8_14 (pinmux_P8_14_default_pin)
P8.15                             15 fast rx down 7 gpio 1.15 << lo  P8_15 (pinmux_P8_15_default_pin)
P8.16                             14 fast rx down 7 gpio 1.14 << lo  P8_16 (pinmux_P8_16_default_pin)
P8.17                             11 fast rx down 7 gpio 0.27 << lo  P8_17 (pinmux_P8_17_default_pin)
P8.18                             35 fast rx down 7 gpio 2.01 << lo  P8_18 (pinmux_P8_18_default_pin)
P8.19                              8 fast rx down 7 gpio 0.22 << lo  P8_19 (pinmux_P8_19_default_pin)
P8.20 / eMMC cmd                  33 fast rx  up  2 mmc 1 cmd        mmc@481d8000 (pinmux_emmc_pins)
P8.21 / eMMC clk                  32 fast rx  up  2 mmc 1 clk        mmc@481d8000 (pinmux_emmc_pins)
P8.22 / eMMC d5                    5 fast rx  up  1 mmc 1 d5         mmc@481d8000 (pinmux_emmc_pins)
P8.23 / eMMC d4                    4 fast rx  up  1 mmc 1 d4         mmc@481d8000 (pinmux_emmc_pins)
P8.24 / eMMC d1                    1 fast rx  up  1 mmc 1 d1         mmc@481d8000 (pinmux_emmc_pins)
P8.25 / eMMC d0                    0 fast rx  up  1 mmc 1 d0         mmc@481d8000 (pinmux_emmc_pins)
P8.26                             31 fast rx  up  7 gpio 1.29 << hi  P8_26 (pinmux_P8_26_default_pin)
P8.27 / hdmi                      56 fast    down 0 lcd vsync        0-0070 (nxp_hdmi_bonelt_pins)
P8.28 / hdmi                      58 fast    down 0 lcd pclk         0-0070 (nxp_hdmi_bonelt_pins)
P8.29 / hdmi                      57 fast    down 0 lcd hsync        0-0070 (nxp_hdmi_bonelt_pins)
P8.30 / hdmi                      59 fast    down 0 lcd oe/acb       0-0070 (nxp_hdmi_bonelt_pins)
P8.31 / hdmi / sysboot 14         54 fast         0 lcd d14          0-0070 (nxp_hdmi_bonelt_pins)
P8.32 / hdmi / sysboot 15         55 fast         0 lcd d15          0-0070 (nxp_hdmi_bonelt_pins)
P8.33 / hdmi / sysboot 13         53 fast         0 lcd d13          0-0070 (nxp_hdmi_bonelt_pins)
P8.34 / hdmi / sysboot 11         51 fast         0 lcd d11          0-0070 (nxp_hdmi_bonelt_pins)
P8.35 / hdmi / sysboot 12         52 fast         0 lcd d12          0-0070 (nxp_hdmi_bonelt_pins)
P8.36 / hdmi / sysboot 10         50 fast         0 lcd d10          0-0070 (nxp_hdmi_bonelt_pins)
P8.37 / hdmi / sysboot 8          48 fast         0 lcd d8           0-0070 (nxp_hdmi_bonelt_pins)
P8.38 / hdmi / sysboot 9          49 fast         0 lcd d9           0-0070 (nxp_hdmi_bonelt_pins)
P8.39 / hdmi / sysboot 6          46 fast         0 lcd d6           0-0070 (nxp_hdmi_bonelt_pins)
P8.40 / hdmi / sysboot 7          47 fast         0 lcd d7           0-0070 (nxp_hdmi_bonelt_pins)
P8.41 / hdmi / sysboot 4          44 fast         0 lcd d4           0-0070 (nxp_hdmi_bonelt_pins)
P8.42 / hdmi / sysboot 5          45 fast         0 lcd d5           0-0070 (nxp_hdmi_bonelt_pins)
P8.43 / hdmi / sysboot 2          42 fast         0 lcd d2           0-0070 (nxp_hdmi_bonelt_pins)
P8.44 / hdmi / sysboot 3          43 fast         0 lcd d3           0-0070 (nxp_hdmi_bonelt_pins)
P8.45 / hdmi / sysboot 0          40 fast         0 lcd d0           0-0070 (nxp_hdmi_bonelt_pins)
P8.46 / hdmi / sysboot 1          41 fast         0 lcd d1           0-0070 (nxp_hdmi_bonelt_pins)
P9.11                             28 fast rx  up  7 gpio 0.30 << hi  P9_11 (pinmux_P9_11_default_pin)
P9.12                             30 fast rx  up  7 gpio 1.28 << hi  P9_12 (pinmux_P9_12_default_pin)
P9.13                             29 fast rx  up  7 gpio 0.31 << hi  P9_13 (pinmux_P9_13_default_pin)
P9.14                             18 fast rx      7 gpio 1.18 << lo  P9_14 (pinmux_P9_14_gpio_pin)
P9.15                             16 fast rx down 7 gpio 1.16 << hi  P9_15 (pinmux_P9_15_default_pin)
P9.15                             34 fast rx  up  7 gpio 2.00       
P9.16                             19 fast rx down 7 gpio 1.19 << lo  P9_16 (pinmux_P9_16_default_pin)
P9.17 / spi boot cs               87 fast rx  up  7 gpio 0.05 << hi  P9_17 (pinmux_P9_17_default_pin)
P9.18 / spi boot out              86 fast rx  up  7 gpio 0.04 << hi  P9_18 (pinmux_P9_18_default_pin)
P9.19 / cape i²c scl              95 fast rx  up  3 i²c 2 scl        ocp/P9_19_pinmux (pinmux_P9_19_default_pin)
P9.20 / cape i²c sda              94 fast rx  up  3 i²c 2 sda        ocp/P9_20_pinmux (pinmux_P9_20_default_pin)
P9.21 / spi boot in               85 fast rx  up  7 gpio 0.03 << hi  P9_21 (pinmux_P9_21_default_pin)
P9.22 / spi boot clk              84 fast rx  up  7 gpio 0.02 << hi  P9_22 (pinmux_P9_22_default_pin)
P9.23                             17 fast rx down 7 gpio 1.17 << lo  P9_23 (pinmux_P9_23_default_pin)
P9.24                             97 fast rx  up  7 gpio 0.15 << hi  P9_24 (pinmux_P9_24_default_pin)
P9.25 / audio osc                107 fast rx  up  0 asp 0 tx hclk    mcasp@48038000 (mcasp0_pins)
P9.26                             96 fast rx  up  7 gpio 0.14 << hi  P9_26 (pinmux_P9_26_default_pin)
P9.27                            105 fast rx      7 gpio 3.19 << lo  P9_27 (pinmux_P9_27_gpio_pin)
P9.28 / hdmi audio data          103 fast    down 2 asp 0 data 2     mcasp@48038000 (mcasp0_pins)
P9.29 / hdmi audio fs            101 fast     up  0 asp 0 tx fs      mcasp@48038000 (mcasp0_pins)
P9.30                            102 fast rx down 7 gpio 3.16 << lo  P9_30 (pinmux_P9_30_default_pin)
P9.31 / hdmi audio clk           100 fast    down 0 asp 0 tx clk     mcasp@48038000 (mcasp0_pins)
P9.41                            106 fast rx down 7 gpio 3.20 << lo  P9_91 (pinmux_P9_91_default_pin)
P9.41 / jtag emu3                109 fast rx down 7 gpio 0.20 << lo  P9_41 (pinmux_P9_41_default_pin)
P9.42                             89 fast rx down 7 gpio 0.07 << lo  P9_42 (pinmux_P9_42_default_pin)
P9.42                            104 fast rx down 7 gpio 3.18 << lo  P9_92 (pinmux_P9_92_default_pin)

Have a look here

https://docs.beagleboard.org/latest/boards/beaglebone/black/ch07.html

It lists the Pin headers and all the possible modes that each pin can be set to.
Might be a good idea to print it out and go over it with a highlighter.

I think you can probably get close to what you need, although not sure if all GPIO’s are interrupt capable.

If you need lots of I/O have a look at the various I2C gpio expander chips.

thanks, I’ve seen that page.

I’m really struggling with this board, after using raspberry’s for years with no problem…

I guess the pins are set up for something else?

In any event, I am looking more deeply into it.

Do you know if it is possible to add apt repositories and install other software? maybe I should make a new post?

The board runs Debian, so anything you can do on Debian you can do on the BBB.

Don’t try installing something designed for the Pi hardware though as the chips are different.

I think most of the pins default to GPIO assuming you have no extra overlays loaded, but I would need to check the devicetree files to make sure.