Avrdude "not in synch" Error With USBASP

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is probably a simple matter, but whenever I try to run a command to a so-far-unused USBASP device, I get this error:

 

>avrdude -c stk500v1 -p m8 -P com1

avrdude: stk500_getsync<>: not in sync: resp=0x00

 

Different command lines always come up with the same error. 

 

O/S is Win7, nothing else extraordinary going on.

 

Many thanks for any useful tips!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This gets incredibly frustrating.  Apparently "avrdude: stk500_getsync<>: not in sync: resp=0x00" is all the response I will get from avrdude with ANY device, EVER.

 

I am trying at this point to get either of two USBASPs and an Arduino Uno and all combinations thereof to at least show a sig.

 

Going from the Uno to either USBASP #1 or #2, I use the command:

 

avrdude -c stk500v1 -p m8 -P com5 -b 19200 -v

 

and get the above error.  This used to work! frown

 

Going from USBASP#1 to USBASP #2 I use the command:

 

avrdude -c stk500v1 -p m8 -P com1 -v

 

I get the same error.

 

Going from usbasp #2 to usbasp #1 I get the same error.

 

Seriously, what's going on here?   O/S is Windows 7.   Nothing obviously strange anywhere.

 

Many thanks for any answers!

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does the target (Arduino Uno) have power on it?

Can you post a picture of your setup?

 

 

Jim

 

Click Link: Get Free Stock: Retire early!

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Go on. USBASP is a USB device. You do not give it baudrate or COM arguments.
Post a link to the actual USBASP that you have bought. A proper $3 Chinese dongle should work fine.
Quote the actual commandline. You will get proper advice.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Go on. USBASP is a USB device. You do not give it baudrate or COM arguments.

 

OK, no COM arguments.  The baudrate was in the line for the Uno > usbasp.

 

Quote:
Post a link to the actual USBASP that you have bought. A proper $3 Chinese dongle should work fine.

 

Here's the new  usbasp #2, probably the most common one on the internet:

 

Here is usbasp #1 which you may recall our reflashing in an earlier chapter:

 

 

Either of these usbasp devices show up in Device Manager as working properly when plugged in.

 

 

Here's the Uno/usbasp:

 

 

Which is wired to the usbasp like:

 

Arduino Pin Number

10 RESET

11 MOSI

12 MISO

13 SCK

GND GND

 

And 5V out for the VCC 

Quote:
Quote the actual command line.

 

For usbasp #2 into usbasp #1 (or vice-versa):

 

avrdude -c stk500v1 -p m8

 

OR

 

avrdude -c stk500v1 -p m8 -v

 

...both get the same concluding error:

 

avrdude: stk500_getsync<>: not in sync: resp=0x00

 

The Arduino Uno going into either usbasp #1 or #2 using the command line:

 

avrdude -c stk500v1 -p m8 -P com5 -b 19200 -v

 

...both get the same old, tiresome error

 

avrdude: stk500_getsync<>: not in sync: resp=0x00

 

The odd thing is that this worked previously.

 

Quote:
You will get proper advice. . David.

 

Well, here's hoping.  Thanks!

Last Edited: Fri. Jun 22, 2018 - 02:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TrueBlue wrote:

 

Quote:
You will get proper advice. . David.

 

Well, here's hoping.  Thanks!

 

[Crickets chirping...]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TrueBlue wrote:

>avrdude -c stk500v1 -p m8 -P com1

avrdude: stk500_getsync<>: not in sync: resp=0x00

 

Where did you get the command line using "-c stk500v1"?

 

Try 

        >avrdude -c usbasp -p m8 -v

 

Edit: Ignore the lines below this line - I can't get rid of them.

 

avrdude -p m328p -c usbasp -v
avrdude -p m328p -c usbasp -v
Last Edited: Tue. Jun 26, 2018 - 05:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies.   Thanks for the photos.    Especially that you have numbered #1 and #2 board.

 

Both USBASP boards should work fine.   They both have 5x2 headers.   The Uno has a 3x2 ICSP header.

Your third photo shows what might be a 5x2 to 3x2 Adapter.

 

I strongly advise that you use a 3x2 Adapter and 6-way ribbon to plug into the Uno ICSP header.

avrdude -c usbasp -p ATmega328P

You can also try connecting to your USBASP#1.  

Connect both with the 10-way ribbon.   

put jumper on #1 JP2. 

put jumper in 5V position JP1.

 

Plug USBASP#2 into PC.

avrdude -c usbasp -p ATmega8

Remove JP2 afterwards.

 

You can repeat the second operation with USBASP#2 as target if you solder 2x1 male header in the JP2 holes.

 

If I am wrong about the 3x2 Adapter,   I strongly suggest that you buy or make one for yourself.    And use proper 6-way ribbon instead of jumper cables.    If you do use jumper cables,  write down which colour jumper joins which header pins.   And show clear photos that enable other eyes to check your words.

 

Yes,  you can use a Uno as ArduinoISP but it is less convenient than a USBASP with proper matching ribbon cables.

 

Once you have verified that both USBASP boards work,  you can try reading more than just the Signature.

 

Please report back.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Your third photo shows what might be a 5x2 to 3x2 Adapter.

 

It is.

 

Quote:

avrdude -c usbasp -p ATmega328P

 

You can also try connecting to your USBASP#1.  

Connect both with the 10-way ribbon.   

put jumper on #1 JP2. 

put jumper in 5V position JP1.

 

Plug USBASP#2 into PC.

avrdude -c usbasp -p ATmega8

Remove JP2 afterwards.

 

You can repeat the second operation with USBASP#2 as target if you solder 2x1 male header in the JP2 holes.

 

You may remember that these had different JP2s, but initial tests seem to indicate that these are all OK.

 

What I really need at this point, though, is a command line program that can cut & paste, unlike awful old Windows CMD, which is just beyond praying for.

 

Any suggestions on this?  I can't post results otherwise.

 

Thanks!

 

Last Edited: Tue. Jun 26, 2018 - 12:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck99 wrote:

Where did you get the command line using "-c stk500v1"?

 

From a thread on a wildly defective usbasp #1, which we apparently corrected.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Oops. The 3x1 header to select 3.3V, 5V, NC. should be called JP1
The 2x1 header next to it selects self-program, NC
.
Yes, your #1 has the wrong legends. #2 is correct.
.
In practice, I always use the bootloader with Arduino.
With AS7, I created External Tool entries for Bootloader(s) and USBASP targets.
.
I do not have to type the full avrdude command.
Likewise, I have a BAT command if I want to use directly from the commandline.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TrueBlue wrote:
What I really need at this point, though, is a command line program that can cut & paste, unlike awful old Windows CMD, which is just beyond praying for.
I copy/paste to the Windows command prompt all the time but note that it is NOT Ctrl-C and Ctrl-V. To copy highlight the selected text with the mouse then hit ENTER. That copies the text to the clipboard. When you have text on the clip board you want to paste then click the right mouse button. For example I want to type the contents of a .c file so...
 

results in...

 

And if I now want that text in a post here I highlight it and hit ENTER:

 

then start the code editor here and Ctrl-V:

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#define ROWS 3
#define COLS 5

int main(void) {
        uint16_t * foo;
        uint16_t (*bar)[COLS];
        int x, y, i;

        foo = (uint16_t *)malloc(ROWS * COLS * sizeof(uint16_t));
        bar = (uint16_t (*)[COLS]) foo;
        for (y = 0; y < ROWS; y++) {
                for (x = 0; x < COLS; x++) {
                        bar[y][x] = (y * COLS) + x;
                }
        }
        for (i = 0; i < (ROWS * COLS); i++) {
                printf("%d = %d\n", i, foo[i]);
                if (i % COLS == (COLS - 1)) {
                        printf("\n");
                }
        }
        return 0;
}

The only possible "trick" in all this is...

 

 

Make sure that this setting is stored as the default for every "Command Prompt" you open.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah-ha.   I did not know that this was possible !!

 

My PC has given me PowerShell ever since I foolishly let it go from Win7 to Win10.

Powershell allows you to copy-paste in the conventional manner.   But everything else is pretty horrible.

 

All I need now is to find out how to get back to cmd.exe.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, here's usbasp #1 alone:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8 -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90
00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

 

Here's usbasp #2 alone:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8 -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90
00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

 

 

Here's usbasp #1 reading the Arduino:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p ATmega328p -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  36
00 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  45
00 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as 5

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

 

I'm not getting anything much with the J2 connected on the usbasp units alone with the command:

 

>avrdude -c usbasp -p m8

 

...except the LED going out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8 -v

...

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07

 

Something a little odd there then? 1E 95 0F is a mega328P so why are you using

 

-p m8

 

? Surely it should be "-p m328p"  if the chip you are connecting to is actually an atmega328p ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8 -v

...

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8 is 1E 93 07

 

Something a little odd there then? 1E 95 0F is a mega328P so why are you using

 

-p m8

 

? Surely it should be "-p m328p"  if the chip you are connecting to is actually an atmega328p ?

 

It certainly is strange!  There's nothing connected to it.  It was just a self-test.

 

And I can't get it to repeat it:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8 -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90
00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

 

Last Edited: Wed. Jun 27, 2018 - 03:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well clearly that previous dialog did contact a chip and that chip did report that it was a 328p. What do the markings on the chip say?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I give up. I gave you some pretty clear instructions. e.g. JP1 3x1 set to 5V. JP2 2x1 either open or closed.
.
Regular programming is with JP1 set to 5V. JP2 open. Connect 6-way ribbon to Uno. Both USBASP #1, #2 should read Uno signature.
.
Reading USBASP's signature requires one USBASP as regular JP2 open and target USBASP with JP2 closed.
.
I don't want to see a whole load of verbose output.
I just want to see a CLEAR description of your wiring (or a photo).
And what command with what reply.
.
It looks as if #1 reads the Uno just fine.
Now read the Uno with #2.
.
David..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK signature on both usbasp #1 and #2 into each other with J2 engaged on the target are:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p m8

avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e9307

avrdude: safemode: Fuses OK

 

Usbasp #2 into the Arduino Uno:

 

C:\Users\ANONYMOUS>avrdude -c usbasp -p ATmega328p

avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

 

Does that look OK?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That was easy. Both your USBASPs are working fine.
.
There is no need to change any firmware unless you want to program some obsolete AT89 parts.
.
You never need to close the 2x1 header.
I often use the 3V or 5V setting when powering external boards.
Or use the NC setting when the target is already powered.
.
David.

Last Edited: Wed. Jun 27, 2018 - 05:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
That was easy. Both your USBASPs are working fine.

 

Good, thanks.  I knew it was probably something simple.

 

I'll let you lie awake nights wondering how avrdude magically saw that 8 chip as a 328p.