7 Replies Latest reply on Oct 23, 2014 7:07 AM by mhahn

    Problems using Fast Input using GPIO from linux

    tonyj

      HI, I am trying to use the digital IO2/IO3 inputs configured to go directly to the SoC since I am unable to get the speed I need by using the IO via the cy8c9540a chip.

       

      Following the hints here: Sergey's Blog - Malinov Family Web Presence I have configured the input using the following script:

       

      echo -n "0" > /sys/class/gpio/export

      echo -n "1" > /sys/class/gpio/export

      echo -n "14" > /sys/class/gpio/export

      echo -n "15" > /sys/class/gpio/export

      echo -n "30" > /sys/class/gpio/export

      echo -n "31" > /sys/class/gpio/export

      echo -n "out" > /sys/class/gpio/gpio0/direction

      echo -n "out" > /sys/class/gpio/gpio1/direction

      echo -n "in" > /sys/class/gpio/gpio14/direction

      echo -n "in" > /sys/class/gpio/gpio15/direction

      echo -n "out" > /sys/class/gpio/gpio30/direction

      echo -n "out" > /sys/class/gpio/gpio31/direction

      echo -n "strong" > /sys/class/gpio/gpio30/drive

      echo -n "strong" > /sys/class/gpio/gpio31/drive

      echo -n "1" > /sys/class/gpio/gpio0/value

      echo -n "1" > /sys/class/gpio/gpio1/value

      echo -n "0" > /sys/class/gpio/gpio30/value

      echo -n "0" > /sys/class/gpio/gpio31/value

       

      however I find that when I do

       

      cat /sys/class/gpio/gpio14/value

      cat /sys/class/gpio/gpio15/value

       

      the values I get are insensitive to what is connected the the IO2/IO3 pins. It is as if the input is only sensitive to whether the pull-up resistor is turned on or off, and totally insensitive to what voltage is applied on the input pin. Has anyone got fast input to work in a way similar to this? Is there some setting I am missing? I am using the original Galileo (not gen 2).

       

      Thanks for any help.

       

      Tony