Can't get Blink sketch (and others) to work on my Due

I have just received my Due (R3) from Adafruit, and was wondering if there are any special set up or initialization procedures to get a sketch working?

After clicking Upload, I see the Erase, Write and Verify data logged to the console in the IDE, with the last 3 lines saying:

Verify successful
Set boot flash true
CPU reset.

But LED "L" remains lit indefinitely. No matter what other pin I try, my LED does not light up.

I have tried a simple serial sketch to print out "Hello World" once every second, but I get nothing in the Serial Monitor.

The "ON" LED is green, and the "L" LED is always LIT (even if I program a sketch to keep pin 13 low and do nothing else). Pressing either the Reset or Erase buttons have no effect on the LEDs.

3.3V pin reads 3.30 V and the 5V pin reads 5V. None of the ICs are warm to the touch.

Any one with any suggestions, or am I missing something critical with the Due?

Hello dinofizz. Could you show us the full verbose output of your Blink. Should be something like:

Binary sketch size: 9,660 bytes (of a 524,288 byte maximum)
C:\Users\Your Name\Downloads\arduino-1.5-windows\arduino-1.5/hardware/tools/bossac.exe --port=COM22 -U true -e -w -v -b C:\Users\Your Name\AppData\Local\Temp\build4389900953890578969.tmp/Blink.cpp.bin -R
Erase flash
Write 9740 bytes to flash

[ ] 0% (0/39 pages)
[======= ] 25% (10/39 pages)
[=============== ] 51% (20/39 pages)
[======================= ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify 9740 bytes of flash

[ ] 0% (0/39 pages)
[======= ] 25% (10/39 pages)
[=============== ] 51% (20/39 pages)
[======================= ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify successful
Set boot flash true
CPU reset.

Full output below.

  • I am using the programming USB port. If I try plug in my USB micro cable into the Native USB port my PC does not pick up any serial connection (no COMx port available) - not sure if that is expected or not.
  • When I upload, the RX/TX LEDs closest to the Programming port blink and flash as expected, but no change on the output.
  • My system is Windows 8 Pro (64-bit) and Arduino 1.5.1r2
  • I do have an STK500 lying around somewhere if anyone thinks I might be able to get somewhere by flashing the bootloader on the ATmega or something similar.

Link to verbose compile and upload here.

Binary sketch size: 9,668 bytes (of a 524,288 byte maximum)
Forcing reset using 1200bps open/close on port COM3
C:\Users\d\Documents\arduino-1.5.1r2/hardware/tools/bossac.exe --port=COM3 -U false -e -w -v -b C:\Users\d\AppData\Local\Temp\build6842900426788377347.tmp/Blink.cpp.bin -R
Erase flash
Write 9748 bytes to flash

[ ] 0% (0/39 pages)
[======= ] 25% (10/39 pages)
[=============== ] 51% (20/39 pages)
[======================= ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify 9748 bytes of flash

[ ] 0% (0/39 pages)
[======= ] 25% (10/39 pages)
[=============== ] 51% (20/39 pages)
[======================= ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify successful
Set boot flash true
CPU reset.

EDIT: updated with verbose Upload, and added link to verbose compile + upload.

One thing which I noticed is that my Due R3 board has an additional crystal + 22pf caps populated, that is NOT present in this image, and also not in the video below of a guy compiling and uploading Blink to his Due R3. This crystal is in the schematic as Y2, a 32 kHz crystal. Unfortunately I do not have a hot-air desoldering tool or station to try remove the crystal and see what happens. It's quite tricky otherwise to try remove the crystal.

See comparison image here.

The upload looks ok, and I don't think it has something to do with the RTC crytal.

Did you install the inf for the nativ Usb-Port and try to program it from this one too?

I recommend to try with another machine and IDE (may be W7 and IDE 1.5). I don't think is something wrong with your board. May be software issue (version/revision compatibility). Keep us posted.

Markus_L811:
Did you install the inf for the nativ Usb-Port and try to program it from this one too?

There is no change in Device Manager when I connect to the Native USB port (as there was when I installed the drivers on the Programming port), so I am not sure how to install the driver?

Palliser:
I recommend to try with another machine and IDE (may be W7 and IDE 1.5).

I just tried it in Ubuntu 12.10 as a virtual OS on my Win8 machine, and I get the same result. Compiles OK, and the IDE tells me the Upload went OK, but no change on the board. Will see if I can get hold of a real Win7 machine later today.

I am going to post this problem over on the Adafruit forums to see if I can widen the exposure of my problem.

May you try, after uploading the Blink, to press the reset button?

I have tried pressing the Reset button as soon as I click Upload, and also after the Upload is complete. There is no effect, still "L" remains lit indefinitely.

I do see that Reset is having some effect if I press it during the Erase procedure as it then says "SAM-BA operation failed" which is expected I guess.

One more thing, I noticed that just before the erase procedure my IDE says "Forcing reset using 1200bps open/close on port COM3". From reading the guide I would think this is only necessary for Native port programming and not when using the Programming Port as I am doing (but perhaps it is done for both?).

Dino

Want to bump this to make sure that I am the only one so far who has been delivered a Due which says that it has successfully uploaded a sketch, but then the sketch does not run :frowning:

Anyone have the same or similar experience?

Hi dinofizz,
just tried blink exemple and it's work on dueR3.
was triyng to make work PhysicalPixel and this on is not working.
You maybe have a problem with your due..
cheers

Ok well thanks for trying it out and letting me know it works for you!

Good luck with your problem :slight_smile:

Dino

I get the following. I tried a different PC - started working. Back to the original - worked. Now trying both PCs and neither works. Not impressed.....

Binary sketch size: 9,668 bytes (of a 524,288 byte maximum)
Erase flash
Write 9748 bytes to flash
SAM-BA operation failed
[ ] 0% (0/39 pages)

Hi guys, I have the same problem. I mean I bought my due board from Arduino Store one month ago and everything worked fine. After that I left it on my desk inside its box for some weeks because I was busy with my work. Yesterday I went back to play and nothing worked.
Compile is OK...
Upload using Programming Port is Ok..
but after that nothing happens as described previously by dinofizz, no led blink, no serial operation..
Do you have any ideas? Does anybody know if there is a self test procedure? Should I contact Arduino store?

Running into exactly the same problem. I'd love to know if anyone else ran into this and verified the problem/found a fix.

Thanks,
David

Hello dinofizz, garthn, goan, SwimDude0614,

Have you guys tried to blink other digital pins using external leds? If so and the leds blink, this should mean that the 'L' led is burned or that the 1/2 IC1A (BiCMOS LM358) is dead. It's really hard to tell but remember that Arduino Due is a static and moisture sensitive monster (plus not 5V tolerant). A single oversight, blip, mistake, can cost us $50! Regards!

How about slowing the blink right down, to periods of say 5 seconds - and watching the output of the pin attached to the onboard LED with a multimeter?

The other thing, it seems for some reason that a lot of people don't actually know where the onboard LED is, it's not next to pin 13, it's with the on LED - and is only very small and quite dim.

Hi guys, thanks for all your suggestions..
In my case, as for dinofizz, there was no way to make it work with any sketch. It seemed to be stuck, but all the voltages across board were fine and also compiling and flashing were ok.
After about 1 month following arduino support team trying to find the cause of the problem, they decided to change my board because no solution was found. I've sent the old board and received a new one with no extra fees.
I have to say the support team has been very professional and readly available.

I can only say you, without any certainty, that the problem seemed to happear after uploading a modified version of ArduinoISP, using SerialUSB instead of Serial instances.
I've also asked them to tell me the cause of the problem after debug, but I've still received no answer.