-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avrdude fails at communicating with ATMEL-ICE in ISP mode with libusb-win32 device driver -- correct driver is Windows native HID driver #1617
Comments
Please use the official avrdude 7.2 release version to see if that helps. |
This is the version that avrdudess currently ships with. |
Please do not use the GUI but rather use the command line and post the debug output using Or you can still use the GUI but use the highest verbosity level and then post the output. |
Yet the other debugging option -- use an alternative avrdude 7.2 binary and see if that helps. The following is my build using MSYS2 MinGW64. The official avrdude 7.2 uses Windows MSVC64 build which may have issues with USB Compisite device.
|
Thanks for your input. I tried using different official versions from Avrdude without any success. I am simply trying to "detect" the device however I cannot communicate with the programmer. I will try in the command line and report back. One thing that I noticed is that pio uses an old version from back in 2016 (I was unable to determine exactly which one) |
One more try -- are you using the official driver from Microchip/Atmel? I do not have Atmel ICE so I do not know. It seems to me Microchip/Atmel is now using WinUSB driver more often for the tools (other than those USB HID devices). But I am not so sure about older tools like Atmel ICE. |
It seems to me that Atmel ICE should use native USB HID driver for AVR programming. Please use the Windows default USB HID driver and not libusb-win32 driver. Older version of avrdude does not support hidapi and that was why libusb-win32 driver was used. You should NOT use that if it is an USB HID device. Similar issues: Reference:
|
I will close this issue for now. Please reopen this issue if you still encounter the issue with the correct Windows native HID driver. |
On the other hand, I have added this issue to #1221. |
I have to report that on a new PC I could run the programmer without any issues on avrdude 7.2 using the stock driver from Microchip Studio. However, on the original PC where I ran my initial tests, I cannot revert back to HID or WinUSB driver. The device simply cannot be detected. I have tried MULTIPLE solutions I found online without any success. No matter what I do to try to uninstall the libusbK or libusb-win32 Windows 11 reverts back to those after uninstalling and replugging the programmer. I have updated Microchip Studio and repaired it however I am unable to find the right driver. Installing the WinUSB driver from Zadig doesn't help either. Any ideas? |
WInUSB driver is also not the correct driver due to the following known bug, which is of lower priority to fix since the correct driver is USB HID. You have to revert to the default Windows USB HID driver. |
BTW, I have changed the label to |
Dear @mcuee I truly appreciate your continuous support on this. After several attempts to remove drivers and not being able to find the HID drivers online, I suddenly made it work. However, I cannot pinpoint what the solution was. Right now, I can only see "Interface 1" under a libusb-win32 driver, however, the CMSIS-DAP was fortunately (and magically) configured by Windows under the HID driver: Something that I did to make it possible to continue working on my project with VSCode+ pio while using the latest version of avrdude was to replace the stock old version that comes by default with the pio environment with the latest version available here. This way, I can use either pio, avrdude or the GUI tool at the same time. Just to be clear, the reason why I jump between different ways of flashing my MCUs is that for quick debugging purposes I flash a test hex into my board and the easiest way to do that is via avrdudess (simply by loading the hex file) while for regular flashing of new code, I do it directly from VSCode. Previously, my workflow demanded using the drivers from Zadig, however, based on this issue and your kind explanations I have learnt that the way to manage the drivers with the latest revision is by NOT using the Zadig drivers anymore. I have even read that one should avoid at all costs using them since Zadig's tool does not offer the option to revert back to the HID driver (which is true). I will try to replicate this on another PC to make sure that the issue is fully solved. In the future I will slap myself to remind me not to install any alternative drivers with new avrdude versions 😉 |
In line with an issue I raised in the avrdudess GUI repo I must report that avrdude cannot communicate with ATMEL-ICE in ISP mode despite multiple resintallations of the libusb32 drivers
However, the platformio avrdude version does work without a problem
Using the
avrdude
that comes with the GUI from avrdudess I am unable to communicate with the programmerWhile when changing the avrdude target to the executable from pio the MCU gets detected without any problems:
Any ideas?
The text was updated successfully, but these errors were encountered: