Can't load or upgrade drivers on AVR-ISP MK2

Started by tdodds, October 28, 2017, 02:22:19 AM

Previous topic - Next topic

tdodds

I need to get the AVR- ISP MK2 programming interface to work with AVRdude so I'm trying to modify its firmware using my WIN10 computer per the installation manual.
Following the installation instructions, Step 4 says it should show up in the device manager under "Atmel USB Devices", but mine showed up under" libusb-win32 devices"
I tried to go ahead, but under Step 6 when trying the AVRdude test under the command prompt  (avrdude –p m16 –P usb –c avrispmkii –B5) I get the error message:
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.
I also tried to use the Flip program to try to load firmware, but when I push the physical "upgrade" button on the AVR-ISP MK2 the chip shows up in my device manager as "other devices/ AT90USB162DFU". Is this "DFU" suffix an issue?
I tried to go ahead and use Flip, but when I try " settings/communication/USB"  I get the error message "Could not open USB device".
Please help.

JohnS

I don't use Windows but a web search for AT90USB162DFU shows things like
USB DFU Bootloader Datasheet - Atmel
and Device Firmware Upgrade (DFU)

You can probably find more about your problem on this site or using web search but as I mentioned I don't use Windows.

John

LubOlimex

Not sure if this is a problem with the drivers. When you test the command do you have ATmega16 properly attached to the 10-pin ISP connector? Note that AVR-ISP-MK2 has no 6-pin ISP connector. Did you power the target? If you intend to power it from AVR-ISP-MK2 make sure to set the jumpers properly.

About switching drivers. Try to manually switch the drivers. Right-clicked over the entry for the debugger in "Windows Device Manager" –> "Update Driver Software" –> "Browse My Computer For Driver Software" –> "Have disk" -> point to the inf file inside the archive with the drivers -> "OK" –> "Next" –> if a warning pops-up ignore it –> "Finish".

If the problem persists try to manually cycle through all available drivers - right-click over the entry for the debugger in "Windows Device Manager" –> "Update Driver Software" –> "Browse My Computer For Driver Software" –> "Let me pick from a list of device drivers on my computer" –> then a list of available drivers pops-up and select the first entry –> "OK" –> "Next" –> if a warning pops-up ignore it –> "Finish". Then test if this driver works; if it doesn't then start all over and select the second one from the list and test again; repeat until you find the working driver from the list.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

tdodds

To Lub,

You misunderstand, I need to upgrade the software on the programming tool itself before I can connect an actual chip. I need to put in interface drivers for AVRdude using Flip. The AT90USB162 chip is on the AVR-ISP-MK2 interface.

LubOlimex

You don't need to change firmware to use AVR-ISP-MK2 with the latest versions of AVRDUDE under Windows 10. Test with this AVRDUDE release: http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip
Technical support and documentation manager at Olimex

tdodds

I'm nut using AVRdude, I am using BASCOM-AVR. MCS (the vendor of BASCOM-AVR) says I need the AVRdude firmware in the programmer for their software to work. Also, I am actually running BASCOM-AVR on a different PC running XP. I was just trying to use my WIN10 PC to make loading the AVRdude firmware "easier" since I got all balled up in Device Driver wierdness (can't find files. etc) when I tried to upgrade the AVR-ISP MK2 programmer on that machine.
What I want is just for your documentation to work or you to give me some instructions that will work to load AVRdude into the AVR-ISP MK2.
Ultimately what I need is for my BASCOM-AVR software (running in my XP PC) to recognize your Olimex AVR-ISP MK2 programmer.

LubOlimex

You definitely need to change the firmware for XP operation. Note that the firmware required and drivers required for Windows XP and Windows 10 are different. This means that even if it works under Windows 10 it doesn't mean it would work under Windows XP at all. So after you upload the firmware using Windows 10 (after you push button, using Atmel Flip), directly switch to the XP machine to try to get it working with Bascom.

Now I don't know about XP but I've used Bascom successfully under Windows 7. Under Windows 7 I had LibUSB drivers installed. Refer to the pictures of this archive: ftp://staging.olimex.com/Lub-clients/win7-bascom.zip

Make sure to test different firmware and drivers under XP. Maybe test with older firmware versions from the archive: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR-ISP-MK2-Firmware-WindowsDrivers.zip
Technical support and documentation manager at Olimex

tdodds

That's the present problem. The Flip program won't load the firmware. When I push the physical  button on the AVR-ISP MK2 the chip on the programmer shows up in my device manager as "other devices/ AT90USB162 DFU".
I tried to go ahead and use Flip, but when I try " settings/communication/USB"  I get the error message "Could not open USB device". So how to get Flip to work to change firmware in the Olimex AVR-ISP MK2?

LubOlimex

I checked in two different computers - one Windows 10 machine and one Windows XP machine - when in bootloader mode, the board gets listed in "libusb-win32 devices" section. This is a screenshot from the XP machine:

Technical support and documentation manager at Olimex

tdodds


On my win10 machine the programmer comes up under "other devices" in bootloader mode and has the "DFU" suffix added.
I don't know how to send you a screenshot, perhaps you could let me know.

In the XP machine I get the "New Hardware Wizard" and it won't recognize the files in the "FIRMWARE_FOR_AVRDUDE" driver folder. How did you get the drivers loaded on your XP machine?

I tried it in a third PC with WIN7, and the programmer comes up under "Other Devices" on it also.

I bought two of these AVRISPMK2 programmers and they both do the same thing. Is it possible that these particular ones have a different chip than the one you are using? Can I buy the one you have already tested and/or firmware-upgraded?

LubOlimex

You probably didn't point to the FLIP folder to install the drivers. Page 14 of the manual, chapter "4.2.1 Changing firmware for Windows users" point 2 says:

"Download and install the Atmel Flip software. Check in device manager if the device is recognized as AT90USB162 if it isn't search for proper drivers in Atmel Flip installation folder."

So the drivers for Flip are in the Flip install folder, not in the archive with Olimex drivers...

<<< Is it possible that these particular ones have a different chip than the one you are using? Can I buy the one you have already tested and/or firmware-upgraded?

No. It is just that Atmel drivers are a mess and it might be hard to configure them properly in the begining. They used third-party company Jungo to provide drivers for their tools at some point, then started making own drivers then different versions of Atmel Studio require different versions of drivers, different versions of Windows require different versions of drivers, and so on.

Technical support and documentation manager at Olimex

tdodds

Thanks, I loaded the new driver for Flip and then was able to modify the device driver in the programmer attached to the WIN10 machine. I loaded the driver;AVR-ISP-MK2-Firmware-WindowsDrivers/ Firmware_Drivers/ FIRMWARE-FOR-AVRDUDE-LIBUSB / libUSB-AVRISP-MKII.hex into the programmer.

The next step in the instructions is to try AVRDude with the programmer using the command: "avrdude -p m16 -P usb -c avrispmkii -B5" (optional Step 6 under Section 2.3)
This gives me the error message: "error in USB receive" and "timeout communicating with programmer".

In any case, I still have to get this working on my XP machine. I tried the modified programmer in the XP machine and I just get the "New Hardware Wizard" I tried directing to the AVR-ISP-MK2 driver folder but that doesn't work.
The documentation doesn't how to load XP driver.
How do I load the device driver for the AVR-ISP-MK2 under XP?

LubOlimex

At least it is a step forward in succeeding to update the firmware!

Things are different for Windows 10 and Windows XP. I would detail each case below:

- Windows 10: For Windows 10 and new version of avrdude, you need to use the firmware suitable for AVR/Atmel Studio (not "libUSB-AVRISP-MKII.hex" but "AVR456-studio-AVRISP-MKII.hex"). You can find the suitable firmware in this archive: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR456-studio-AVRISP-MKII.zip - again use Flip to switch to that firmware. After the update is finished, disconnect the unit, connect it again and make sure it uses exactly these drivers: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/DRIVER-MK2-AS-6-7-W10.zip When testing AVR dude with the command from the manual you need an ATmega16 target attached to the programmer. Make sure that you either power the target externally or you have configured the jumpers properly so that AVR-ISP-MK2 provides the required voltage and current.

- Windows XP: For Windows XP and "some" version of avrdude, you need to use the firmware that you managed to load - "libUSB-AVRISP-MKII.hex". It is located in the archive here: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR-ISP-MK2-Firmware-WindowsDrivers.zip - the drivers inside this archive that are suitable for Windows XP are located in sub-folder "FIRMWARE-FOR-AVRDUDE-LIBUSB\LibUSB drivers". If pointing to the folder doesn't work, point to "avrisp2.inf". Also install the filter "install-filter.exe" and test of the driver was installed with "testlibusb-win.exe". If you still have problems with the drivers, try using Zadig for XP: http://zadig.akeo.ie/downloads/zadig_xp_2.2.exe - make sure to install the libusb-win32. Also make sure that the JUNGO drivers are completely uninstalled else they would get hold of the unit.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

tdodds

Thanks so much for your patient help.
The AVR-ISP MK2 programmer is working 100% on my XP machine with BASCOM-AVR!