Arduino Forum

Products => Arduino Due => Topic started by: xhr0428 on Jul 23, 2014, 06:50 pm

Title: Due won't start after power off-on, have to reset
Post by: xhr0428 on Jul 23, 2014, 06:50 pm
I have a problem with Arduino Due. If I apply external power supply or just connect it to a computer with USB, it won't start at all. Then after I press the reset button or turn power off and on once again, it begins to work properly.

This issue doesn't appear if the board is put back to work only a short time period after its last turning off. But with a "cooling" time of about 5 min, the problem arises. 

I have also tested with Uno. There seems to be no problem with it.

What should I do to fix this problem? Thanks.
Title: Re: Due won't start after power off-on, have to reset
Post by: hiduino on Aug 05, 2014, 09:27 am
I recall similar problems like this with early versions of the IDE v1.5 when it first came out.  Make sure you are using the latest IDE v1.5.7.

Title: Re: Due won't start after power off-on, have to reset
Post by: xhr0428 on Aug 27, 2014, 05:26 pm

I recall similar problems like this with early versions of the IDE v1.5 when it first came out.  Make sure you are using the latest IDE v1.5.7.



Thanks for the reply. I was using 1.5.6, now I tried 1.5.7, it doesn't work either. I just uploaded the blink example, the on-board led didn't work after power off for a while. Reset button made it work again as I mentioned in the previous post. Any idea?
Title: Re: Due won't start after power off-on, have to reset
Post by: difuvi on Aug 30, 2014, 01:22 pm
Let me ask you something. Which pins are you connecting your led to in the board? And which led are you initializing in your sketch?.

Title: Re: Due won't start after power off-on, have to reset
Post by: xhr0428 on Sep 02, 2014, 05:00 pm

Let me ask you something. Which pins are you connecting your led to in the board? And which led are you initializing in your sketch?.



I was using pin13, and I used pin8 before. They all had the same issue.
Title: Re: Due won't start after power off-on, have to reset
Post by: melodic on Sep 04, 2014, 05:58 pm
I have the same problem. DUE doesn`t start at the first powering on or if it was switched off more than 5 se?
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Sep 05, 2014, 08:18 am
Hello, same problem here. First I thought I had a defective TFT, but also a H-bridge or any other components won't work. To get it work properly I have do disconnect and reconnect the power supply, or open the serial monitor in the arduino IDE. Also the reset-button on my board doesn't seem to work.
I am using IDE 1.5.7 and a Arduino DUE board from ebay/china (about 16€).

It would be great to find a solution because I need the DUE to start correctly in my project.
I hope someone knows the reason for this behaviour.
Title: Re: Due won't start after power off-on, have to reset
Post by: Oleg185 on Sep 15, 2014, 12:53 pm
I have same problem. In my board and arduino-Due-schematic.pdf Vddout for core supply use 2x10 mkf capacitor - more than enough (in datasheet ATSAM3X8E for Vddout is offer 4,7 mkf capacitor).
For this reason may be violation of time in initialization flash and boot from SAM-BA .

I've attached a condenser 3000 mkf and board has been successfully starting with power outages in 5 minutes instead of 10 seconds. Now I'm thinking to delete one capacitor 10 mkf, I think this will solve the problem.

Title: Re: Due won't start after power off-on, have to reset
Post by: Oleg185 on Sep 15, 2014, 01:09 pm
Did not help, the problem has not disappeared
Title: Re: Due won't start after power off-on, have to reset
Post by: DCO1 on Sep 15, 2014, 04:24 pm
Same problem here.
It seems to be common so a fix must be somewhere...
I hope.
Don
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Sep 17, 2014, 12:57 pm
If taking out the cap doesn't solve the problem, it does not seem to be related to powering the voltage regulator (?).

It takes about 600µs until the 3.3V and 5V are fully on the 3.3V and 5V pins (> 30 sec off). It takes about 400µs when I reconnect the power supply again after disconnecting it (< 5 sec off).

Maybe the SAM3X tries to do some operations when the supply unit isn't fully stable, at around 500µs or so. Just a guess.

It's very annoying, I need the DUE to boot directly and correcty after it is switched on. It is used in an embedded project...
Title: Re: Due won't start after power off-on, have to reset
Post by: Oleg185 on Sep 18, 2014, 06:03 am
Its amazing! When I attached a condenser 3000 mkf to Vddcore  board has been successfully starting with power outages in 5 minutes  and more, more, more - every time !!!!  But whith 220 mkf is works as before.
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Sep 18, 2014, 08:23 am
Where exactly do you connect the capacitor? Directly on pin 10 on the SAM3X? Or on the 3.3V pin? I will also try this.
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Sep 19, 2014, 02:06 pm
Hi,
Some of my boards have the same problem.. Than noticed that, the boards with problem is R3 boards. But R3-E boards does not have that problem. Do anyone knows, what is the difference between R3 and R3E? thanks, reha
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Sep 19, 2014, 02:47 pm
Hi, that's interesting. Where can the R3-E be found? At ebay I only found the normal R3 boards.
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Sep 19, 2014, 03:23 pm
Hi Vile,
I purchased many (around 25) Due boards from several sources w/o knowing the "concept of E" (!) ...When I realised the problem, I noticed the difference.. Sadly, most of them R3 , not R3-E ;-((

So, I really dont know, where these boards are came from ;-(
Title: Re: Due won't start after power off-on, have to reset
Post by: DavidA3 on Sep 21, 2014, 12:49 pm
Hi, any news or solution?
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 03, 2014, 11:45 pm
Hi,
In my case, I had been lucky. Because, my design has 2 uC's (one of them DUE, other is SANGUINO).. so the soln I found is, when Sanguino starts , it "activate" a relay, which controls the power to DUE card..

In short, Sanguino "activate the relay", so that DUE has initial power (certainly, code does not start) .. then "deactivate" the relay (ie. power of the DUE is cut ! ) , wait for 2 seconds and finally activate the relay ( so that DUE has the power again) .. In this case, code always starts (at least in my boards)

I know, it is not good design, but I could not found ant other solution. In fact another possible solution on "single uC environment" is dedicated WDT chip (will function like Sanguino) ..

but solutions are "unlogical" because R3-E version does not has that trouble but I could not found the difference btwn R3 & R3-E

reha
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Oct 07, 2014, 06:56 am
Hello there,

rehas solution works, but it is only a compromise. In my application, the DUE is the only controller and I don't have the time to wait a second or two until the code runs.
Is there any possibility to contact the developers as this does not seem to be an individual case?

Maybe 'wopo' can tell us where he got his DUE R3-E: http://forum.arduino.cc/index.php?topic=241092.0 (http://forum.arduino.cc/index.php?topic=241092.0)
Title: Re: Due won't start after power off-on, have to reset
Post by: martinyim on Oct 08, 2014, 06:13 am
Solved! Just need to a capacitor which close to the reset switch. The capacitor will let the reset pin to force zero for a short period. However, if you are using many shield on this board, you also need to add a capacitor for each shield's reset switch.
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Oct 08, 2014, 07:29 am
Hi,

great you found a solution! For my board it doesn't work, but also the reset button never has worked before. I guess I have to get a new one, then I`ll try it again!

Vile
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 08, 2014, 03:49 pm
Hi Martin,
excellent and bvery very practical solution. could you please tell me about capacity of the capacitor you used? many thanks, reha
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 08, 2014, 04:07 pm
Hi all,
I soldered 1uF tantal capacitor as Martin mention btwn pins of the reset switch and it works !  reha
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 08, 2014, 05:00 pm
Hi all,
another update.. As Martin mentioned that "if you are using many shield on this board, you also need to add a capacitor for each shield's reset switch.".. I need to update my response as..

1uF capacitor is sufficient for "board only". But when I connected my SDMemory card to board, I needed to increase capacitor to 4.7uF...
Title: Re: Due won't start after power off-on, have to reset
Post by: martinyim on Oct 09, 2014, 03:20 am
Hi! I am using 10uF/10V capacitor for my board. My arduino board is connected to iteadstudio's motor shield and Arduino Ethernet shield.
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 09, 2014, 07:54 am
Friends,
I need to update the capacity values that I shared yesterday. Yesterday, 1uf/4.7uF capacitors had been worked. But today I noticed that "some of the boards" (most probably I purchased them from different manifacturer" need even bigger capacity..  I used 10uF/10V capacitor (like Martin did) .. they are working normally.. reha
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Oct 09, 2014, 09:21 am
Hi,
I tried it with 2,2uF and 4,7uF and both did not work on the DUE only, no shield or periphery. So it seems to be related to my specific board (as I said the reset button is not working). In a few days I can test it with a new Arduino DUE.
Vile
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 09, 2014, 09:49 am
Hi Vile,
could you please try 10uF also? As I mentioned above, some of the boards did not worked with smaller capacity of condenser.. good luck. reha
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Oct 09, 2014, 01:25 pm
Hi,

it seems to work with a 10µF cap, although the RESET button is defective.
Also I received today the new DUE board I purchased. Using a 10µF cap also works. I will do some other tests with longer power off times. They are both DUE R3 (not -E), but the newer one (http://www.ebay.de/itm/281382994502?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT (http://www.ebay.de/itm/281382994502?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT), more expensive than from china, but fast shipping) has a much better soldering quality.

Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Oct 09, 2014, 01:29 pm
Hi Vile,
great news.. please keep us updated (with longer off time).. reha
Title: Re: Due won't start after power off-on, have to reset
Post by: vile on Oct 09, 2014, 02:10 pm
I made some measurements with a scpoe. As the reset button simply pulls the signal down to GND, the cap just delays the rise of the reset voltage, so for the first 100 or 200 ms it's like you press the reset button. That means it takes this amount of time until the code runs, but IT DOES :)

I don't know, maybe it could cause some long term problems if the reset button is used often, because it shorts the capacitor which causes high currents for a short time, but I think this is no problem since the DUE finally runs nice.

This is what happens without any capacitor:
(https://imagizer.imageshack.us/v2/838x676q90/631/XIsrsv.jpg)

This one zooms in, look at the time/div:
(https://imagizer.imageshack.us/v2/832x676q90/537/ErfNo0.jpg)

And this happens using a 10µF cap in parallel to the button as reha posted:
(https://imagizer.imageshack.us/v2/821x676q90/673/PI1OSi.jpg)
Title: Re: Due won't start after power off-on, have to reset
Post by: Magician on Oct 09, 2014, 04:59 pm
I'd be cautious to hang big cap on IO pin, the problem may come during powering off, if cap discharged to input pin, it may inject enough current to latch-off IC.  I can't find anything in atmel's "design board suggestions" appl note regarding limits on cap,  but 10 uF looks too big on my view. DS says 10 nF.  For higher value resistor in series with cap may be necessary.
Title: Re: Due won't start after power off-on, have to reset
Post by: pitrs33 on Nov 28, 2014, 09:16 pm
Hi guys,
universal answer for this issue is MCP120/130-300 which is voltage watchdog and ensures correct RESET signal after power voltage is stable. I tried also solution with 10uF capacitor and it does't work for my DUE clones for some reason. MCP120-300 costs around 0.3EUR and is available in SOT23 package. It can be easily soldered to the bottom layer of DUE between pin RESET and 3.3V and GND. See datasheet for details and you will understand quickly and clearly. From the time I started using MCP I sleep really well. BR, Petr  :)
Title: Re: Due won't start after power off-on, have to reset
Post by: reha on Nov 29, 2014, 08:22 am
Petr,
many thanks for sharing.. in order to avoid any misunderstanding, is it possible to share photo of your connection? reha
Title: Re: Due won't start after power off-on, have to reset
Post by: pitrs33 on Nov 30, 2014, 07:33 am
Hi again!
Enclosed you will find the photo of MCP soldered to bottom layer. Please note that MCP package is upside down to fit right pinout! Just solder it between RESET and 3.3V and find closest ground and "draw" track  or use small piece of wire to connect Vss pin of MCP with GND of DUE.
I usually use MCP on my own shield boards, so I don't need to place it as shown in the picture. For example, when using Ethernet shield, MCP can be easily soldered on its top layer. I hope, guys you will cope with this somehow.
Sorry for picture quality, making photo is not my hobby, making miracles with arduino definitely is. Have a nice day!
BR,
Petr
Title: Re: Due won't start after power off-on, have to reset
Post by: lehoangnhan on May 03, 2015, 03:15 am
Hi guys, I use 2 resistor 10k and 1 cap 220uF to  fix this problem in my project. Hope it helps.
Title: Re: Due won't start after power off-on, have to reset
Post by: ands on Jun 22, 2015, 01:04 am
Hello!
Just use the datasheet, ch 16: Supply Controller.
This is a fine tunable beast of a Reset Controller. Question is: what is causing the behavior?
Could anyone with the problem scope clock generation, 3,3V vs. core voltage?
Strange...

Yours

Andi


My Problem is only remotely related, sorry, following story:
I had, on some poor chinese saintsmard red due, the problem that no Reset would occur when uploading, so I had to press reset button at just the right time. Since I want to do Arduino and robotics with kids, and they will (hopefully) be using matlab/simulink target library (Matlab Coder is underlying technology, free in student version for Arduino, NXT/EV3 Lego Mindstorms, and Raspberry Pi) to let Matlab do the programming, this is not the way to go ;)

I measured the reset signal that the ATmega16u2 gives out on Pin18 via R18 to master_reset.
This Resistor is given with a value of 1kOhm for the schematics from arduino.cc .

I found some residues of the soldering process between ISP headers on backside to via of Reset line. Perhaps this was enough to make the thing refuse to reset?

Now I attach a foto of my scope picture of the double reset into boot loader.

I will try to capture one with the new 1k Ohm resistor soldered on top of the old (10k) one.
I used my old Weller WECP-20 soldering station, freshly repaired, with the pointiest tip I could find.
Still I wish I could steady my hand with some glue or tape ;)
Soldering paste was of help, but I always fear I spill it around, and it would creep under the ICs etc...
I put some pL with a needle tip on the contacts of the old resistor, then held the new one in place and heated up with soldering iron tip. Gave it one more tiniy bit of soldering paste, heated again...  
Best thing would be heat radiation just for such a tiny spot. But well.

Then I measured the outcome directly on Pin22 of 16U2 to the Pin Header RESET.
0,918 kOhm.
This is ok for me ;)

Title: Re: Due won't start after power off-on, have to reset
Post by: bimbo385 on Aug 16, 2015, 05:26 pm
I had the same problems with my SainSmart DUE. I don't know witch revision it is, but it has already the IOREV and the unused pin near the reset pin.

My solution might be better then directly connecting a 10 µF ceramic or tantalum capacitor to the reset switch. That will damage the switch over time and is a risk for the clamp diodes in the microcontrollers.

I connected a 10 µF electrolytic capacitor (ceramic or tantalum should also work) with a 470 Ohm resistor in series between the reset pin and ground. This will delay the startup of the SAM by around 150 ms, as you can see below. The current through the reset switch (and maybe other parts) is limited to 7 mA by the resistor, so nothing can be damaged.

(https://picload.org/image/iwodgdc/duereset.png)
Sorry for noisy environment ;-) CH1 is measured at the reset Pin and CH2 between the resistor and the capacitor.

I assembled the two parts on my prototype board, together with some other components. But it will also be possible to solder them (as SMD) direct to the switch.

This solution is well tested. The reset switch works as before, also the automatic reset during programming via programming port. I tested the startup of the SAM in time steps from 1 to 5 minutes off-time and encountered no problems anymore, also a start after a night works probably. So there should be no long time issues as well.

I hope this solution helps all people with the same problem.

Greetings from Germany,
Bimbo385
Title: Re: Due won't start after power off-on, have to reset
Post by: earx on Oct 17, 2015, 04:50 pm
yo Bimbo385,

your solution works perfectly!

cheers!
Title: Re: Due won't start after power off-on, have to reset
Post by: HIASMer on Oct 30, 2015, 01:51 pm
bimbo385 and earx

You can show a picture of changes in your board ?
thanks !
Title: Re: Due won't start after power off-on, have to reset
Post by: VK5VCO on Oct 31, 2015, 09:58 am
Hi there all,
the first time I put a sketch into the DUE I though I had a dud, well after swearing at it, I pushed the reset button, like every body else the program will not start from 'cold' start or reboots, a quick unplug and shove back in it works.
Now the people that designed this very cool board ( I wish I had them at school) from what I have done in the computing / electronics world it should of had a proper power on reset circuit, the fact that this board will not start and run correctly makes it hard to design into a new product, well with out a power on reset, the small cap across the reset pin that is not charged whilst cold power on is a 'hack' and I like it, but a little more forward thinking a 555 timer could do the job I know you are all laughing at me, well there is a mega 16u2i440 surely this has a spare pin that could be used for the cold power on reset as the chip all ready does a reset during the writing of the code it would just have to be a one shot reset, just my idea.

This board is amazingly fast, makes the old 8 bit computers look like toys.

Cheers All

Paul
Title: Re: Due won't start after power off-on, have to reset
Post by: VK5VCO on Oct 31, 2015, 10:57 am
Hi there all,
after a bit of playing around I did the 10uF cap across the reset and gnd pin, it does work but it is a bad/messy way to have the micro start from hard, therefore my question.

Question surely some one has or could obtain the code with-in the ATMEGA16U2-MU, reason why, this has the rest pin already interconnected and surely there would be enough room to put the 'reset' cold on power up.
It would just have to wait for the power to be connected as this CPU goes live almost instantly it would have to make sure the USB is not going to program but that would not look to be a problem, and say 500 mSplus the reset pin low to reset the main CPU.

If I could get the code with-in the first CPU I would 'hack' it and flash it, otherwise would have to program up a small atmel to do the reset pull down.

Surely someone has or could obtain or talk to the people handling the boards to reflash the new code?

I can not really see it being hard.

Cheers all

Paul
Title: Re: Due won't start after power off-on, have to reset
Post by: nostar on Nov 02, 2015, 03:23 pm
I have 10+ DUE R3 models, 6 DUE R3-E models, 2 SainSmart brown-PCB DUE boards, and 1 SainSmart red-PCB DUE.  All of the R3 boards and the red SS DUE fail to start up after a powerup and require a manual reset.  All of the R3-E boards and the brown SS boards start up perfectly upon powerup every time.  Seems like the red SS is a clone of R3 and the browns are of R3-E.

I am going to flash the 16U2 on one of the R3 boards with the reset code from this thread:
http://forum.arduino.cc/index.php?topic=167492.msg1373055#msg1373055

Meanwhile, the question to Arduino remains unanswered:  "WHAT IS THE DIFFERENCE BETWEEN R3 and R3-E??"

I suspect that it is a 16u2 firmware change similar, if not identical to the one in the mentioned thread.

UPDATE:  Flashing the 16u2 with the reset code from the above forum posts works.  This is better solution than hardware mods.
Title: Re: Due won't start after power off-on, have to reset
Post by: dancombine on Dec 08, 2015, 01:56 pm
Hi all,

I have the same problem since the beginning, and this is bugging me big time for my projects. I think I have identified a definite solution.
In fact credit is due to the guys of Freetronics about the EtherDue.
see link http://forum.freetronics.com/viewtopic.php?f=45&t=6055

The DUE boards may be affected by the following bug: On power-on the board may start to the bootloader instead of running the onboard program, as if the ERASE button had been pressed. Pressing "reset" resumes normal operation. The bug appears to be caused by undocumented behaviour in the ATSAM3X8E microcontroller regarding the "erase" input pin - according to the specification we shouldn't ever be seeing this.

The fix is to solder a surface mount resistor (0603 size) onto the board: solder a 10k resistor between the ERASE line and +3.3V, close to fet T3. In practice, solder it across the 2 upper pins of T3.

To know if you have a DUE (or derivate/clone) that may be affected, check if fet T3 is soldered horizontally - see picture below:
(fet T3 is in the middle of the picture, just to the right of the 6-pin SPI connector)

(http://imageshack.com/a/img910/9674/xNPTiv.jpg)

(If your DUE has the fet soldered vertically, likely the board is more recent and good, as it has resistor R99 soldered.)


Here is a picture of a fixed DUE with a 10k resistor that I soldered across the pins of T3:

(http://imageshack.com/a/img905/8353/KR5sCV.jpg)


I have tested this and works fine.

-D





Title: Re: Due won't start after power off-on, have to reset
Post by: selfonlypath on Dec 10, 2015, 09:52 am
I've to say that the findings of Dan Combine are really amazing, in fact it seems to solve many other start COM3 issues, uploading on other threads.

In my laboratory, there was 3 DUE's which I bought long ago, one of them has been working fantastic but the 2 others suffered from the start up issue or COM3 issue.

Anyway this morning I've soldered 10K surface mount 0805 resistor per guidance of Dan, it is not so easy because bigger than 0603 which I did not have => now this DUE board always work wether to upload, start and many other bothering problems.

Many thanks after all these months or many one year mystery...
Title: Re: Due won't start after power off-on, have to reset
Post by: Nottelmann on Dec 18, 2015, 06:03 pm
Fitting R99 on my so-called compatible Due board solved all reset problems and it is now working exactly as the genuine Due board I also have.

Thanks to dancombine for your support!
Title: Re: Due won't start after power off-on, have to reset
Post by: earx on Jan 09, 2016, 05:56 pm
dancombine: this seems to work nicely. i previously tried the 10u cap + 470R solution, but that did not work on all due's it seemed..

however, the 0603 soldering is a nightmare for me, especially on a fully populated board with headers sticking out and all. wow! is there a special soldering iron tip you can recommend? i'm afraid i might mess up a board or two if do this with my current soldering technique..


Moderator edit: Language.
Title: Re: Due won't start after power off-on, have to reset
Post by: ZartPARZ on Feb 26, 2016, 07:17 am
According to dancombine's suggestion, I put normal through-hole 10k resistor in. Everything work correctly. The DUE start the sketch every time I put power in. Thank to dancombine. ;)
Title: Re: Due won't start after power off-on, have to reset
Post by: Alexwalex on Mar 28, 2016, 09:14 pm
Thank you, dancombine!! I put 10k resistor (R99 in schematics) and DUE now starts correctly.
Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 08, 2016, 04:32 pm
Hi all,

I have the same problem since the beginning, and this is bugging me big time for my projects. I think I have identified a definite solution.
In fact credit is due to the guys of Freetronics about the EtherDue.
see link http://forum.freetronics.com/viewtopic.php?f=45&t=6055

The DUE boards may be affected by the following bug: On power-on the board may start to the bootloader instead of running the onboard program, as if the ERASE button had been pressed. Pressing "reset" resumes normal operation. The bug appears to be caused by undocumented behaviour in the ATSAM3X8E microcontroller regarding the "erase" input pin - according to the specification we shouldn't ever be seeing this.

The fix is to solder a surface mount resistor (0603 size) onto the board: solder a 10k resistor between the ERASE line and +3.3V, close to fet T3. In practice, solder it across the 2 upper pins of T3.

To know if you have a DUE (or derivate/clone) that may be affected, check if fet T3 is soldered horizontally - see picture below:
(fet T3 is in the middle of the picture, just to the right of the 6-pin SPI connector)

(http://imageshack.com/a/img910/9674/xNPTiv.jpg)

(If your DUE has the fet soldered vertically, likely the board is more recent and good, as it has resistor R99 soldered.)


Here is a picture of a fixed DUE with a 10k resistor that I soldered across the pins of T3:

(http://imageshack.com/a/img905/8353/KR5sCV.jpg)


I have tested this and works fine.

-D






I am still battling this problem on most of my Due boards, but this fix confuses me....  Per the datasheet, ERASE needs to be pulled low to disable ERASE mode.  The above text says:

Quote
The fix is to solder a surface mount resistor (0603 size) onto the board: solder a 10k resistor between the ERASE line and +3.3V
This suggests the 10K resistor is being added as a PULLUP to the ERASE pin.  Or is it actually being added between ERASE_CMD signal and GND?  Though the schematic indicates there should already be a resistor in that position.  What am I missing?

Also, if I never need the ERASE function, could I not simply remove the ERASE switch and MOSFET entirely, and hard-wire the ERASE pin to GND?

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: westfw on Apr 09, 2016, 02:09 am
Quote
if I never need the ERASE function
What I've read suggests that Due ALWAYS needs the erase function, even if you don't use the switch.
http://www.arduino.cc/en/Guide/ArduinoDue (http://www.arduino.cc/en/Guide/ArduinoDue)

Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 09, 2016, 05:50 am
Well, it does appear adding the 10K resistor has "fixed" one of my boards!  I'll have to try a few more.

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: westfw on Apr 09, 2016, 06:50 am
Quote
This suggests the 10K resistor is being added as a PULLUP to the ERASE pin.  Or is it actually being added between ERASE_CMD signal and GND?
The freetronics page says that the resistor was added in a later version of the Arduino reference schematic, and I can confirm that it is present in V03 of the schematics, and NOT in V02

The resistor is a pullup on the RESET_CMD signal, which goes to the gate of a P-channel MOSFET before doing anything to the SAM3X.  ERASE_CMD is the signal from the 16u2, thus, it serves to hold the transistor "OFF" when the erase signal from the 16u2 is floating.   It is NOT between +3.3V and the actual RESET signal!

I'm not sure how this qualifies as "undocumented behavior of the chip."  Seems like a simple bug (probably in the 16u2) to me.  It'd be nice if the sites advertising fixes went into more technical detail (including a schematic/circuit description of the fix, and not just physical photographs!)

Title: Re: Due won't start after power off-on, have to reset
Post by: sined23 on Apr 09, 2016, 07:02 pm
I upgraded 16u2 to fix it.
Firmware is here https://forum.arduino.cc/index.php?action=dlattach;topic=167492.0;attach=52901

Description of change you can find in that topic.
Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 10, 2016, 03:25 am
I upgraded 16u2 to fix it.
Firmware is here https://forum.arduino.cc/index.php?action=dlattach;topic=167492.0;attach=52901

Description of change you can fin in that topic.
That link downloads a HEX file  It doesn't point an any "topic"...

So you're saying re-FLASHING the 16U2 fixes this problem?

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: westfw on Apr 10, 2016, 04:53 am
Here's the actual message link https://forum.arduino.cc/index.php?topic=167492.msg1373055#msg1373055 (https://forum.arduino.cc/index.php?topic=167492.msg1373055#msg1373055)
Title: Re: Due won't start after power off-on, have to reset
Post by: sined23 on Apr 10, 2016, 05:41 pm
So you're saying re-FLASHING the 16U2 fixes this problem?
Yes. The author said that RESET will be LOW for some usec after power on.
However in some msec I see one more RESET :)
But it doesn't metter. More RESETs - better for SAM3X )))

(http://forum.arduino.cc/index.php?action=dlattach;topic=256771.0;attach=162606)
Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 10, 2016, 11:15 pm
Yes. The author said that RESET will be LOW for some usec after power on.
However in some msec I see one more RESET :)
But it doesn't metter. More RESETs - better for SAM3X )))

(http://forum.arduino.cc/index.php?action=dlattach;topic=256771.0;attach=162606)
OK.  Sooooo.....  How does one re-FLASH the 16U2?

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: westfw on Apr 11, 2016, 04:34 am
Quote
The author said that RESET will be LOW for some usec after power on.
I'll have to admit to being skeptical that the patch changing the power-on reset behavior will have any effect on the "doesn't start sketch after upload" problem that occurs long after power-on...
The thread surrounding the 16u2 patch describes a somewhat different problem than this one.

(Oh; that IS the subject of this thread, isn't it.   My Due Clone won't start the sketch after upload, either.)
Title: Re: Due won't start after power off-on, have to reset
Post by: sined23 on Apr 11, 2016, 07:41 am
How does one re-FLASH the 16U2?
http://www.arduino.cc/en/Hacking/Upgrading16U2Due
Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 13, 2016, 12:54 am
http://www.arduino.cc/en/Hacking/Upgrading16U2Due
Are there instructions somewhere on how to BUILD the 16U2 firmware?  I've got the source, and the LUFA libraries, but I have no clue what environment needs to be setup for the makefile to work.

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: wushumike on Apr 13, 2016, 05:16 am
Hi all,

I have the same problem since the beginning, and this is bugging me big time for my projects. I think I have identified a definite solution.
In fact credit is due to the guys of Freetronics about the EtherDue.
see link http://forum.freetronics.com/viewtopic.php?f=45&t=6055

The DUE boards may be affected by the following bug: On power-on the board may start to the bootloader instead of running the onboard program, as if the ERASE button had been pressed. Pressing "reset" resumes normal operation. The bug appears to be caused by undocumented behaviour in the ATSAM3X8E microcontroller regarding the "erase" input pin - according to the specification we shouldn't ever be seeing this.

The fix is to solder a surface mount resistor (0603 size) onto the board: solder a 10k resistor between the ERASE line and +3.3V, close to fet T3. In practice, solder it across the 2 upper pins of T3.

To know if you have a DUE (or derivate/clone) that may be affected, check if fet T3 is soldered horizontally - see picture below:
(fet T3 is in the middle of the picture, just to the right of the 6-pin SPI connector)

(http://imageshack.com/a/img910/9674/xNPTiv.jpg)

(If your DUE has the fet soldered vertically, likely the board is more recent and good, as it has resistor R99 soldered.)


Here is a picture of a fixed DUE with a 10k resistor that I soldered across the pins of T3:

(http://imageshack.com/a/img905/8353/KR5sCV.jpg)


I have tested this and works fine.

-D






Credit to Dancombine,

I'm having this no_reset_onPowerON problem and using the capacitor method does not solve my problem..
    I have soldered on the 10K resistor as recommended by Dancombine across the FET and tested.  It now restart (reset) everytime when I turn on the power.

Cool Bean.
Title: Re: Due won't start after power off-on, have to reset
Post by: sined23 on Apr 13, 2016, 01:13 pm
Are there instructions somewhere on how to BUILD the 16U2 firmware?  I've got the source, and the LUFA libraries, but I have no clue what environment needs to be setup for the makefile to work.

Regards,
Ray L.
not needed. just upload this file: https://forum.arduino.cc/index.php?action=dlattach;topic=167492.0;attach=52901
Title: Re: Due won't start after power off-on, have to reset
Post by: Okio on Apr 15, 2016, 07:03 pm
Just to confirm what sined23 has posted: Like most other Due's in this thread, my new Arduino Due would also fail to start after either uploaded or poweron. I was not happy.

After a bit of research, this thread and an at hand USBasp programmer, I uploaded the latest atmega16u2 firmware, which has completely resolved this issue for me.

Command used:
(Copy avrdude.conf and the hex file to the same folder as avrdude.exe before running.)
R:\Arduino\hardware\tools\avr\bin>avrdude.exe -C avrdude.conf -c usbasp -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:16u2.hex:i

Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 15, 2016, 10:01 pm
The new 16U2 firmware seems to have fixed all but one of the boards I've tried so far - they now seem to come up reliably on power-up and after a re-FLASH.  I have one board that still does not start properly on power-up, or after a re-FLASH, but works fine under all other conditions.  If one of you guys with more patience than me is interested in digging into it, I'd be happy to send you the wonky board, to see if perhaps there is another problem lurking in there...

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on Apr 15, 2016, 10:19 pm
According to dancombine's suggestion, I put normal through-hole 10k resistor in. Everything work correctly. The DUE start the sketch every time I put power in. Thank to dancombine. ;)
I really like this solution and thought that soldering a normal 10k resistor would be easier than a SMD 0603 resistor. I tried for 10 minutes but was not able to get the 1st pin of the resistor firmly connected. Then I was not able to just get a blob of solder firm as described in the freetronic description (http://www.freetronics.com.au/pages/etherdue-v1-power-on-bug#.VxFKjCArI3E). So I had to give up, will ask a colleague at work who is much better in soldering than I whether he can do that soldering of 10k resistor for me.

Hermann.
Title: Re: Due won't start after power off-on, have to reset
Post by: ke4est on Apr 19, 2016, 03:19 am
Hi all,

I have the same problem since the beginning, and this is bugging me big time for my projects. I think I have identified a definite solution.
In fact credit is due to the guys of Freetronics about the EtherDue.
see link http://forum.freetronics.com/viewtopic.php?f=45&t=6055

The DUE boards may be affected by the following bug: On power-on the board may start to the bootloader instead of running the onboard program, as if the ERASE button had been pressed. Pressing "reset" resumes normal operation. The bug appears to be caused by undocumented behaviour in the ATSAM3X8E microcontroller regarding the "erase" input pin - according to the specification we shouldn't ever be seeing this.

The fix is to solder a surface mount resistor (0603 size) onto the board: solder a 10k resistor between the ERASE line and +3.3V, close to fet T3. In practice, solder it across the 2 upper pins of T3.

To know if you have a DUE (or derivate/clone) that may be affected, check if fet T3 is soldered horizontally - see picture below:
(fet T3 is in the middle of the picture, just to the right of the 6-pin SPI connector)

(http://imageshack.com/a/img910/9674/xNPTiv.jpg)

(If your DUE has the fet soldered vertically, likely the board is more recent and good, as it has resistor R99 soldered.)


Here is a picture of a fixed DUE with a 10k resistor that I soldered across the pins of T3:

(http://imageshack.com/a/img905/8353/KR5sCV.jpg)


I have tested this and works fine.

-D






Just wanted to say this works perfect.  I used an 0805 instead of 0603.  Due works perfect now on power up or reset.  Thanks!
Title: Re: Due won't start after power off-on, have to reset
Post by: ghlawrence2000 on Apr 20, 2016, 01:56 am
Just to confirm what sined23 has posted: Like most other Due's in this thread, my new Arduino Due would also fail to start after either uploaded or poweron. I was not happy.

After a bit of research, this thread and an at hand USBasp programmer, I uploaded the latest atmega16u2 firmware, which has completely resolved this issue for me.

Command used:
(Copy avrdude.conf and the hex file to the same folder as avrdude.exe before running.)
R:\Arduino\hardware\tools\avr\bin>avrdude.exe -C avrdude.conf -c usbasp -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:16u2.hex:i


Any way of doing this without an additional programmer?
Regards,
Graham
Title: Re: Due won't start after power off-on, have to reset
Post by: RayLivingston on Apr 20, 2016, 07:10 am
Any way of doing this without an additional programmer?
Regards,
Graham
You can do it using another Arduino as an ISP.  There are several websites that explain how to do it.

Regards,
Ray L.
Title: Re: Due won't start after power off-on, have to reset
Post by: ghlawrence2000 on Apr 20, 2016, 11:54 am
Thanks Ray, found it on the Arduino site.

Regards,

Graham

PS. It turns out, the board I am having problems with, R23 = 10K....... :( but the things are so bloody small I think I will need to live with it, at least the firmware upgrade means I don't need to press reset before programming now :D

Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on Apr 27, 2016, 04:09 pm
I really like this solution and thought that soldering a normal 10k resistor would be easier than a SMD 0603 resistor. I tried for 10 minutes but was not able to get the 1st pin of the resistor firmly connected. Then I was not able to just get a blob of solder firm as described in the freetronic description (http://www.freetronics.com.au/pages/etherdue-v1-power-on-bug#.VxFKjCArI3E). So I had to give up, will ask a colleague at work who is much better in soldering than I whether he can do that soldering of 10k resistor for me.

Hermann.
Here is an update, today my colleague helped me and soldered the SMD 103 resistor onto one of my 3 Arduino Dues:
(https://stamm-wilbrandt.de/en/forum/Due.103.soldered.png)

I did flash "Blink" example program and after disconnecting and reconnecting power Due blinked again. This resolved my real need for Arduebot -- it would be really bad to have Arduebot robot driving some course and getting fully stopped by a voltage spike without any chance to restart.

Next I disconnected the USB cable, went to colleagues computer and connected there -- Due Blink program did NOT start.

After some investigations I can say the following on this 10K resistor fix for my Due:

Can anybody explain this behavior?

Hermann.
Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on Apr 27, 2016, 05:26 pm
Hmmm, I did flash TinyBasic and the behavior is different, even after disconnecting power completely for 1 minute "sudo screen /dev/ttyACM0 9600" connects successfully:
Code: [Select]
HELLO
TinyBasic Plus v0.14
90865 bytes free.
OK
>


How can the Due bootup process be different for "Blink" vs. "TinyBasic"?

Hermann.
Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on Apr 27, 2016, 11:20 pm
OK, I debugged this further and further and tried to identify the difference between Blink and TinyBasic.

It turned out that just doing the connection to TinyBasic made the difference (I did power via USB cable on programming port). Just repowering after 4 seconds or more did NOT start Blink example program. But as I said, connection as I did describe in previous posting did trigger start of blink program.

Now I even simplified that and remembered that just opening of USB port can be done via "stty -F /dev/ttyACM0 baudrate". I did not want to erase flash (which can be done with baudrate=1200). So I did "stty -F /dev/ttyACM0 9600" and immediately Blink program started working(blinking).

Next I connected only 9V block battery to Arduino Due (GND and Vin pins). Blink program did not start. After pressing Reset button Blink program started. Disconnecting 9V battery for 5 seconds and then reconnecting Blink program did not start.

Summary:
If power break is 4 seconds or longer and there is no "external trigger" Arduino program does NOT start.

These are "external triggers" that worked:


Can somebody who had declared soldering 10k resistor as I did works please comment on whether for them disconnecting power for more than 4 seconds and then repowering really does restart the program from flash (without any "external trigger" I described)?

Hermann.
Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on Apr 28, 2016, 06:00 pm
Back at home I have access to all my 3 Arduino Dues.
Now I did flash Blink sample on both Arduebots and did the timing experiments:
(https://pbs.twimg.com/media/CgMMYIWWEAAw4EQ.jpg:large)

Interestingly those Dues do not have any 10k resistor soldered and do survive a longer power outage:


I did retest my bare Arduino Due I used last night also via power jack, and again up to 4 seconds is fine, but longer power outage needs an external trigger to restart.

Last experiment I did was to remove the soldered 10k resistor that got soldered yesterday. The timing measurements show no difference, up to 4 seconds power outage and the Dues starts automatically, more and an external trigger is needed.

Arduino Due cannot be bought under Product tabs on this website since quite some time not even in the US. I did buy all my Arduinos as China clones from aliexpress, links below. Perhaps these China closes behave differently to the Dues others reported the resistor had made a difference. Again, what exactly was the difference?

Unknowingly what I found out by measuring power off times and extenal trigger needs I have made use of exactly this feature two weeks ago when when making a film of motor forward/backward left/right demo for 2nd Arduebot with L9110S motor controller:
https://www.youtube.com/watch?v=rGf4TnKYh5E&feature=youtu.be (https://www.youtube.com/watch?v=rGf4TnKYh5E&feature=youtu.be)

The progam was endless loop and nothing was added to start the program. So I connected power jack and nothing happened because of the missing external trigger. Then I tried to power cycle the power jack with one hand (the other did hold the Android phone camera) and needed needed a little help from the hand holding the Android. After repowering the Arduino program immediately started with roaring motors.

Perhaps the different repowering cycles for the three Arduinos is determined by what is all connected to the Arduino board, but I do not unmount the Due boards from my Arduebots just to find that out.

Summary for me: NO resistors needed for my Arduino Dues, because the behavior did not change, and most importantly, power outages due to voltage spikes will last much less than 4 seconds and therefore restart the program without any changes needed.


Hermann.
http://www.aliexpress.com/item/Free-shipping-Due-R3-ARM-Version-Main-Control-Board-for-arduino/1914744005.html (http://www.aliexpress.com/item/Free-shipping-Due-R3-ARM-Version-Main-Control-Board-for-arduino/1914744005.html)
http://www.aliexpress.com/item/10sets-lot-For-Arduino-Due-2012-R3-ARM-Version-Main-Control-Board/1736339894.html (http://www.aliexpress.com/item/10sets-lot-For-Arduino-Due-2012-R3-ARM-Version-Main-Control-Board/1736339894.html)
Title: Re: Due won't start after power off-on, have to reset
Post by: IanMerley on May 15, 2016, 04:59 pm
I have just re-flashed my Arduino Due after seeing this topic and following the instructions on how to use an Arduino Uno to do this. I am using a Mac running El Capitan and I had to make a couple of adjustments to the command line instructions I found.

The first problem I hit was finding where avrdude was hidden away. After Googling - what did we ever do before the internet! - I found avrdude in the following directory:

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin

I didn't even know what a package was until today. So the Arduino icon in Applications is actually a kind of package/directory and you have to use the .app suffix to access the directories inside. I copied the avrdude.conf file and the .hex file into the same directory just to be on the safe side.

The other thing I found was that the device name was different on my Mac. Using ttyACM0 didn't work. When I looked at the port listed under Tools in the Arduino software, it was cu.usbmodem1441. I searched the listed devices and found tty.usbmodem1441. I used this in the command line and it worked correctly.

My Due is now working correctly without the need to solder the resistor on and programs run properly on power up without needing to do a reset.
Title: Re: Due won't start after power off-on, have to reset
Post by: phr3ak on May 15, 2016, 06:11 pm
can I use the due itself as an AVR programmer? Or can I use another due as a programmer? I don't have uno neither mega.
Title: Re: Due won't start after power off-on, have to reset
Post by: phr3ak on May 17, 2016, 03:19 pm
I think no, we cannot use the due as an AVR programmer because the different voltage level.
Title: Re: Due won't start after power off-on, have to reset
Post by: HermannSW on May 20, 2016, 02:52 am
Adding a bidirectional level shifter (http://www.aliexpress.com/item/1Pcs-5V-to-3-3V-IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-for-Arduino/32307221398.html) to the Due should do, right?

Hermann.
Title: Re: Due won't start after power off-on, have to reset
Post by: ands on Jun 27, 2016, 06:08 pm
Firstly, big THANKS! to dancombine.


I did the job with my Due from china. This one did the reset after programming via 16u2, it had the correct 1kOhm series resistor, but not after power up, which didn't occur to me some while.
The 10k across T3 fixed it all right.


... 0603 which I did not have ...
Me neither.
But some old PCD from junk pile did offer a 10k small enough.
(Smaller ones come from old mobile pcbs, some tin  ;)
On another occasion I soldered it vertically, after contacting the "upper end" with enamel wire.
Good luck!
(When do we print/let grow micro bots, due driven of course, that carry enamel wire across PCBs and solder it, to fix the PCB to our findings? :)

Andi
Title: Re: Due won't start after power off-on, have to reset
Post by: atrakonline on Sep 19, 2016, 09:23 am
Hi
I met this problem too .
For solving this problem , I increase the time of board's Reset .
I used a 10K resistor and a 100uf capacitor in series and connect common point of them to RESET pin of board. also 1 pin of 10K to 3.3v  and minus pin of capacitor to GND

The Problem solved .

Thanks
Title: Re: Due won't start after power off-on, have to reset
Post by: Rorut on Dec 07, 2017, 03:21 pm
Hi
I met this problem too .
For solving this problem , I increase the time of board's Reset .
I used a 10K resistor and a 100uf capacitor in series and connect common point of them to RESET pin of board. also 1 pin of 10K to 3.3v  and minus pin of capacitor to GND

The Problem solved .

Thanks
Thank you very much! This solution worked for me. Also had the problem that I needed to do a second manual reset for the board to turn on properly. Very easy fix, no tiny soldering or firmware update.
Title: Re: Due won't start after power off-on, have to reset
Post by: quanticchaos on Aug 01, 2018, 04:01 pm
Hi
I met this problem too .
For solving this problem , I increase the time of board's Reset .
I used a 10K resistor and a 100uf capacitor in series and connect common point of them to RESET pin of board. also 1 pin of 10K to 3.3v  and minus pin of capacitor to GND

The Problem solved .

Thanks
This was the simplest way to fix this. Even using only the capacitor between reset and ground worked. Before doing this I tried to flash my due without success (it kept displaying verification errors) and my Due clone doesn't even have the T3 mofset to solder the resistor on...

And yes, I know the problem is old but it persists.
Title: Re: Due won't start after power off-on, have to reset
Post by: Doone on Oct 03, 2018, 02:35 pm
Hi
I met this problem too .
For solving this problem , I increase the time of board's Reset .
I used a 10K resistor and a 100uf capacitor in series and connect common point of them to RESET pin of board. also 1 pin of 10K to 3.3v  and minus pin of capacitor to GND

The Problem solved .

Thanks
Had the same problem here - the presented solution solved it. Picture below
Thanks!
Title: Re: Due won't start after power off-on, have to reset
Post by: sumukh208 on May 01, 2019, 04:28 pm
I think the problem is with the IC Atmega16U2 on DUE board is loaded with the hex file meant for MEGA2560.
Both the boards work differently, as DUE needs erase pin to be pulled up before programming.
The loaded firmware does not do that, so you have to manually erase it, making it inconvenient.

Following instructions need to be followed in order to do the same.

Go to this site and make necessary connection--

https://www.arduino.cc/en/Hacking/Upgrading16U2Due


The avrdude is located in  C:\Arduino\hardware\tools\avr\bin\avrdude.exe


Copy the avrdude.conf file in the same folder as avrdude.exe (Location of conf file is C:\Arduino\hardware\tools\avr\etc

Copy the hex file in same folder as avrdude.exe. (I am attaching correct hex file for this) (change the extension from txt to hex and use it)

The command line given in the website needs to be changed as follows.--

avrdude.exe -C avrdude.conf -c arduino -P COM1 -b 19200 -p m16u2 -vvv -U flash:w:C:\Arduino\hardware\tools\avr\bin\16u2.hex:i

It worked like a charm.

No need of making changes in hardware.
Title: Re: Due won't start after power off-on, have to reset
Post by: mikeyBoyAus on Sep 25, 2019, 11:14 am
I recently bought 2 of these due units from mau's empire of dirt with black pcb's and have the power up or cpu reset issue. However, these boards don't have the ICSP header and so I am stuck. I have tried the 10k and 100mic cap but it didn't work for me. Is there any other connection to the ICSP pins or have I got a couple of attractive paper weights?
Title: Re: Due won't start after power off-on, have to reset
Post by: cloxart on Sep 30, 2019, 12:06 pm
Just my 2 cents:
I had the same problem on an arduino NANO clone, no start until i pressed reset. I solved it using a 1 second delay as first instruction on Setup().