sergev / pic32prog

Flash programming utility for Microchip PIC32 microcontrollers
GNU General Public License v2.0
111 stars 52 forks source link

Program hangs?? #48

Open mpavlica opened 7 years ago

mpavlica commented 7 years ago

When I attach PICKIt2 or PICKIT3 and run software, all I get is message, Programmer.... and Copyright info and it sits there forever. If i unplug USB, it says Pickit2: error receiving packet. PICKIT2 is plugged in a board, and when i run PICKIT2 software, it works fine and it does recognize PIC32MX360F512 Same problem with PICKIT3. What can be issue?

sergev commented 7 years ago

Can you please try running pic32prog with triple debug option? For example: pic32prog -D -D -D

It will show a trace of data exchange between pickit2 and pic32prog.

mpavlica commented 7 years ago

Send a9 76 And thats all

sergev commented 7 years ago

No reply from pic32prog. Probably something is wrong with USB driver or access permissions. Try "sudo pic32prog -D -D -D".

mpavlica commented 7 years ago

I am using Win7

sergev commented 7 years ago

Try to run pic32prog as administrator. I mean, create a bat file, right click on it as choose "run as administrator".

mpavlica commented 7 years ago

Nope, still the same... And this happens on couple Win7 computers...

robert-rozee commented 6 years ago

the problem exists in version .220 of pic32prog, but NOT in version .193 see this discussion: http://www.thebackshed.com/forum/forum_posts.asp?TID=9992&PN=1&TPN=2

what changes to USB support were made between .193 and .220? unfortunately i don't have a pickit2/3 available at the moment to do any testing myself.

cheers, rob :-)

openshwprojects commented 2 years ago

The issue still persists and it happens to on multiple Windows machines with multiple PICKIT2 programmers. Example console output:

Programmer for Microchip PIC32 microcontrollers, Version 2.0.220
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: PICkit2 Version 2.32.0
PICkit2: invalid status = 000a

No target found.

I have managed to narrow down the issue to the HID library used.

It seems that HID backend was changed between .193 and .220. To be exact, the old HID implementation (WDK hidsdi.h) was working and the new hid backend (hidapi library) is not working correctly.

I have just replaced the new hid backend with old one for newer revisions and they work as well.