Gpio Pins Value on Startup

Discussion in 'UDOO X86' started by Barış Saçıkara, Aug 29, 2019.

Tags:
  1. Barış Saçıkara

    Barış Saçıkara UDOOer

    Joined:
    May 29, 2019
    Messages:
    8
    Likes Received:
    0
    Hello,

    I have 2 question about udoo x86 II Gpio's pins.

    1)How can i set the default value's (when start udoo all gpio's pins at HIGH state 1.8v) of gpio pins ? Can i change to low state.

    2)I'm changing gpio's pins values but when i reboot the everything in sys/class/gpio folder is disappearing.How can i make them permanent.

    Thanks for answers.
     
  2. am1982

    am1982 UDOOer

    Joined:
    Mar 13, 2018
    Messages:
    14
    Likes Received:
    4
    1) I know from Raspberry Pi that this one has GPIO which are by default low and other pins are by default high. This depends on the electronics. It's hardwired.

    2) State is lost during reboot or power-off. You could save the state before power off and set the state after booting, but you'll still have the problem with default state of the GPIO pins.

    You can use additional hardware to have during reboots persistent output signals.
    On solution could be a 8-Bit shift register (74hc595). Then you need 3 GPIOs to control 8 outputs. You can also buy modules which supports I2C (TCA9554A / 1.8V is supported).
     
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,078
    Likes Received:
    529
    2) For the Udoo Quad and Neo the Udoo team made a package in UdooBuntu that exported the GPIO during startup of the board. You could make one yourself for the Udoo X86. The source can be found here: https://github.com/ektor5/udoo-gpio-export
     
    LDighera likes this.
  4. Barış Saçıkara

    Barış Saçıkara UDOOer

    Joined:
    May 29, 2019
    Messages:
    8
    Likes Received:
    0
    Thanks.I changed for x86 II and it works now.
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,078
    Likes Received:
    529
    Thanks. Would be nice if share your changes for future reference.....
     
  6. Barış Saçıkara

    Barış Saçıkara UDOOer

    Joined:
    May 29, 2019
    Messages:
    8
    Likes Received:
    0
    Sure. But i still need about my first question.
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,078
    Likes Received:
    529
    You can do that in the same script but only for output GPIO. After you have exported them as output you can set them high or low to your wishes. There will be a short amount of time during booting of the Udoo that the state is undefined.
     

Share This Page