Unable to download new sketches unless I enable/disable J22

Discussion in 'Troubleshooting' started by mchrisb03, Jul 13, 2014.

  1. mchrisb03

    mchrisb03 New Member

    Joined:
    Jun 1, 2014
    Messages:
    3
    Likes Received:
    0
    Hi,

    I have a fair amount of Arduino experience with stand-alone Due, Mega and UNO.

    However, I have a problem in that I am unable to download new sketches to the UDOO either externally (from a Mac) or internally (from the UDOObuntu).

    Just trying to download a new sketch results in:

    No device found on ttymxc3

    Even though I receive this error, I verified the serial port on the Amtel SAM3X8E is still able to send and receive data in this state.

    The only way I can download a new sketch is if I enable and disable J22 first.

    Does this mean there is a hardware problem with my UDOO or is there a problem with the Arduino IDE that is not placing the board in the correct state for a new download.

    Thanks,
    —Chris
     
  2. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: Unable to download new sketches unless I enable/disable

    Automatic reset/erase of the SAM3X requires twiddling a couple of GPIO signals from the i.MX6 side. There is a patched version of the "bossac" programming tool (ARM/Due equivalent of "avrdude" for the AVR-based Arduinos) that's been set up to do this-- hopefully Udoobuntu comes with this version already? I haven't tried that particular distro, but the Arduino installer in the Udoo Debian 1.1 release has it.

    Here's one way to check--

    $ strings /opt/arduino-1.5.4/hardware/tools/bossac |grep gpio # replace with correct arduino path if yours doesn't match

    should show some text similar to this, from the embedded command strings:

    echo out > /sys/class/gpio/gpio117/direction
    echo 1 > /sys/class/gpio/gpio117/value
    echo in > /sys/class/gpio/gpio117/direction
    echo out > /sys/class/gpio/gpio0/direction
    echo 0 > /sys/class/gpio/gpio0/value
    echo 1 > /sys/class/gpio/gpio0/value

    gpio117 is the SAM3X ERASE signal, equivalent to J22, and gpio0 is the SAM3X reset (active low -- setting to 0 puts it into reset).

    Another thing to check is that the user you're running the Arudino tools under has necessary access permissions for writing to those gpio's. Debian, at least has a 'ugpio' group for this purpose, with everything under /sys/class/gpio set as writable by users belong to that group-id. Running as root would be one quick way to tell.

    I don't think it's possible to automatically erase the SAM3X when programming from an external host. The schematic shows a small PIC chip (U114) that seemed intended for this purpose, but that didn't get populated onto the final board design.
     
  3. mchrisb03

    mchrisb03 New Member

    Joined:
    Jun 1, 2014
    Messages:
    3
    Likes Received:
    0
    Thanks for the response fetcher!

    I took a look at the things you recommended and found:

    1) /opt/arduino-1.5.4/hardware/tools/bossac in UDOObuntu has all the expected strings
    2) The gpio files are owned by root:ugpio and their permissions are 664.
    3) The ubuntu user is member of the ugpio group (per /etc/group)
    4) Running ardunio-ide.desktop from the terminal as root throws a few errors and will not start.

    Do you have any additional suggestions?

    Anyone else, please let me know if you are able to use the built-in Arduino IDE in UDOObuntu (V1.0 2014-07-04) to flash new sketches without messing with J22.

    Thanks!
     
  4. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Re: Unable to download new sketches unless I enable/disable

    Oh, I didn't realize the Arduino IDE wouldn't even start for you. That could be a Java runtime problem. Do you have the Oracle (former Sun) JDK installed? I think Udoo devs aren't allowed to bundle that with their distributions for licensing reasons, but the Debian 1.1 distro, at least came with an installer script (/opt/arduino_installer.sh) which downloaded and installed this in place of any conflicting Java runtime, prior to installing the Arduino package itself. I ran this installer from a command window, rather than through a GUI.

    If it's not that, post the exact errors you're getting when trying to start up Arduino IDE ... someone may be able to help more based on those.
     
  5. mchrisb03

    mchrisb03 New Member

    Joined:
    Jun 1, 2014
    Messages:
    3
    Likes Received:
    0
    I downloaded and tried the same test using Debian Wheezy armHF and I am seeing the same problem of not being able to download a new sketch unless I enable/disable J22.

    This is the case for both root and debian users.

    At this point, I assume I have some hardware problem.

    This is very disappointing given that I have just started to use my UDOO (even though I have had it since the Kickstarted fulfillment).

    To add insult to injury, I just ordered and received the camera for my board.

    I am kind of sorry I ordered it given the strange behavior of my board.

    To anyone from UDOO, what can I do?

    I have seen a few others that indicated a potential hardware problem with their boards.

    Is there some known issue that others are experiencing? Is there any means to RMA a board or buy a replacement at a reduced cost (sending in the previous board)?

    Thanks.
     

Share This Page