No /sys/class/gpio/gpio430/ for Duo256M

Hi,
I build my image according to the documentation, but unfortunately the /sys/class/gpio/gpio430/ is not populated at all, so i can’t acces the physical pins.
I also created the issue

Any ideas what should be done. Thank yo in advance

1 Like

Hi qczek,

I just tried to reproduce on my Duo256M with Buildroot image. For GP10 / 430 I get the following error:

[root@milkv-duo]~# echo 430 > /sys/class/gpio/export 
sh: write error: Resource busy

I am not sure why, but maybe the pin has been reserved for I2C-2 by the OS?

The other GPIOs work just fine, e.g. GP9 / 370

[root@milkv-duo]~# duo-pinmux -w GP9/GP9
[root@milkv-duo]~# echo 370 > /sys/class/gpio/export
[root@milkv-duo]~# echo out > /sys/class/gpio/gpio370/direction
[root@milkv-duo]~# echo 1 > /sys/class/gpio/gpio370/value
[root@milkv-duo]~# echo 0 > /sys/class/gpio/gpio370/value

Are you able to use other GPIOs for your project?

Notice that the target gpio won’t show up in /sys/class/gpio until it has been exported, e.g.

[root@milkv-duo]~# ls /sys/class/gpio/
export       gpiochip384  gpiochip448  unexport
gpiochip352  gpiochip416  gpiochip480
[root@milkv-duo]~# echo 370 > /sys/class/gpio/export
[root@milkv-duo]~# ls /sys/class/gpio/
export   gpiochip352  gpiochip416  gpiochip480
gpio370  gpiochip384  gpiochip448  unexport
1 Like

Hi, Thank you for your response. Just checked and the GP9/370 is working fine.
I’m not an expert, but it looks like the GPIO memory mapping is based on board definition files locate there:

The question is why there is no file for SG2002 chip (which is used for Duo256M), but only CV1800 related files…

Kris

PS,
Maybe the SDK V2 should be used

1 Like

Just checked with SDK V2, same problem

[root@milkv-duo]~# duo-pinmux -r GP10
GP10 function:
[ ] CV_4WTDO_CR_2WTMS
[ ] VI0_D_11
[ ] VO_D_2
[v] GP10
[ ] IIC2_SDA
[ ] PWM_10
[ ] SPI0_SDO
[ ] DBG_14

register: 0x30011ac
value: 3
[root@milkv-duo]~# echo 430 > /sys/class/gpio/export
sh: write error: Resource busy
[root@milkv-duo]~#

1 Like