Author Topic: Another problem - "timeout communicating with programmer"  (Read 3559 times)

0 Members and 1 Guest are viewing this topic.

Offline RefrigeratorTopic starter

  • Super Contributor
  • ***
  • Posts: 1552
  • Country: lt
Another problem - "timeout communicating with programmer"
« on: March 20, 2016, 06:34:31 pm »
So after sorting out the other problem another one arises, this time during build it looks like the PC is expecting the Nano to respond but gets nothing in return.
The Nano is connected and is receiving data from the PC since the RX LED flashes every 5 secs, and the build would terminate immediatly after starting when the Nano is unplugged.
This here is what i see when attempting to build:
Quote
"C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files\Arduino\hardware\tools\avr\etc\avrdude.conf" -c stk500v2 -b 115200 -p atmega328p -P COM6 -U flash:w:"C:\Documents and Settings\2029-pc\My Documents\teacup\Teacup_Firmware-master\teacup.hex":i
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_command(): failed miserably to execute command 0x10
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
avrdude.exe: stk500v2_command(): failed miserably to execute command 0x11
avrdude.exe: stk500v2_disable(): failed to leave programming mode
avrdude.exe done.  Thank you.
RC = 1 - Build terminated
Upload terminated abnormally.

Can't figure this one out, but one line cought my eye:
Quote
Double check connections and try again, or use -F to override
             this check.
So i can override this test and i guess it should upload but i don't know where to set the "-F" to do so.
This turned out to be much more hassle than anticipated and i need a little help.
Thanks.
Otherwise ArduinoIDE works fine so i'm not sure why it wouldn't work witht the Teacup Firmware.  :-//
I have a blog at http://brimmingideas.blogspot.com/ . Now less empty than ever before !
An expert of making MOSFETs explode.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: au
    • Halestrom
Re: Another problem - "timeout communicating with programmer"
« Reply #1 on: March 20, 2016, 10:16:57 pm »
-F simply tells  avrdude to send all of the programming instructions even if it it could not properly identify what it is programming.  Unless you have damaged the device signature (or other parts of the AVR) yourself, this generally means something is wrong at the communication level.

According the this page the nano uses the stk500 protocol.  Perhaps there is a difference between stk500 and stk500v2 that is causing the problem.  Try avrdude with the former.

Note that the Arduino IDE uses avrdude itself.  If you can program the board using the IDE then you will also be able to program it with avrdude.

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Another problem - "timeout communicating with programmer"
« Reply #2 on: March 20, 2016, 10:33:30 pm »
"timeout communicating with programmer"

Happens all the time talking to people I work with.  :-DD
 

Offline RefrigeratorTopic starter

  • Super Contributor
  • ***
  • Posts: 1552
  • Country: lt
Re: Another problem - "timeout communicating with programmer"
« Reply #3 on: March 21, 2016, 06:12:40 am »
-F simply tells  avrdude to send all of the programming instructions even if it it could not properly identify what it is programming.  Unless you have damaged the device signature (or other parts of the AVR) yourself, this generally means something is wrong at the communication level.

According the this page the nano uses the stk500 protocol.  Perhaps there is a difference between stk500 and stk500v2 that is causing the problem.  Try avrdude with the former.

Note that the Arduino IDE uses avrdude itself.  If you can program the board using the IDE then you will also be able to program it with avrdude.
Setting the programmer to STK500 didn't help.
Quote
""C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files\Arduino\hardware\tools\avr\etc\avrdude.conf" -c stk500 -b 115200 -p atmega328p -P COM6 -U flash:w:"C:\Documents and Settings\2029-pc\My Documents\teacup\Teacup_Firmware-master\teacup.hex":i
avrdude.exe: stk500v2_ReceiveMessage(): timeout

I'm using the CH340G version of arduino nano maybe that could be the problem ?
« Last Edit: March 21, 2016, 06:16:02 am by Refrigerator »
I have a blog at http://brimmingideas.blogspot.com/ . Now less empty than ever before !
An expert of making MOSFETs explode.
 

Offline Robartes_m

  • Contributor
  • Posts: 21
  • Country: be
Re: Another problem - "timeout communicating with programmer"
« Reply #4 on: March 21, 2016, 07:02:48 am »

I'm using the CH340G version of arduino nano maybe that could be the problem ?
[/quote]

The UART to USB chip (CH340G in your case) does not enter into play when programming the micro through a programmer. Double check your connections from the programmer to the Nano. You need VCC & GND, MOSI, MISO, SCK and /RST .
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf