Gpio Test; Watchdog Test - Advantech ROM-5722 User Manual

Nxp i.mx8m plus cortex-a53 smarc 2.1 computer-on-module
Table of Contents

Advertisement

4.1.11

GPIO Test

Table 4.1: GPIO pin
Pin#
GPIO0
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
GPIO8
GPIO9
GPIO10
GPIO11
GPIO12
GPIO13
Loopback test (take GPIO0 and GPIO1 as an example)
Step 1: connect GPIO0 and GPIO1
Step 2: export GPIO interface
root@imx8mprom5722a1:~# echo 114 > /sys/class/gpio/export
root@imx8mprom5722a1:~# echo 115 > /sys/class/gpio/export
Step 3: set direction
root@imx8mprom5722a1:~# echo out > /sys/class/gpio/gpio1/direction
root@imx8mprom5722a1:~# echo in > /sys/class/gpio/gpio2/direction
Step 4: read value and set output value than check
root@imx8mprom5722a1:~# cat /sys/class/gpio/gpio2/value
0
root@imx8mprom5722a1:~# echo 1 > /sys/class/gpio/gpio1/value
root@imx8mprom5722a1:~# cat /sys/class/gpio/gpio2/value
1
4.1.12

Watchdog Test

System will reboot after 1 sec
root@imx8mprom5722a1:~# /unit_tests/Watchdog/wdt_driver_test.out 1 2 0
---- Running < /unit_tests/Watchdog/wdt_driver_test.out > test ----
Starting wdt_driver (timeout: 1, sleep: 2, test: ioctl)
Trying to set timeout value=1 seconds
The actual timeout was set to 10 seconds
Now reading back -- The timeout is 10 seconds
U-Boot SPL 2020.04-5722A1AIM30LIVA0386+ge9fc180545 (Jan 05 2022 - 02:21:38 +0000)
Number
114
115
124
125
123
133
154
155
506
507
508
509
510
511
25
ROM-5722 User Manual

Advertisement

Table of Contents
loading

Table of Contents