Gpio not changing between on and off (36 and 38)

so, Im trying to set the status of some GPIOs in my radxa-zero V1.51 (pin 36,38 and 40)

i tried to use Mraa, libgpiod and some other libraries in python but none of those libraries can change the status of those 2 pins (36 and 38)

I found some documentation about how to change the state using echo commands (Here), what I did was:

considering that GPIO 40 is GPIOA_11 and the formula Base+Offset (413+10), I end with 423 and tried:

sudo -i
echo 423 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio423/direction
echo 1 > /sys/class/gpio/gpio423/value

then i measured the gpio 40 output and i got 3,28v

but the problem is that when i tried to do the same with GPIO 38 (GPIOAO_11 - 424) and GPIO 36 (GPIOH_8 - 451), following the same procedure i got the following error:

-bash: echo: write error: Device or resource busy

am I doing something wrong ??

@RadxaYuntian please look into this issue

Pin 38 isn’t available on your board (v.1.51). Pin 36 is an open drain pin and you’ll need an external resistor and possibly some changes to the device tree if you want to use it as an output.

Like what @theophile said your issues are documented here. Pin 38 is used by LED device which is why you get “Device or resource busy” error. However, that should not happen to pin 36. Though pin 36 is also a 5V logic pin, so you probably don’t want to use it anyway (other than it being an OD pin).

what about 29,31,33, is it possible to use it as output ?, I need 3 Gpios in a row to plug an external device

I just realized that my previous link was broken. It is fixed now, and you can see that those 3 pins are Not Connected, so they cannot be used.

Additionally, I suggest you avoid pin 8 and 10, as some system components will always assume it is a debug serial port, and read/write data from them.

so the only option is 19,21,23 ?

Yes, though you might be able to use Dupont/jumper wires to connect a 3-pin connector to non-adjacent pins.

1 Like