Can't Program The SAM3/Arduino Chip Anymore

Discussion in 'Troubleshooting' started by ctassell, Apr 16, 2015.

  1. ctassell

    ctassell UDOOer

    Joined:
    Apr 9, 2015
    Messages:
    19
    Likes Received:
    2
    Hello,

    I've been playing around with trying to get the CAN bus working on a Udoo Dual and in the process I think I loaded a bad program onto the SAM3 chip, and now I can no longer do any programing through the Arduino app. Whenever I try to program anything I get the dreaded "No device found on ttymxc3" I've tried manually running the bossac tool with "/opt/arduino-1.5.8/hardware/tools/bossac --port=ttymxc3 --info" as both root and ubuntu which results in the same error.

    I've heard that putting jumper on pins J22 and J16 can reset the SAM3, but it doesn't seem to do anything for me. Does anyone have any ideas as to what might be wrong?
     
  2. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Here's a short script to erase the SAM3X chip using GPIO signals from the i.MX6:

    Code:
    #!/bin/sh
    
    # enable erase signal
    echo out > /sys/class/gpio/gpio117/direction
    echo 1 > /sys/class/gpio/gpio117/value
    
    # reset
    echo 0 >/gpio/gpio0/value
    sleep 0.2
    echo 1 >/gpio/gpio0/value
    
    sleep 0.2
    
    # disable erase signal
    echo 1 > /sys/class/gpio/gpio117/value
    echo in > /sys/class/gpio/gpio117/direction
    
    This is basically the same thing as what Udoo's bossac does, but bossac may be more aggressive on timing intervals, or not waiting long enough for an erase pass to finish. I've also run into at least one instance where running this procedure manually was necessary before reprogramming.
     
  3. ctassell

    ctassell UDOOer

    Joined:
    Apr 9, 2015
    Messages:
    19
    Likes Received:
    2
    Hi Fetcher,

    Thanks for the reply. I was actually trying something similar to that (same 117 stuff, although I didn't have the sleep in between the gpio0 toggle) but to no avail. I ended up RMAing the board and the new one seems to work fine.
     
  4. TomFreudenberg

    TomFreudenberg Member

    Joined:
    May 12, 2014
    Messages:
    59
    Likes Received:
    2
    It would be interestinfg to know if you maybe have dropped the boot-programmer during your exercises (repairable via an ISP) or if the board just had a hardware failure.
     

Share This Page