10 years, 9 months ago.

KL25 USB port (not openSDA) does not function on some pcs

As the title says, I have an issue that it doesn't look I can solve myself. The USB port of the KL25Z does not function on my laptop. The openSDA port works fine, but the one connected to the KL25Z itself does not. I tested it with MSD, serial and usb mouse, everytime my windows 8 laptop (Asus N56z) says something went wrong. I also put it in a windows 7 desktop computer, and there it worked fine.

I manually uninstalled its drivers, plugged it in again, it installs drivers again, and same result. I tried the same code on an LPC1768 mbed, and that works fine. Also tried changing VID/PID, didn't help either. I tried pretty much every USB cable I have here, including a very short one, no result.

What windows shows in device manager: /media/uploads/Sissors/mbed_kl25_usbmsd.png

It is a bit random for MSD if it shows it as an MSD device, or just unknown device.

And after enabling debugs in USBDevice:

dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 64
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 0
Type: 0
Recipient: 0
bRequest: 5
wValue: 19
wIndex: 0
wLength: 0
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 18
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 64
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 0
Type: 0
Recipient: 0
bRequest: 5
wValue: 20
wIndex: 0
wLength: 0
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 18
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 64
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 0
Type: 0
Recipient: 0
bRequest: 5
wValue: 21
wIndex: 0
wLength: 0
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 18
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 64
get descr: type: 1
device descr
EP0IN
dataTransferDirection: 0
Type: 0
Recipient: 0
bRequest: 5
wValue: 22
wIndex: 0
wLength: 0
EP0IN
dataTransferDirection: 1
Type: 0
Recipient: 0
bRequest: 6
wValue: 256
wIndex: 0
wLength: 18
get descr: type: 1
device descr
EP0IN

Also I cannot find new USB controller drivers, and windows says they are up to date. Aditionally it was tested on two KL25Z boards. Anyone a clue what is going wrong here?

Edit: I tried with another USB cable that was delivered with newer mbeds to solve USB cable issues: Also didn't fix the issue. I tried to put the USB device in low speed mode (don't know if I actually succeeded), also no result. Anyone a clue how to fix this?

2 Answers

10 years, 9 months ago.

I checked the laptop specs, only USB3.0 ports are present. These could be causing the problem.

I had a similar issue when connecting a USB2.0 HDD docking station to a USB3.0 port:
While some brands of docking stations happily work together with the USB3.0 port, others will be detected (drivers are installed), but the HDD is not accessible.

Accepted Answer

That sounds like a good explanation. Now to find out how to solve it.

Maybe anyone here who has USB3.0 + USB2.0 ports on one computer who can verify it? (Although it probably also depends on the USB3.0 controller).

posted by Erik - 24 Jul 2013

I've been having the same problem, and I'm pretty sure it's a Windows 8.1/USB 3 issue. I've done lots of tracing with the Windows administrator message analyzer and lots of instrumenting the mbed USB device stack, and as far as I can tell, there's a still mysterious (to me) protocol difference in the Win 8.1 drivers that only applies for USB 3 ports. For me, the problem can be solved by either using Windows 7 on the host or using a USB 2.0 port with Win 8.1. Win 8.1 evidently uses different USB drivers for ports that are physically USB 2 vs USB 3.

I'd really like to figure out the root cause, and fix the USBDevice code so that it works in all versions of Windows, but so far I'm stumped. The closest I've gotten is that I found a post on the Windows Core USB Team blog about a protocol change they made in 8.1 for USB 3 that sends an extra CONTROL-IN token after a GET DEVICE CONFIGURATION request. That's tantalizingly similar to the problem I'm seeing, but in my case it looks like a spurious CONTROL-OUT shows up unpredictably while the device side thinks it's in Device-To-Host state. This sounds so similar to the blog issue that I'll bet it's a related change. I've tried a number of things to get back the device side back in sync when this occurs, but I haven't found anything that works.

posted by Mike R 04 Jul 2014
Erik -
poster
10 years, 9 months ago.

I could loan a USB 2.0 hub today, and with that it worked fine: apparantly it solves whatever issues caused the problem: Now it works fine. I assume Frank's explanation is correct and it is due to an issue between the KL25Z and the USB3.0 controller.

However, I think the interface chip uses the same USB peripheral, maybe a different revision, but for whatever reason, that one works. And while as hobbyist this solves for me the problem, if you want to make a product with the KL25Z it is not really a solution to add a USB hub. So I do wonder if the interface chip uses different settings for the USB peripheral as the KL25 USB device code, sadly that is not possible for me to figure out :).