gpio0 on UDOObuntu 2.0

Discussion in 'Linux Ubuntu' started by Nicola 94, May 22, 2016.

  1. Nicola 94

    Nicola 94 New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    Hi!
    The code:
    Code:
    echo out > /sys/class/gpio/gpio0/direction
    echo 0 > /sys/class/gpio/gpio0/value
    is not working on UDOO quad running UDOObuntu 2.0.
    How can I reset the SAM3X from the MX6?
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Were did you find this instruction in the docs?
     
  3. Nicola 94

    Nicola 94 New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Well just checked on my udoo Quad with rc2: Does not work for gpio0. This gpio is used by bossac to reset the sam3x.

    It works for the normal (Arduino) pins with /gpio/pinxx/value
    It lookslike in udoobuntu 2 something has changed.
     
  6. Nicola 94

    Nicola 94 New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    Thank you for confirming this.
    Are there any ways to handle the gpio0 pin in udoobuntu 2?
     
  7. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
  8. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Well, I think I tested it with Udoobuntu 2, not RC2. At he time I posted this (2016-05-25) it was already 2 (Release Date: 2016-05-11).
    I only found out recently that Quad/Dual are already on a final release of Udoobuntu (unlike the Neo)
     
  9. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    @waltervl, I know it was already available, but I asked because in your previous message you were speaking about RC2
     
  10. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    to clarify: I thought I tested it with RC2 but realised later that it was 2 as I installed my Quad after the release date of 2.
     
  11. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    waltervl likes this.
  12. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    So if I read this correctly
    echo erase > /dev/udoo_ard
    should erase/reset the SAM3X? I did not try it yet......

    or use
    bossac --reset ???
     
  13. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    Actually, no.
    You need to fopen the device, and then fput "erase".

    I successfully managed to erase/reset with the following command:
    Code:
    bossac-udoo --reset -p /dev/ttymxc3
    
    And in the dmesg you'll probably see:
    Code:
    [  49.878470] [bossac] UDOO ERASE and RESET on Sam3x started.
    [  50.313519] [bossac] UDOO ERASE and RESET on Sam3x EXECUTED.
    [  50.313863] [bossac] UDOO ERASE and RESET on Sam3x started.
    [  50.753517] [bossac] UDOO ERASE and RESET on Sam3x EXECUTED.
    
    I don't think that is possible to reset the Sam3x only. You also need to erase the flash memory.

    Ek5
     
    Last edited: Jul 13, 2016
    Andrea Rovai and waltervl like this.

Share This Page