AVRISP MKii driver

Folks,
Does this look like the right Programmer driver? All of a sudden I am not able to bootload 328Ps.
This is the installed driver, the IDE is complaining about it.

C:\Arduino 1.8.5\hardware\tools\avr/bin/avrdude -CC:\Arduino 1.8.5\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 


avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "C:\Arduino 1.8.5\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)


avrdude done.  Thank you.


Error while burning bootloader.

Tried older versions of IDE, (1.0.6, 1.6.9), am seeing the same error.
Did Windows (7 Pro still) update it on me and make it unusable by the IDE or something?

If I Uninstall and let Windows install an older version, it still fails.

         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200097044
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 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 : STK500V2
         Description     : Atmel STK500 Version 2.x firmware
         Programmer Model: AVRISP mkII
         Hardware Version: 1
         Firmware Version Master : 1.24
         Vtarget         : 5.2 V
         SCK period      : 8.00 us


avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.




avrdude done.  Thank you.


Error while burning bootloader.

This kind of pisses me off, the AVR ISP MKii has been my programmer since like 2012.

What follows was written before your last reply, but it still might be worth trying libusbK:


Did you try Atmel Studio recently? That replaces the AVRISP mkII driver with one that is incompatible with AVRDUDE. Years ago, when it happened to me, the Atmel Studio (AVR Studio at that time) driver was called "Jungo", but that might have changed.

I believe the driver traditionally used with AVRDUDE is libusb-win32, but I have been using the libusbK driver. That fixed the problem with the Arduino IDE's Tools > Burn Bootloader, where the AVRISP mkII doesn't reinitialize fast enough for the second avrdude command. That problem was also solved with the modern AVRDUDE version, but you might still find some Arduino boards platforms that haven't been updated to use the modern AVRDUDE version.

You can install libusbK or libusb-win32 using Zadig:

  1. Download Zadig: http://zadig.akeo.ie/
  2. Plug in your AVRISP mkII
  3. Start Zadig
  4. From the dropdown menu, select "AVRISP mkII". If it doesn't show up on the menu, then select Options > List all devices and check again.
  5. Click the up or down arrows next to the Driver selection box on the right side until you see "libusbK".
  6. Click the Replace Driver button.
  7. After the driver installation process finishes, you can close Zadig.

By the way, it is supposedly possible to have both the Atmel Studio and AVRDUDE-compatible drivers co-exist, though I haven't tried it because I no longer use Atmel Studio:
https://www.avrfreaks.net/forum/tuttools-libusb-and-jungo-drivers-can-work-together

1 Like

I had this set to go - will try the Zadig route next.

But what I started to post was:

And this is even more irritating. It can burn the fuses, yet it can't upload the bootloader?

         Programmer Type : STK500V2
         Description     : Atmel STK500 Version 2.x firmware
         Programmer Model: AVRISP mkII
         Hardware Version: 1
         Firmware Version Master : 1.24
         Vtarget         : 5.2 V
         SCK period      : 8.00 us


avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.00s


avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):


Writing | ################################################## | 100% 0.00s


avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:


Reading | ################################################## | 100% 0.00s


avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0x05"
avrdude: writing efuse (1 bytes):


Writing | ################################################## | 100% 0.00s


avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: input file 0x05 contains 1 bytes
avrdude: reading on-chip efuse data:


Reading | ################################################## | 100% 0.00s


avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDE"
avrdude: writing hfuse (1 bytes):


Writing | ################################################## | 100% 0.00s


avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDE:
avrdude: load data hfuse data from input file 0xDE:
avrdude: input file 0xDE contains 1 bytes
avrdude: reading on-chip hfuse data:


Reading | ################################################## | 100% 0.00s


avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):


Writing | ################################################## | 100% 0.01s


avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:


Reading | ################################################## | 100% 0.00s


avrdude: verifying ...
avrdude: 1 bytes of lfuse verified


avrdude done.  Thank you.


C:\Arduino 1.6.9\hardware\tools\avr/bin/avrdude -CC:\Arduino 1.6.9\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -Uflash:w:C:\Arduino 1.6.9\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m 


avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch


         System wide configuration file is "C:\Arduino 1.6.9\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb"
Error while burning bootloader.

That's the bug with the old avrdude versions I mentioned in my previous reply:
https://github.com/arduino/Arduino/issues/2986
It was fixed for me by the update to avrdude 6.3.0. But I was also able to fix it when using the older avrdude versions by using libusbK.

Awesome, thanks pert, that took care of it. I haven't used Atmel Studio in years, and last time I used my AVRISP MKii about a month ago I had no issues. The only since then was Windows dropping Win7 support, but I didn't think that impact existing drivers.

Back in business again now ...

Dang, I must have a bad chip. One boards bootloads and Downloads fine, once won't bootload.