GPIOs on DIMM-MX53 under Linux

Enabeling GPIO control

To get access to an GPIO pin, first write the GPIO number to /sys/class/gpio/export

echo 40 > /sys/class/gpio/export

Now you should find a directory in /sys/class/gpio to access your GPIO pin. Write in or out to direction to change the direction of the pin:

echo out > /sys/class/gpio/gpio40/direction

The value (0 for off, 1 for on) of the pin is in the value file. To read or change it, read the file or write to it.

echo 1 > /sys/class/gpio/gpio40/valuecat /sys/class/gpio/gpio40/value

The list of GPIO numbers can be found below.

Verno 3/Verno4/Cadun

There are 8 GPIOs on J12 with a signal level of 3.3V and 14 more on J16 via an GPIO expander.

ConnectorPinSignalSignal on MX53Bank and pinGPIO Number
J124GPIO_0GPIO_A2-840
J126GPIO_1GPIO_B2-941
J128GPIO_2GPIO_C2-1042
J1210GPIO_3GPIO_D2-1143
J1212GPIO_4GPIO_E2-1244
J1214GPIO_5GPIO_F2-1345
J1216GPIO_6GPIO_G2-1446
J1218GPIO_7GPIO_H2-1547
J163GPIO_I2C_0  224
J164GPIO_I2C_8  232
J165GPIO_I2C_1  225
J166GPIO_I2C_9  233
J167GPIO_I2C_2  226
J168GPIO_I2C_10  234
J169GPIO_I2C_3  227
J1610GPIO_I2C_11  235
J1611GPIO_I2C_4  228
J1612GPIO_I2C_12  236
J1613GPIO_I2C_5  229
J1614GPIO_I2C_13  237
J1615GPIO_I2C_6  230
J1617GPIO_I2C_7  231

Lothron 3

The Lothron 3 has 8 accessible GPIO pins on J25.

ConnectorPinSignalSignal on MX53Bank and pinGPIO Number
J2511GPIO_0GPIO_A2-840
J2512GPIO_1GPIO_B2-941
J2513GPIO_2GPIO_C2-1042
J2514GPIO_3GPIO_D2-1143
J2515GPIO_4GPIO_E2-1244
J2516GPIO_5GPIO_F2-1345
J2517GPIO_6GPIO_G2-1446
J2518GPIO_7GPIO_H2-1547



Zurück