Gpio Test - Advantech ROM-5420 User Manual

Risc-based smarc module with freescale i.mx6 arm cortex a9 processor
Table of Contents

Advertisement

Note!
Please make sure parameter "seek" is equal to 25118 as indicated in
red in above codes. If you create the file to a wrong sector, that may
damage the system.
3.1.5

GPIO Test

3.1.5.1
ROM-5420 GPIO Default Setting
ROM-DB5900
GPIO0
*GPIO1
GPIO2
*GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
GPIO8
GPIO9
GPIO10
GPIO11
* GPIO1 & GPIO3 has been reserved for camera input in ROM-5420. You can use
the two GPIO ports if you do not need the camera feature.
#cd /sys/class/gpio
You can use "ls" to list all GPIO devices, and you should also see GPIO ports in
above table.
3.1.5.2
Example of Testing GPIO
A. Set gpio177 GPI (in)
#echo in > ./gpio177/direction
#cat ./gpio177/direction
in
B. Set gpio178 GPO (out)
#echo out > ./gpio178/direction
#cat ./gpio178/direction
out
C. Set gpio177 GPO value "0"
#echo 0 > ./gpio177/value
D. Get gpio178 value
ROM-5420 User Manual
Linux OS
/sys/class/gpio
gpio1
-
gpio4
-
gpio205
gpio21
gpio198
gpio199
gpio193
gpio192
gpio178
gpio177
12
Jumper Setting
in ROM-DB5900
CN24(1-2)
CN26(2-3)CAM1_PWR#
CN27(1-2)
CN28(2-3)CAM1_RST#
CN30(1-2)
CN31(1-2)
CN32(1-2)
CN35(1-2)
CN34(1-2)
CN26(1-2)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rom-5420cd-mda1e

Table of Contents