6 Replies Latest reply on Mar 5, 2015 4:20 PM by arfoll

    setting current_pinmux mode on boot

    Maaaah

      Hi I'm trying to set GP110 to mode0

      I have a simple shell script /etc/init.d/pinsetup.sh

      which has one line:

      echo mode0 > /sys/kernel/debug/gpio_debug/gpio110/current_pinmux

      if I run the script then:

      cat /sys/kernel/debug/gpio_debug/gpio110/current_pinmux

      returns:

      mode0

      I have done:

      chmod +x /etc/init.d/pinsetup.sh

      and I have:

      update-rc.d pinsetup.sh defaults

      and I see the necessary startup files in rc0 --> rc6

       

      If I run pinsetup.sh I can

      echo 1 > /sys/class/gpio/gpio110/value

      to switch value, or using chipSelect = mraa_gpio_init_raw(110); use chipSelect to toggle the pin programmatically

      But on startup it's always overwritten to mode1

       

      Is there something wrong with my startup? Is there something with Edison's handling of the GPIOs that reset it to mode1 before it gets to the prompt? Where does Intel think initialization take place?

       

      Thanks

       

      j