SOLVED: Strange uploading problem

Hi all.

I am rather new to Arduino and have the following problem: Two weeks ago, i programmed an Arduino Nano (v3.1) successfully. Meanwhile, I have ordered some more Arduino Nano (v3.1) Boards (from Mouser, I don’t know how to check but I think those boards should not be clones). Now as the boards have arrived, I am some kind of unable to flash them.

After pluging in a new Arduino Nano Board, I can upload the Blink example and it works (LED blinks as intended). But then I am not able to flash another program (e.g. the Fade example) to the board. The error message is… the (as it seems) widely feared

avrdude: stk500_getsync(): not in sync: resp=0x00

message (verbose version in the attachments).

If I take another new Nano Board, I have the same behaviour: First flash works (even if I flash it with a user programm that works fine), from then on I get the error message above. It seems as the board could be flashed only once.

I would like to be able to flash them more than once.

Loopback test passes even after the Board was flashed the first time (what proofs that the driver, usb cable, FTDI chip chain works properly).

Has anyone experience on this kind of behaviour or some advice on how to debug the problem any further?

Any help would be much appreciated!

System:

  • Windows 7 64bit Version (also tested on my mac; same behaviour)
  • FTDI driver version: 2.8.24.0
  • Nano Board: v3.1 (2014)
  • IDE version: 1.0.6 (also tested on 1.0.5; same behaviour)

Attachments:

  • Verbose log of the first flash of a new board (looks good I think)
  • Verbose log of the second (or third or fourth) try to flash the same board

Arduino_NOT_working.txt (632 Bytes)

Arduino_working.txt (26.1 KB)

I have a couple NANOs that seem to need several pushes and hold of the reset button on the NANO followed by the upload to make them accept loading.

So do I understand you right, that you have had the same problem and that you were able to "solve" it by just retrying a couple of times?

What is the purpose of resetting the hardware? Is the basic idea to force the bootloader to do something? When should the reset button be released?

I would appreciate some further explanation.

Thank you so far.

The serial connection going active is normally expected to reset the boot loader. But not always so some times the manual button is needed to be pressed. Read the pages on the boot loader to understand variations and reasons. http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader

And read the section on the reset to understand the functions of it. these should help you follow what is going on when you load or need to load. http://playground.arduino.cc/Main/ArduinoReset

If normal press of the IDE upload does not start the upload, then you need to try the reset.

What FTDI driver are you using? 2.12.0.0? Does the marking on the FT232 chip look to be laser engraved/etched (real part), or painted on (counterfeit)?

Thanks for your answers.

@spicetraders: I will try that as soon as I can, thanks.

@CrossRoads: The driver has version 2.8.24.0. I decided not to update it, as the loop-back test passes and it therefore looks after something else but an FTDI problem to me.

The chip looks quite good. It has a proper laser engraving.

Was your last sketch sending out lots of data on the serial port, or using the Tx pin as an output? That can interfere with sketch downloads. Usual way to solve is to press & hold Reset, release it when the IDE shows "Compiled xxx of 32xxx bytes" or similar. Can take a couple tries to get the timing right. Turning on Verbose outputs (File:Preferences) can help there.

@CrossRoads: Well I have two boards with the same problem (as it seems). One was flashed with a user programm (exactly once), the other board was flashed with the blink example (exactly once). From then on I could not flash the boards any more. Note that the blink program does not send data on the TX pin.

To reset the board manually did not work for me. I tried it several times but I could not flash the board :(

I realized, that the board behaves different after a power reset (if I reconnect the usb cable) and after a user reset (when I push the reset button). It looks to me like the board would reset itself approximately 3-5 times in 1 second after a power reset. Is this behaviour normal?

It looks like I could solve the problem by flashing the boards with a new bootloader.

I will double check the functionality tomorrow and will keep you up to date.

EDIT: I could double check it and it works. So the distributor seems to deliver Arduinos with broken bootloaders. I am going to inform him about that.

I used this guide to reinstall the bootloader: http://sysexit.wordpress.com/2013/02/07/burning-a-bootloader-to-an-arduino-nano-using-another-arduino/