I don’t see a reference to SW5 on the GPIO tool, how would I read the value of SW5? I’m guessing something like “cat /sys/class/gpio/gpioXYZ/value”, after “echo XYZ > /sys/class/gpio/export”, but am mystified as to how to determine XYZ.
First, you may have noticed that the LEDs and switches of the Colibri Evaluation board are only connected to the header X21. So unless you manually connect a jumper cable from X21 to a particular SODIMM pin e.g. via X9 or X10 potentially removing resp. jumper from X8 or X11 there is no way one can control/read any such.
Have a look at the following article on our developer website explaining that concept in more detail. And have a look at the following article concerning more information about GPIO access under Linux and its relation to numbering and such.
I added a jumper from the test point labeled “SW5” to the test point labeled “SODIMM_135”, and noticed the GPIO tool has a connection from GPIO1_IO2 to SODIMMFront.135, so I issued the command “echo 2 > /sys/class/gpio/gpio2”. Then a “cat value” from the resulting /sys/class/gpio/gpio2 directory yields “0” if SW5 not pressed, “1” if pressed, So thanks for the answer, it works fine.
Perfect. Thanks for letting us know.