I have been having major grief with my uLink2 of late, rendering it virtually unusable!
:-(
I've had it about 4 months with just the usual occasional annoyances of lost comms - then it just went totally stupid!
I'm working with an STM32 target, downloading an AXF file.
After clicking the 'Load' button, I get the 'USB communication failure', or uVision will hang.
Other projects, and earlier versions of the same project, would work fine - it seemed to be something specific to the particular AXF file!
The same AXF file would work fine on another PC of mine, and my Client was able to use it OK - so then it looked like something funny with the particular Toshiba P300 Laptop. But then, on a visit to the Client, it was fine on that Toshiba!
I have now just stumbled on something: it seems that the uLink2 behaves fine on the Toshiba provided I remove all other USB HIDs (mouse, keyboard)
So, has anyone else had similar troubles with a uLink2?
Or, if you are having trouble with your uLink2, have you tried disconnecting all other USB HIDs?
Do any of the USB experts here have any ideas what might be going on?
Sorry for the rambling, but it's been one of those issues...
I haven't been using the ULink2 for almost a year. If I do, I lock up UV several times/day, requiring a reboot of the computer to be able to use ULink again. Hopefully, this problem will go away when I get a new computer - several UV updates have not made a difference. It locks up deep down in a critical section, and Keil can't reproduce it.
Per, Andy, I burned by ULink2 a couple of weeks ago [don't ask me how; I'm still ashamed of it :-) ] but I never really had trouble with it. In case of a hang, disconnecting its USB cable was enough to "shake" uv3 and get it to work again. I'm back to using ULink1 now...
I want to make a switch ethernet, 2 port. is it maybe ?
Yes, I did have "nice" hangs only requiring it to be unplugged. But also daily hangs where UV3 permanently locked up in a critical section, staying there even if I did remove the ULINK2. Since UV3 was hung in a critical section in the kernel, it wasn't possible to end it, and the USB driver was permanently down so disconnecting the unit would not unload the device. Most of the time, Windows is able to reboot but maybe one-in-five Windows needs to be restarted with reset since the shutdown sequence hangs indefinitely.
I worked recently about 30 hrs a week with ULINK. A hang about every second day or so - not bad in my opinion.
Requiring a forced reboot or just a reconnect?
Yes, I would've been doing at least that before the trouble first appeared!
"A hang about every second day or so - not bad in my opinion."
If your keyboard hung an application every other day, would you consider that "not bad"?
If your mouse hung an application every other day, would you consider that "not bad"?
The uLink troubles teach us good lesson of robust USB implementation.
a) On the host app, call USB Read / Write (such as ReadFile/WriteFile) asynchronously (OVERLAPPED). Even when the device hangs on the interrupt/bulk endpoint, your host app detects timeout, and cancels the call. To recover from hang, send a class request (for HID, Feature report), reset the hanged process on the device side.
b) On the host app, detect surprise removal of the device using WM_DEVICECHANGE (RegisterDeviceNotification()). On surprised removal, close the USB device handle and kill the USB communication thread. Then, plugging off the USB cable recovers the hang without rebooting the PC. On the device side, bus-powered device like uLink2 gets reset by power-cycle.
For the host app for HID, see Jan's implementation of WM_DEVICECHANGE.
generic_hid_cs on The HID Page (http://www.lvr.com/hidpage.htm) www.lvr.com/.../generic_hid_cs_451.zip DeviceManagementDeclarations.cs DeviceManagement.cs
Tsuneo
As of the original post, "I have now just stumbled on something: it seems that the uLink2 behaves fine on the Toshiba provided I remove all other USB HIDs (mouse, keyboard)"
Sound like PC hardware and/or noise problem around the USB connector, or the internal hub of the laptop.
Can you suggest any tips, tools, etc to pin this down? (I'm purely a user as far as USB goes - not a developer!)
It does seem to be the USB mouse that causes (or provokes?) the problem(s).
Both the mouse & keyboard are via a hub (the same hub); it doesn't make any difference whether the uLink2 is also in that hub, or direct to the laptop.
Umm... I remember that BIOS and firmware update sometimes fix unstable hardware. Search the update for your Toshiba P300 Laptop.
BIOS Downloads " href= "http://uk.computers.toshiba-europe.com/innovation/download_drivers_bios.jsp?service=UK"> uk.computers.toshiba-europe.com/.../download_drivers_bios.jsp
Also, Windows Service Pack, too
Just had another episode of USB stupidity on this PC.
This time nothing to do with Keil or uLink - but COM ports (specifically, on a BAFO USB-to-RS232 adaptor).
I noticed that Device Manager was showing a "Microsoft Ballpoint Mouse" (or even mice) being spuriously detected on those COM ports.
I found this article: www.pcmaritime.co.uk/.../jumpingmouse.html It recommends adding /NoSerialMouse as a Windows startup option
I've made the change - now we'll see if things improve...
I have no idea whether this may or may not be related to my earlier uLink problems...
PS
Microsoft say that /fastdetect should disable serial mouse detection: support.microsoft.com/.../833721 - but I already had that option set, so its obviously not entirely true!
Some more info here: support.microsoft.com/.../283063