Go Down

Topic: Due appears as COM6 port but gives error "No device found on COM6" on upload (Read 12396 times) previous topic - next topic

MarkOne

My experiences with my latest Due:

Problem: I cannot flash the due using the programming port UNLESS i press the erase button on the board first. I do not need to press the reset button, just the erase.
I'm using IDE 1.5.8. The board DOES reset on serial-monitor launch.

Resistances as requested R23 981R, R3 996R, R21 997R, R15 1003R, R14 1023R

Serial number D00045177. Received from SK Pang about Mid December.

Any known fix yet?

I've three arduino DUE boards and check all resistance on each, roughly R3 R14 R15 R21 and R23 have 1K value so I don't think the root cause is these resistance, there must be something else maybe a capacitor I suspect.

Why: all my 3 boards do have same resistance but only one does work when downloading a sketch.

In fact, sometimes it will upload ok, I'd estimate say 1 time it flashes CPU over 7 times ail it will not see the port of my MacBook Air.

The other problem to be honest, i've written Federico and no response, this thread has been lasting so the question being if arduino wants to solve the issue !

If downloading via native then it will work always


Yannouk

Hi all,

So I recently bought an Arduino DUE and I too have the same problem.
So far I've managed to upload my code 2 times: first after restarting my computer (I'm guessing this was luck because it worked only once...) and after holding the erase button for 2-3 seconds.

So I thought that maybe there is a problem with the ATMEGA16U2 not being able to erase the code from the SAM3X although it is supposed to do that.
I started looking at the schematics and the EAGLE board design and found a difference between the files and the actual board on the "erase"-path between the ATMEGA16U2 and the SAM3X. But I checked the way it is done on the board and it shouldn't be a problem but you might want to check it again.

I then started looking at the code that is supposed to be programmed on the ATMEGA16U2. But I'm not that good in C so I couldn't discover a lot. But according the piece of code shown here I think it is also supposed to work properly. (this code can be found in "Arduino\hardware\arduino\sam\firmwares\atmega16u2\arduino-usbserial\Arduino-usbserial.c")

Code: [Select]

if (ResetTimer > 0)
{
// SAM3X RESET/ERASE Sequence
// --------------------------
// Between 60 and 120: do erase
if (ResetTimer >= 60 && ResetTimer <= 120) {
setErasePin(true);
} else {
setErasePin(false);
}

// Between 1 and 50: do reset
if (ResetTimer >= 1 && ResetTimer <= 50) {
setResetPin(true);
} else {
setResetPin(false);
}
ResetTimer--;
} else {
setErasePin(false);
setResetPin(false);
}


I'm guessing now that the code loaded in the ATMEGA16U2 might be faulty for some of the boards but maybe that someone with a bit more understanding of C or the schematics could check my thoughts.

Yannouk

Hi all,

So I found a fix for the problem. At least for the version of the problem that I have.
As mentioned before, I could not upload a new code unless I first erase the old one manually even though the ATMEGA16U2 is supposed to do that.
When the chip receive the command of opening the usb communication at baudrate 1200 it is supposed to erase the old code on the SAM3X, but it doesn't.
I found out that when you spam the chip with requests to open the comport it will eventually erase the code on the SAM. So I wrote a batch file that does just that and that sends the new code after having requested 30 times to open the comport at baudrate 1200 and it worked in my case. I can now program my due whitout errors.
I know it's a very ugly fix but it works and might work for other people so if you want to give it a shot I can send you the code and how to implement it in the Arduino IDE.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy