AnsweredAssumed Answered

TWR-LS1021A gpio

Question asked by Leonid Andronov on Dec 14, 2015
Latest reply on Dec 14, 2015 by Pavel Chubakov

We are using TWR-LS1021A in our projects and we need to get at least two usable GPIO pins to make some simple LED indication.

As seen from the scheme of external connectors there are several "gpio" pins from FPGA/CPLD and maybe just 2 pins from ls1021a processor (GPIO3_13 and GPIO3_14).

We are using Yocto 1.7 SDK. It seems that in kernel configuration there are enabled options for controlling gpios via sysfs. Assuming that GPIO3_14 in sysfs mapped to gpio174 we tried to do something like

 

echo 174 > /sys/class/gpio/export

echo out > /sys/class/gpio174/direction

echo 1 > /sys/class/gpio174/value

echo 0 > /sys/class/gpio174/value

 

But there is no activity on board's external pin.

So the questions are:

1) Is it correct mapping for GPIO3_14 in sysfs?

2) Do we need to do something else to use sysfs for controlling those two gpios (maybe rcw or dts editing)?

3) Is there a way to access to FPGA/CPLD gpio register and what we need to do for it?

 

Thank you in advance!

Outcomes