Go Down

Topic: Can't get Blink sketch (and others) to work on my Due (Read 5748 times) previous topic - next topic

dinofizz

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?






Palliser

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

Quote
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.

dinofizz

#2
Nov 20, 2012, 07:44 am Last Edit: Nov 20, 2012, 08:09 am by dinofizz Reason: 1
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.

Quote

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.

dinofizz

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.

http://www.youtube.com/watch?v=9mgf-_F4Y0s

Markus_L811

#4
Nov 20, 2012, 10:48 am Last Edit: Nov 20, 2012, 10:50 am by Markus_L811 Reason: 1
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?

Palliser

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.

dinofizz

Quote from: 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?

Quote from: 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.

cmaglie

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

C.

dinofizz

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

dinofizz

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 :(

Anyone have the same or similar experience?

Flyingsoon

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

dinofizz

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

Good luck with your problem :)

Dino

garthn

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)

goan

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?

SwimDude0614

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

Go Up