Page 1 of 1

It seems that the Luckfox Lyra Zero W cannot set GPIO2(GPIO0_A2) to a high level?

Posted: 2026-03-26 6:37
by Cycle2L
Buildroot in flash.
I tried the following commands:

Code: Select all

# echo 2 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio2/direction
# echo 1 > /sys/class/gpio/gpio2/value
Although these commands work for GPIO14 and GPIO55, they have no effect on GPIO2.

When I try to read gpio2/value, it returns 0.

Code: Select all

# cat /sys/class/gpio/gpio2/value
0

Code: Select all

# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/ff940000.gpio, gpio0:
 gpio-2   (                    |sysfs               ) out lo

gpiochip1: GPIOs 32-63, parent: platform/ff870000.gpio, gpio1:
 gpio-32  (                    |work-led            ) out lo
 gpio-46  (                    |cd                  ) in  hi IRQ ACTIVE LOW
 gpio-53  (                    |bt_default_poweron  ) out hi
 gpio-55  (                    |sysfs               ) out hi

gpiochip2: GPIOs 64-95, parent: platform/ff1c0000.gpio, gpio2:

gpiochip3: GPIOs 96-127, parent: platform/ff1d0000.gpio, gpio3:

gpiochip4: GPIOs 128-159, parent: platform/ff1e0000.gpio, gpio4:0

Code: Select all

# iomux 0 2
mux get (GPIO0-2) = 0
How can I set GPIO2 to output a high level ?

Re: It seems that the Luckfox Lyra Zero W cannot set GPIO2(GPIO0_A2) to a high level?

Posted: 2026-03-30 9:40
by Crocodile
n most cases, this situation occurs because the GPIO is short-circuited to GND. It could be related to the connection with the peripheral device, or it might be a short circuit on the PCB.

Re: It seems that the Luckfox Lyra Zero W cannot set GPIO2(GPIO0_A2) to a high level?

Posted: 2026-04-01 5:05
by Cycle2L
Crocodile wrote: 2026-03-30 9:40 n most cases, this situation occurs because the GPIO is short-circuited to GND. It could be related to the connection with the peripheral device, or it might be a short circuit on the PCB.
I sincerely apologize. I checked the circuit and found a short to ground, which I have fixed. It is now functioning normally. :mrgreen: