UBW error 997 'USB Write Failed' on Vista  [SOLVED]

USB PICs and the UBW

Moderator: phalanx

UBW error 997 'USB Write Failed' on Vista

Postby lucky luke » Sun Apr 08, 2012 4:28 am

Dear all,

some years ago I studied electronics and now I want to work again on my software skills. Therefore, I bought a UWB, having the assumption that it would work without problems. Working with Vista (x84) can be seen as the root cause of problems but I am still convinced that it can work at my pc, as on all yours.

Well, I have installed MPlab with C18 compiler (mcc18).
I did step 1 to 7 from here and the UBW properly returned a firmware version on request.
I downloaded and compiled the 'hello world' demo program succesfull.
I did what is described here and ran into trouble.
The UBW is going into boot-mode properly. The PDFSUSB.exe recognizes the board and I can select it from the drop down.
After I did that, the error occurs 'USB Write Failed' error 997 Overlapping I/O operation is carried out.
I can click OK and select the HEX and the message return. When I click the program button, it returns and the bootloader program returns a failure of flash programming.
I tried compatibility mode, run in administrator mode etc. Nothing works. It is my own pc and I have no rights restrictions, regular pc with vista home x84.

Is there anyone that can help me to get rid of this error so I can start programming?
Any help is appreciated! Regards, Lucky Luke, the Netherlands.
lucky luke
Posts: 5
Joined: Sat Apr 07, 2012 11:57 am

Re: UBW error 997 'USB Write Failed' on Vista

Postby alandsidel » Sun Apr 08, 2012 6:49 pm

Luke have you seen this thread @ the microchip forums?

Another person there solved the same problem. Solution was going to the device properties in device manager and disabling power saving. It's not clear if he did this on the PICkit or the PIC board itself so.. just do it on both. ;)
Posts: 47
Joined: Thu Sep 23, 2010 10:54 pm

Re: UBW error 997 'USB Write Failed' on Vista

Postby EmbeddedMan » Sun Apr 08, 2012 8:24 pm

As a test, can you take the existing HEX file that comes with the Hello World project and properly program the UBW using the bootloader with that HEX file? (i.e. do not re-compile anything) If that works, then the issue is with the compiling of the Hello World code. If that doesn't work, then something is wrong with the bootloader or my generated HEX files.

Let me know either way-

User avatar
Support Volunteer
Posts: 1362
Joined: Sun Mar 05, 2006 9:23 pm

Re: UBW error 997 'USB Write Failed' on Vista  [SOLVED]

Postby lucky luke » Mon Apr 09, 2012 2:03 am

Dear all, thanks for the quick reply's.
I did see a topic before posting here, but I did not see the option to turn off the automatic power down.
It appears only when the UBW is in boot-mode. Then I could uncheck the box and the problem seems to be solved.
At least, I could program the device without errors, procramming flash completed.
>problem solved<
However, now this seems to be solved, I continued with a sime ADC program, and now the boot-block seems to be broken :cry:
I will start a new topic to solve this, I hope it is to fix without reprogramming the boot-section.
lucky luke
Posts: 5
Joined: Sat Apr 07, 2012 11:57 am

Return to USB Development

Who is online

Users browsing this forum: No registered users and 1 guest