Table of Contents |
---|
Description
...
[HB GPIO] GPIO, or General-Purpose Input/Output is a mechanism that allows a computing board to provide electrical contacts for signalling to a wide range of external devices. These pins allow commerical and hobbyist projects to do things like communicate with a “breakout board”, or individual physical modules – like a motor.
...
GPIO Header Pinout
Header Pin | Signal | Pad Name (Default) | GPIO Name | Linux GPIO Number (*) |
---|---|---|---|---|
J2 [pin 1] | 3.3V | - | - | - |
J2 [pin 2] | 5V | - | - | - |
J2 [pin 3] | I2C_SDA | #EIM_D18 | GPIO3_IO18 | 82 |
J2 [pin 4] | 5V | - | - | - |
J2 [pin 5] | I2C_SCL# | EIM_D17 | GPIO3_IO17 | 81 |
J2 [pin 6] | GND | - | - | - |
J2 [pin 7] | GPIO 1 | GPIO_1 | GPIO1_IO01 | 1 |
J2 [pin 8] | UART TX | - | - | #- |
J2 [pin 9] | GND | - | - | - |
J2 [pin 10] | UART RX# | - | - | - |
J2 [pin 11] | GPIO 73 | EIM_DA9 | GPIO3_IO09 | 73 |
J2 [pin 12] | GPIO 72 | EIM_DA8 | GPIO3_IO08 | 72 |
J2 [pin 13] | GPIO 71 | EIM_DA7 | GPIO3_IO07 | 71 |
J2 [pin 14] | GND | - | - | - |
J2 [pin 15] | GPIO 101070 | EIM_DA6 | GPIO3_IO06 | 70 |
J2 [pin 16] | GPIO 194 | SD3_CMD | GPIO7_IO02 | 194 |
J2 [pin 17] | 3.3V | - | - | - |
J2 [pin 18] | GPIO 195 | SD3_CLK | GPIO7_IO03 | 195 |
J2 [pin 19] | SPI_MOSI# | EIM_CS1 | GPIO2_IO24 | 56 |
J2 [pin 20] | GND | - | - | - |
J2 [pin 21] | SPI_MISO | #EIM_OE | GPIO2_IO25 | 57 |
J2 [pin 22] | GPIO 67 | EIM_DA3 | GPIO3_IO03 | 67 |
J2 [pin 23] | SPI_SCLK# | EIM_CS0 | GPIO2_IO23 | 55 |
J2 [pin 24] | ECSPI2_SS0 | #EIM_RW | GPIO2_IO26 | 58 |
J2 [pin 25] | GND | - | - | - |
J2 [pin 26] | ECSPI2_SS1 | #EIM_LBA | GPIO2_IO27 | 59 |
Pins 16 and 18 are actually SD3_CMD and SD3_CLK signals that can be muxed to support flex can TX/RX interface (i.e. those can be connected to an external CAN).
(*) SPI and I2C & UART can also be muxed to be GPIO
Serial UART port access
...
The UART port for debug can be accessed on the 26 pin header as follows –
Pin 6/9/14/20/25 GND
Pin 1 3.3V
Pin 8 buffered i.MX6 UART TX – pulled up to 3.3v
Pin 10 buffered i.MX6 UART RX – pulled up to 3.3v
Notice that the pin number starts as pin #1 on the edge of the board, towards the micro-USB connector; then number #2 is the one towards the corner of the board.
Accessing GPIO from Linux user space
General
Please have a look at WiringX, which also supports the Hummingboard:
Manual
The external GPIOs are available under the /sys/class/gpio folder in Linux.
To control on the GPIO pins you need to calculate the GPIO number XX (*) and run the commands below:
Get the current list of reserved GPIO
Code Block |
---|
> mount -t debugfs none /sys/kernel/debug > cat /sys/kernel/debug/gpio |
...
You can take the GPIO Number from the above table (*)
Serial UART port access
...
The UART port for debug can be accessed on the 26 pin header as follows –
...
External Links and References
IMX6 Software Development/Drivers
IMX6 Som Documents
wiringHB