Gpio - Advantech RSB-3730 User Manual

Nxp imx8m mini arm cortex-a53 2.5″ sbc with uio40 express
Table of Contents

Advertisement

3.3

GPIO

The IMX8MM bank/bit notation for GPIOs must be formed as "GPIO<GPI-
O_bank>_<gpio_bit>".
The numeric value of GPIO is calculated as follows:
32 x (gpio_bank-1) + gpio_bit
gpio_bit : 0~31
E.g. GPIO5_22 becomes 150
"GPIO11" and "GPIO12" can be controlled by the CPU or by the i2c extended GPIO
based on the high and low levels of "GPIO_SELECT".
Table 3.1: GPIO
GPIO Number
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
GPIO8
GPIO9
GPIO10
GPIO_SELECT= LOW
GPIO11
GPIO12
GPIO_SELECT= HIGH
GPIO11
GPIO12
GPIO_LED
Export GPIO; then you can use control GPIO from the user space through sysfs.
The node numbers of the exported GPIO are consistent with the export order,
increasing from 1.
.
Export GPIO1
# echo 150> /sys/class/gpio/export
Set GPIO direction to in/out
# echo "out" > /sys/class/gpio/gpio1/direction
Set GPIO value 0/1 if GPIO pin definition as output
# echo 1 > /sys/class/gpio/gpio1/value
GPIO Formed
GPIO5_22
GPIO5_23
GPIO5_24
GPIO5_25
GPIO3_21
GPIO5_13
GPIO5_10
GPIO5_12
GPIO5_11
GPIO4_28
GPIO3_19
GPIO1_0
GPIO4_1
GPIO3_19
I2C_GPIO P0
I2C_GPIO P1
I2C_GPIO P3
.
31
Numeric Representation
150
151
152
153
85
141
506
140
511
138
83
0
97
83
504
505
507
.
RSB-3730 User Manual

Advertisement

Table of Contents
loading

Table of Contents