To configure you need root permission.
Run su
command in teminal and enter root password.
Vicharak Board Root password is root
-
Here, you can find SOC GPIOs Header pins for Axon RK3588 Processor.
Axon GPIO Header -
The GPIOs are typically accessible in
/sys/class/gpio
folder.
Each GPIO Pins have folder named asgpio<GPIO_NUMBER>
.
Example : GPIO PIN 13 on header => gpio16 for GPIO0_C0You need root permission to configure it. Make sure you’re in root User.
by running commandsudo su
then, enter the root password OR you can run below commands usingsudo
.If the folder is not present, the GPIO needs to be exported first.
echo 16 > /sys/class/gpio/export
-
To configure the pin for LED Blink, set the GPIO number 16 as an output
echo out > /sys/class/gpio/
gpio16
/direction
-
Read the value by
cat /sys/class/gpio/gpio16/value
-
To set GPIO0_C0 as low
echo 0 > /sys/class/gpio/gpio16/value
-
To set GPIO0_C0 as high
echo 1 > /sys/class/gpio/gpio16/value
Note:
-
you can set GPIO as an input
echo in > /sys/class/gpio/
gpio16
/direction
-
you can also unexport it -
echo 16 > /sys/class/gpio/unexport