From: Frans S. <fra...@gm...> - 2010-05-31 06:51:04
|
Hi Matthijs, The timeout used to be on 5000, but I recently changed it to 1000 due to a bug in the Libusb-1.0 library for Windows. This bug caused the connection to the bootloader to timeout on a re-connect, so I just skipped its error message and reduced the timeout. If this is causing problems, I will put it back on 3000. btw, I have tested it on Linux Windows and Mac, but never got an error with 1000ms. Probably there is some difference in the hardware. Thanks for your message! Frans On 30-5-2010 19:26, Matthijs Kooijman wrote: > Hi, > > >> > when creating a few initial testing programs, I've been suffering from the >> > "Hardware should say OK" error message. After some investigation, it seemed as >> > if some hex files would consistently trigger this message, while others would >> > consistently work. Some more investigation shows that is the case that the >> > working programs work _most_ of the time, but not always. >> > I've mucked around in the PC application sources a bit, and it seems the error > is caused by an USB timeout in readString (which I gathered from adding a > cout line, since the wxLogError call that is in readString didn't show up > anywhere for me). > > As a hack I tried increasing the USB timeout (USB_OPERATION_TIMEOUT) from > 1000ms to 3000ms, which magically solved all my problems, including the > erasure problems (though I've only tested a handful times on the Linux PC, not > the Windows one). > > Could it be that the USB controller is causing this? Both machines I've tested > on are laptops with very similar hardware. > > Gr. > > Matthijs > |