Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock5/hardware/5b/gpio"

< Rock5‎ | hardware‎ | 5b
(General purpose input-output (GPIO) connector)
 
(10 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
__NOTOC__
 
__NOTOC__
  
     [[rock5 | ROCK 5]] > [[rock5/hardware | Hardware]] > [[rock5/hardware/5b | ROCK 5 Model B Main Board]] > [[rock5/hardware/5b/gpio | GPIO]]
+
     [[rock5 | ROCK 5]] > [[rock5/hardware | Hardware]] > [[rock5/hardware/5b | ROCK 5B hardware details]] > [[rock5/hardware/5b/gpio | GPIO]]
  
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
Line 13: Line 13:
 
|- style="font-weight:bold; text-align:center;"
 
|- style="font-weight:bold; text-align:center;"
 
! style="vertical-align:middle;" | GPIO number
 
! style="vertical-align:middle;" | GPIO number
! style="text-align:left;" | Function7
+
! style="text-align:left;" | Function8
! style="text-align:left;" | Function6
+
! style="vertical-align:middle; text-align:left;" | Function7
! style="text-align:left;" | Function5
+
! style="vertical-align:middle; text-align:left;" | Function6
 +
! style="vertical-align:middle; text-align:left;" | Function5
 
! style="vertical-align:middle;" | Function4
 
! style="vertical-align:middle;" | Function4
 
! style="vertical-align:middle;" | Function3
 
! style="vertical-align:middle;" | Function3
Line 27: Line 28:
 
! style="vertical-align:middle;" | Function3
 
! style="vertical-align:middle;" | Function3
 
! style="vertical-align:middle;" | Function4
 
! style="vertical-align:middle;" | Function4
! style="text-align:left;" | Function5
+
! style="vertical-align:middle; text-align:left;" | Function5
! style="text-align:left;" | Function6
+
! style="vertical-align:middle; text-align:left;" | Function6
! style="text-align:left;" | Function7
+
! style="vertical-align:middle; text-align:left;" | Function7
 +
! style="text-align:left;" | Function8
 
! style="vertical-align:middle;" | GPIO number
 
! style="vertical-align:middle;" | GPIO number
 
|-
 
|-
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
Line 47: Line 50:
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
| style="vertical-align:middle;" |  
+
| style="vertical-align:middle;" | 139
 
|  
 
|  
| I2S1_SDO2_M0
+
| style="vertical-align:middle;" |
| I2C7_SDA_M3
+
| style="vertical-align:middle;" | I2S1_SDO2_M0
| style="vertical-align:middle;" | UART8_CTSN_M0
+
| style="vertical-align:middle;" | I2C7_SDA_M3
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | PWM15_IR_M1
 
| style="vertical-align:middle;" | PWM15_IR_M1
 
| style="vertical-align:middle;" | CAN1_TX_M1
 
| style="vertical-align:middle;" | CAN1_TX_M1
Line 67: Line 72:
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
 +
| style="vertical-align:middle;" | 138
 +
|
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| I2S1_SDO1_M0
+
| style="vertical-align:middle;" | I2S1_SDO1_M0
| I2C7_SCL_M3
+
| style="vertical-align:middle;" | I2C7_SCL_M3
| UART8_RTSN_M0
+
| style="vertical-align:middle;" |
| style="vertical-align:middle;" | SPI0_CS0_M1
+
 
| style="vertical-align:middle;" | PWM14_M1
 
| style="vertical-align:middle;" | PWM14_M1
 
| style="vertical-align:middle;" | CAN1_RX_M1
 
| style="vertical-align:middle;" | CAN1_RX_M1
Line 82: Line 89:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 5
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 5
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle; color:#FFF;" | 6
+
| style="vertical-align:middle; background-color:#000000; color:#f9f9f9;" | 6
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
 +
| style="vertical-align:middle;" | 115
 +
|
 +
| style="vertical-align:middle;" | SPI1_CS1_M1
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
| SPI1_CS1_M1
 
 
| style="vertical-align:middle;" | I2C8_SDA_M4
 
| style="vertical-align:middle;" | I2C8_SDA_M4
 
| style="vertical-align:middle;" | UART7_CTSN_M1
 
| style="vertical-align:middle;" | UART7_CTSN_M1
 
| style="vertical-align:middle;" | PWM15_IR_M0
 
| style="vertical-align:middle;" | PWM15_IR_M0
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO3_C3
 
| style="vertical-align:middle;" | GPIO3_C3
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 7
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 7
Line 104: Line 113:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 8
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 8
 
| style="vertical-align:middle;" | GPIO0_B5
 
| style="vertical-align:middle;" | GPIO0_B5
| style="vertical-align:middle; background-color:#FFA500;" | UART2_TX_M0
+
| style="vertical-align:middle; background-color:#f9f9f9;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle; background-color:#ff8d02;" | UART2_TX_M0
 +
| style="vertical-align:middle;" | I2C1_SCL_M0
 
| style="vertical-align:middle;" | I2S1_MCLK_M1
 
| style="vertical-align:middle;" | I2S1_MCLK_M1
| style="vertical-align:middle;" | I2C1_SCL_M0
+
| style="vertical-align:middle;" |  
 
|  
 
|  
|
+
| style="vertical-align:middle;" | 13
|
+
| style="vertical-align:middle;" |  
+
 
|-
 
|-
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
| style="vertical-align:middle; color:#FFF;" | 9
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 9
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 10
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 10
 
| style="vertical-align:middle;" | GPIO0_B6
 
| style="vertical-align:middle;" | GPIO0_B6
| style="vertical-align:middle; background-color:#FFA500;" | UART2_RX_M0
+
| style="vertical-align:middle; background-color:#f9f9f9;" |  
| style="vertical-align:middle;" | I2S1_SCLK_M1
+
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle; background-color:#ff8d02;" | UART2_RX_M0
 
| style="vertical-align:middle;" | I2C1_SDA_M0
 
| style="vertical-align:middle;" | I2C1_SDA_M0
 +
| style="vertical-align:middle;" | I2S1_SCLK_M1
 +
| style="vertical-align:middle;" |
 
|  
 
|  
 +
| style="vertical-align:middle;" | 14
 +
|-
 +
| style="vertical-align:middle;" | 113
 
|  
 
|  
|  
+
| style="vertical-align:middle;" | SPI1_CLK_M1
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | SPI1_CLK_M1
 
 
| style="vertical-align:middle;" | UART7_RX_M1
 
| style="vertical-align:middle;" | UART7_RX_M1
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO3_C1
 
| style="vertical-align:middle;" | GPIO3_C1
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 11
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 11
Line 144: Line 157:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 12
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 12
 
| style="vertical-align:middle;" | GPIO3_B5
 
| style="vertical-align:middle;" | GPIO3_B5
| style="vertical-align:middle;" | PWM12_M0
 
 
| style="vertical-align:middle;" | CAN1_RX_M0
 
| style="vertical-align:middle;" | CAN1_RX_M0
 +
| style="vertical-align:middle;" | PWM12_M0
 
| style="vertical-align:middle;" | UART3_TX_M1
 
| style="vertical-align:middle;" | UART3_TX_M1
| I2S2_SCLK_M1
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
+
| style="vertical-align:middle;" | I2S2_SCLK_M1
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
 +
| style="vertical-align:middle;" | 109
 +
|-
 +
| style="vertical-align:middle;" | 111
 
|  
 
|  
|
 
| style="vertical-align:middle;" |
 
 
| style="vertical-align:middle;" | SPI1_MOSI_M1
 
| style="vertical-align:middle;" | SPI1_MOSI_M1
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | I2C3_SCL_M1
 
| style="vertical-align:middle;" | I2C3_SCL_M1
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO3_B7
 
| style="vertical-align:middle;" | GPIO3_B7
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 13
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 13
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle; color:#FFF;" | 14
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 14
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
| style="vertical-align:middle;" |  
+
| style="vertical-align:middle;" | 112
|
+
|
+
 
|  
 
|  
 
| style="vertical-align:middle;" | SPI1_MISO_M1
 
| style="vertical-align:middle;" | SPI1_MISO_M1
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | I2C3_SDA_M1
 
| style="vertical-align:middle;" | I2C3_SDA_M1
 
| style="vertical-align:middle;" | UART7_TX_M1
 
| style="vertical-align:middle;" | UART7_TX_M1
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO3_C0
 
| style="vertical-align:middle;" | GPIO3_C0
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 15
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 15
Line 184: Line 201:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 16
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 16
 
| style="vertical-align:middle;" | GPIO3_A4
 
| style="vertical-align:middle;" | GPIO3_A4
| style="vertical-align:middle;" | SPI4_CS1_M1
 
| style="vertical-align:middle;" | UART8_RTSN_M1
 
| style="vertical-align:middle;" | I2S3_SDI
 
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|  
+
| style="vertical-align:middle;" | 100
 +
|-
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
Line 204: Line 223:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 18
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 18
 
| style="vertical-align:middle;" | GPIO4_C4
 
| style="vertical-align:middle;" | GPIO4_C4
| style="vertical-align:middle;" | I2C7_SDA_M1
+
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | UART9_RTSN_M0
+
| style="vertical-align:middle;" | PWM5_M2
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | SPI3_MISO_M0
 
| style="vertical-align:middle;" | SPI3_MISO_M0
| PWM5_M2
 
 
|  
 
|  
 +
| style="vertical-align:middle;" | 148
 +
|-
 +
| style="vertical-align:middle;" | 42
 
|  
 
|  
 +
| style="vertical-align:middle;" | SPI0_MOSI_M2
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" | UART4_RX_M2
 
| style="vertical-align:middle;" | UART4_RX_M2
| style="vertical-align:middle;" | PDM1_SDI3_M1
+
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | SPI0_MOSI_M2
+
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | GPIO1_B2
 
| style="vertical-align:middle;" | GPIO1_B2
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 19
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 19
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle; color:#FFF;" | 20
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 20
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | PDM1_SDI2_M1
+
|-
 +
| style="vertical-align:middle;" | 41
 +
|
 
| style="vertical-align:middle;" | SPI0_MISO_M2
 
| style="vertical-align:middle;" | SPI0_MISO_M2
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO1_B1
 
| style="vertical-align:middle;" | GPIO1_B1
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 21
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 21
Line 247: Line 270:
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
| style="vertical-align:middle;" |  
+
| style="vertical-align:middle;" | 43
 
|  
 
|  
|
 
|
 
| style="vertical-align:middle;" | UART4_TX_M2
 
| style="vertical-align:middle;" | PDM1_CLK1_M1
 
 
| style="vertical-align:middle;" | SPI0_CLK_M2
 
| style="vertical-align:middle;" | SPI0_CLK_M2
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | UART4_TX_M2
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO1_B3
 
| style="vertical-align:middle;" | GPIO1_B3
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 23
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 23
Line 264: Line 289:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 24
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 24
 
| style="vertical-align:middle;" | GPIO1_B4
 
| style="vertical-align:middle;" | GPIO1_B4
| style="vertical-align:middle;" | SPI0_CS0_M2
+
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | PDM1_CLK0_M1
+
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | UART7_RX_M2
 
| style="vertical-align:middle;" | UART7_RX_M2
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | SPI0_CS0_M2
 +
|
 +
| style="vertical-align:middle;" | 44
 
|-
 
|-
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
 
|  
 
|  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
| style="vertical-align:middle; color:#FFF;" | 25
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 25
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 26
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 26
 
| style="vertical-align:middle;" | GPIO1_B5
 
| style="vertical-align:middle;" | GPIO1_B5
| style="vertical-align:middle;" | SPI0_CS1_M2
+
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | UART7_TX_M2
 
| style="vertical-align:middle;" | UART7_TX_M2
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle;" | SPI0_CS1_M2
 +
|
 +
| style="vertical-align:middle;" | 45
 
|-
 
|-
| style="vertical-align:middle;" |  
+
| style="vertical-align:middle;" | 150
 
|  
 
|  
|
 
| PWM7_IR_M3
 
 
| style="vertical-align:middle;" | SPI3_CLK_M0
 
| style="vertical-align:middle;" | SPI3_CLK_M0
| style="vertical-align:middle;" | UART7_CTSN_M0
+
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | I2C0_SDA_M1
 
| style="vertical-align:middle;" | I2C0_SDA_M1
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | PWM7_IR_M3
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO4_C6
 
| style="vertical-align:middle;" | GPIO4_C6
 
| style="vertical-align:middle; background-color:#00F; color:#FFF;" | 27
 
| style="vertical-align:middle; background-color:#00F; color:#FFF;" | 27
Line 304: Line 333:
 
| style="vertical-align:middle; background-color:#00F; color:#FFF;" | 28
 
| style="vertical-align:middle; background-color:#00F; color:#FFF;" | 28
 
| style="vertical-align:middle;" | GPIO4_C5
 
| style="vertical-align:middle;" | GPIO4_C5
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | PWM6_M2
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | I2C0_SCL_M1
 
| style="vertical-align:middle;" | I2C0_SCL_M1
| style="vertical-align:middle;" | UART9_CTSN_M0
+
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | SPI3_MOSI_M0
 
| style="vertical-align:middle;" | SPI3_MOSI_M0
| PWM6_M2
 
 
|  
 
|  
 +
| style="vertical-align:middle;" | 149
 +
|-
 +
| style="vertical-align:middle;" | 63
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|
+
|  
+
 
| style="vertical-align:middle;" | UART1_CTSN_M1
 
| style="vertical-align:middle;" | UART1_CTSN_M1
| style="vertical-align:middle;" | I2C8_SDA_M2
 
 
| style="vertical-align:middle;" | PWM15_IR_M3
 
| style="vertical-align:middle;" | PWM15_IR_M3
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO1_D7
 
| style="vertical-align:middle;" | GPIO1_D7
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 29
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 29
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle; color:#FFF;" | 30
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 30
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
+
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|  
+
| style="vertical-align:middle;" |  
| UART1_RX_M1
+
|-
| I2C5_SDA_M3
+
| style="vertical-align:middle;" | 47
 
| SPDIF_TX_M0
 
| SPDIF_TX_M0
| PWM13_M2
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | UART1_RX_M1
 +
| style="vertical-align:middle;" | PWM13_M2
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO1_B7
 
| style="vertical-align:middle;" | GPIO1_B7
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 31
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 31
Line 344: Line 377:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 32
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 32
 
| style="vertical-align:middle;" | GPIO3_C2
 
| style="vertical-align:middle;" | GPIO3_C2
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | PWM14_M0
 
| style="vertical-align:middle;" | PWM14_M0
 
| style="vertical-align:middle;" | UART7_RTSN_M1
 
| style="vertical-align:middle;" | UART7_RTSN_M1
 
| style="vertical-align:middle;" | I2C8_SCL_M4
 
| style="vertical-align:middle;" | I2C8_SCL_M4
| SPI1_CS0_M1
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" | SPI1_CS0_M1
 
|  
 
|  
 +
| style="vertical-align:middle;" | 114
 +
|-
 +
| style="vertical-align:middle;" | 103
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | PWM8_M0
 
| style="vertical-align:middle;" | PWM8_M0
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | GPIO3_A7
 
| style="vertical-align:middle;" | GPIO3_A7
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 33
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 33
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle; color:#FFF;" | 34
+
| style="vertical-align:middle; background-color:#000000; color:#FFF;" | 34
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |  
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|-
 
|-
 +
| style="vertical-align:middle;" | 110
 +
|
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|  
+
| style="vertical-align:middle;" | I2S2_LRCK_M1
|  
+
| style="vertical-align:middle;" |
| I2S2_LRCK_M1
+
| style="vertical-align:middle;" | UART3_RX_M1
| UART3_RX_M1
+
| style="vertical-align:middle;" | PWM13_M0
| CAN1_TX_M0
+
| style="vertical-align:middle;" | CAN1_TX_M0
| PWM13_M0
+
 
| style="vertical-align:middle;" | GPIO3_B6
 
| style="vertical-align:middle;" | GPIO3_B6
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 35
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 35
Line 384: Line 421:
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 36
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 36
 
| style="vertical-align:middle;" | GPIO3_B1
 
| style="vertical-align:middle;" | GPIO3_B1
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | PWM2_M1
 
| style="vertical-align:middle;" | PWM2_M1
 
| style="vertical-align:middle;" | UART2_TX_M2
 
| style="vertical-align:middle;" | UART2_TX_M2
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
|
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|-
 
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|  
+
| style="vertical-align:middle;" | 105
 +
|-
 +
| style="vertical-align:middle;" |
 
|  
 
|  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | REFCLK_OUT
+
| style="vertical-align:middle;" |  
| style="vertical-align:middle;" | GPIO0_A0
+
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 37
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 37
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 38
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 38
 
| style="vertical-align:middle;" | GPIO3_B2
 
| style="vertical-align:middle;" | GPIO3_B2
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | PWM3_IR_M1
 
| style="vertical-align:middle;" | PWM3_IR_M1
 
| style="vertical-align:middle;" | UART2_RX_M2
 
| style="vertical-align:middle;" | UART2_RX_M2
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | I2S2_SDI_M1
 
| style="vertical-align:middle;" | I2S2_SDI_M1
 +
| style="vertical-align:middle;" |
 
|  
 
|  
|
+
| style="vertical-align:middle;" | 106
|
+
| style="vertical-align:middle;" |  
+
 
|-
 
|-
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
|
 
|
 
 
|  
 
|  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" | GND
 
| style="vertical-align:middle;" | GND
| style="vertical-align:middle; color:#FFF;" | 39
+
| style="vertical-align:middle; background-color:#333333; color:#FFF;" | 39
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 40
 
| style="vertical-align:middle; background-color:#008000; color:#FFF;" | 40
 
| style="vertical-align:middle;" | GPIO3_B3
 
| style="vertical-align:middle;" | GPIO3_B3
| style="vertical-align:middle;" | UART2_RTSN
+
| style="vertical-align:middle;" |  
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 +
| style="vertical-align:middle;" |
 
| style="vertical-align:middle;" | I2S2_SDO_M1
 
| style="vertical-align:middle;" | I2S2_SDO_M1
 
| style="vertical-align:middle;" |  
 
| style="vertical-align:middle;" |  
 
|  
 
|  
|
+
| style="vertical-align:middle;" | 107
|
+
| style="vertical-align:middle;" |  
+
 
|}
 
|}
  
 
=== IO Voltage ===
 
=== IO Voltage ===
  
 
+
{| class="wikitable" style="vertical-align:middle;"
 +
|- style="font-weight:bold;"
 +
! GPIO
 +
! Voltage Level
 +
! Tolerance
 +
|-
 +
| All GPIO
 +
| 3.3V
 +
| 3.63V
 +
|-
 +
| SARADC_IN4
 +
| 1.8V
 +
| 1.98V
 +
|}
  
 
=== GPIO number ===
 
=== GPIO number ===
  
Rockchip RK3588 GPIO has 5 banks, GPIO0 to GPIO4, each bank has 32pins, naming as below:
+
Rockchip RK3588 GPIO has 5 banks, GPIO0 to GPIO4, each bank has 32 pins, naming as below:
  
 
  GPIO0_A0 ~ A7  
 
  GPIO0_A0 ~ A7  
Line 449: Line 504:
 
  ....
 
  ....
 
  GPIO1_D0 ~ D7
 
  GPIO1_D0 ~ D7
 +
 +
GPIO2_A0 ~ A7
 +
....
 +
GPIO2_D0 ~ D7
 +
 +
GPIO3_A0 ~ A7
 +
....
 +
GPIO3_D0 ~ D7
 +
 +
GPIO4_A0 ~ A7
 +
....
 +
GPIO4_D0 ~ D7
 +
 +
 +
For Rockchip 5.10 kernel, the GPIO number can be calculated as below, take GPIO4_D5 as an example:
 +
 +
GPIO4_D5 = 32*4 + 8*3 + 5 = 157
 +
(A=0, B=1, C=2, D=3)
 +
 +
[[File:Gpio_number.png]]
 +
 +
To set GPIO4_D5 output
 +
 +
# cd /sys/class/gpio
 +
# echo 157 > export
 +
# cd gpio157
 +
# echo out > direction
 +
# echo 1 > value    # output high
 +
# echo 0 > value    # output low

Latest revision as of 10:47, 8 February 2023


    ROCK 5 >  Hardware >  ROCK 5B hardware details >  GPIO

General purpose input-output (GPIO) connector

ROCK 5B has one 40-pin expansion header. Each pin is distinguished by color.

GPIO number Function8 Function7 Function6 Function5 Function4 Function3 Function2 Function1 Pin# Pin# Function1 Function2 Function3 Function4 Function5 Function6 Function7 Function8 GPIO number
+3.3V 1 2 +5.0V
139 I2S1_SDO2_M0 I2C7_SDA_M3 PWM15_IR_M1 CAN1_TX_M1 GPIO4_B3 3 4 +5.0V
138 I2S1_SDO1_M0 I2C7_SCL_M3 PWM14_M1 CAN1_RX_M1 GPIO4_B2 5 6 GND
115 SPI1_CS1_M1 I2C8_SDA_M4 UART7_CTSN_M1 PWM15_IR_M0 GPIO3_C3 7 8 GPIO0_B5 UART2_TX_M0 I2C1_SCL_M0 I2S1_MCLK_M1 13
GND 9 10 GPIO0_B6 UART2_RX_M0 I2C1_SDA_M0 I2S1_SCLK_M1 14
113 SPI1_CLK_M1 UART7_RX_M1 GPIO3_C1 11 12 GPIO3_B5 CAN1_RX_M0 PWM12_M0 UART3_TX_M1 I2S2_SCLK_M1 109
111 SPI1_MOSI_M1 I2C3_SCL_M1 GPIO3_B7 13 14 GND
112 SPI1_MISO_M1 I2C3_SDA_M1 UART7_TX_M1 GPIO3_C0 15 16 GPIO3_A4 100
+3.3V 17 18 GPIO4_C4 PWM5_M2 SPI3_MISO_M0 148
42 SPI0_MOSI_M2 UART4_RX_M2 GPIO1_B2 19 20 GND
41 SPI0_MISO_M2 GPIO1_B1 21 22 SARADC_IN4
43 SPI0_CLK_M2 UART4_TX_M2 GPIO1_B3 23 24 GPIO1_B4 UART7_RX_M2 SPI0_CS0_M2 44
GND 25 26 GPIO1_B5 UART7_TX_M2 SPI0_CS1_M2 45
150 SPI3_CLK_M0 I2C0_SDA_M1 PWM7_IR_M3 GPIO4_C6 27 28 GPIO4_C5 PWM6_M2 I2C0_SCL_M1 SPI3_MOSI_M0 149
63 UART1_CTSN_M1 PWM15_IR_M3 GPIO1_D7 29 30 GND
47 SPDIF_TX_M0 UART1_RX_M1 PWM13_M2 GPIO1_B7 31 32 GPIO3_C2 PWM14_M0 UART7_RTSN_M1 I2C8_SCL_M4 SPI1_CS0_M1 114
103 PWM8_M0 GPIO3_A7 33 34 GND
110 I2S2_LRCK_M1 UART3_RX_M1 PWM13_M0 CAN1_TX_M0 GPIO3_B6 35 36 GPIO3_B1 PWM2_M1 UART2_TX_M2 105
37 38 GPIO3_B2 PWM3_IR_M1 UART2_RX_M2 I2S2_SDI_M1 106
GND 39 40 GPIO3_B3 I2S2_SDO_M1 107

IO Voltage

GPIO Voltage Level Tolerance
All GPIO 3.3V 3.63V
SARADC_IN4 1.8V 1.98V

GPIO number

Rockchip RK3588 GPIO has 5 banks, GPIO0 to GPIO4, each bank has 32 pins, naming as below:

GPIO0_A0 ~ A7 
GPIO0_B0 ~ B7
GPIO0_C0 ~ C7
GPIO0_D0 ~ D7
   
GPIO1_A0 ~ A7
....
GPIO1_D0 ~ D7
GPIO2_A0 ~ A7
....
GPIO2_D0 ~ D7
GPIO3_A0 ~ A7
....
GPIO3_D0 ~ D7
GPIO4_A0 ~ A7
....
GPIO4_D0 ~ D7


For Rockchip 5.10 kernel, the GPIO number can be calculated as below, take GPIO4_D5 as an example:

GPIO4_D5 = 32*4 + 8*3 + 5 = 157
(A=0, B=1, C=2, D=3)

Gpio number.png

To set GPIO4_D5 output

# cd /sys/class/gpio
# echo 157 > export
# cd gpio157
# echo out > direction
# echo 1 > value     # output high
# echo 0 > value     # output low