Skip to content

BBB Pin Assignments

Ahmed Samara edited this page Dec 29, 2015 · 1 revision

Pin Assignments Explanation

Connected Device

Description of the robot system connected to this pin.

Physical Location

Physical address of the pin on the BBB. The physical address schema has two components. The first, given by P8/P9, tells which of the two large banks on the bone the pin is located on. The second tells where on the bank the pin is located. One side of each bank is even and the other side is odd. The small numbers start in the end of the bone closest to the 5V barrel jack.

This shows P8, at the high-numbered end. P8 bank on high end

Mux Mode

The mux modes determine what each physical pin is actually configured to do. So, for example, most pins that are put into mode 7 act as GPIOs. Putting the same pin into mode 6 may reconfigure it to act as a PWM pin, for example.

Kernel Number

These are the pin numbers as they are presented by the kernel to user space programs (like our code, more info). If you're writing code to interface with the hardware, this is likely the number you're looking for. You can interact with GPIO pins by writing values to the files in /sys/class/gpio. Same for PWM pins, using the files in /sys/class/pwm.

To find the kernel number: Look at the pinout of the beaglebone, located on page 71 and 73 of the BeagleBone Black manual. (note, these numbers may change as they revise it, but it'll be in there).

You'll find the micro-controller number, which will be in the format gpio0[6], which denote the number of the GPIO controller, and the number of the GPIO on that controller.

To get the kernel number: multiply 32 by the first number and add the second number. ie: gpio0[6] = 320 + 6 = 6
gpio1[5] = 32
1 + 5 = 37

PWM number

0A = 1
0B = 2
1A = 3
1B = 4
2A = 5
2B = 6

Microcontroller Number

TODO

Assigning pins

From the root directory of the project there is a script setup_all.sh
bot2014/bot/setup/fs-common/root/startup/setup_all.sh which handles exporting gpios and pwm's to the codebase. Simply find the kernel/pwm number, and type in load_gpio ## or load_pwm ##. Be sure to add relevant comments to make what you're exporting explicit.

Pin Assignments

Pinout

Connected Device Physical Location Mux Mode Kernel# µController# Notes
I2C-2_SCL(3) P9_19
I2C-2_SDA P9_20
color_sensor LED P8_19
--------------------- ------------------- address ---------- ---------------- ------
LIDAR P9_26 0 /dev/ttyO1 ---------------- UART1-RX
ready-signal P8_4 gpio39
--------------------- ------------------- ------------ ---------- ---------------- ------
arm[1] P9_22 3 ehrPWM0A 1
arm[2] P9_14 6 ehrPWM1A_mux1 2
arm[3] P9_16 6 ehrPWM1B_mux1 3
arm[4] P9_21 3 ehrPWM0B 4
arm[5] P8_19 4 ehrPWM2A 5
arm[6] P8_13 4 ehrPWM2B 6
--------------------- ------------------- ------------ ---------- ---------------- ------

---------------------|-------------------|------------|----------|----------------|------