pic32prog icon indicating copy to clipboard operation
pic32prog copied to clipboard

Program hangs??

Open mpavlica opened this issue 7 years ago • 8 comments

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?

mpavlica avatar Mar 31 '17 17:03 mpavlica

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.

sergev avatar Mar 31 '17 19:03 sergev

Send a9 76 And thats all

mpavlica avatar Mar 31 '17 19:03 mpavlica

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

sergev avatar Mar 31 '17 19:03 sergev

I am using Win7

mpavlica avatar Mar 31 '17 22:03 mpavlica

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

sergev avatar Apr 01 '17 04:04 sergev

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

mpavlica avatar Apr 01 '17 06:04 mpavlica

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 :-)

robert-rozee avatar Nov 10 '17 22:11 robert-rozee

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.

openshwprojects avatar Dec 20 '21 00:12 openshwprojects