USB enumeration fails with some PC hosts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB enumeration fails with some PC hosts

4,075 Views
alexferreirós
Contributor II

I'm trying to run the USB CDC virtual com example that comes in KSDK 1.2 on a custom board with the KL27 MCU (MKL27Z256VFM4)

To do so, first I have build the USB library for this MCU (I cloned the provided usbd_sdk_frdmkl27z_mqx library and followed the attached guide in this post: Re: USB CDC on KL27 processor ). From there, we successfully built the CDC example.

The thing is, the board successfully appears as Virtual COM when connected with some PCs but it doesn't with others (where the enumaration phase fails). I mean, the same unit and the same cable works OK on some hosts (a Windows 8.1 workstation, a Windows 10 laptop, a Windows 7 laptop) but fails on others (another Windows 8.1 workstation, a Windows XP laptop)

Can anybody throw any light about what could be happening? I totally ran out of ideas.

More clues:

- I think the issue is in the board side because I also have tested this example on a FRDM-KL27 board and it worked fine with all hosts listed above (same cables also)

- Tracking the error with the tool USBView reports this:

[Port1] FailedEnumeration

Is Port User Connectable:         yes

Is Port Debug Capable:            no

Companion Port Number:            0

Companion Hub Symbolic Link Name:

Protocols Supported:

USB 1.1:                         yes

USB 2.0:                         yes

USB 3.0:                         no

       ---===>Device Information<===---

ConnectionStatus:                  FailedEnumeration

Current Config Value:              0x00  -> Device Bus Speed: Low

Device Address:                    0x00

Open Pipes:                           0

*!*ERROR:  No open pipes!

          ===>Device Descriptor<===

*!*ERROR:  bLength of 0 incorrect, should be 18

bLength:                           0x00

bDescriptorType:                   0x00

bcdUSB:                          0x0000

bDeviceClass:                      0x00

*!*ERROR:  Device enumeration failure

Also, just to mention I work with KDS 3.0, KSDK 1.2, MQX and our custom KL27 board has no external crystal.

BR,

Alex

Labels (2)
0 Kudos
7 Replies

2,426 Views
davecoleman
Contributor I

I've been fighting with this issues on a K70 for months. We're actually looking to integrate a hub into our product to work around it. 

CDC device, MQX 4.2, works on some machines but not others, a hub solves it in every case. Tracing out the enumeration, the K70 doesn't even try on some PCs. No response to the initial attach. Do I just need to sit there and manually poll the attach interrupt until a connection occurs?

Anyone solve this, or find a workaround? 

0 Kudos

2,426 Views
jonathanscofiel
Contributor I

I am having a similar issue on a custom board using a KL27Z on a CDC device. It is actually not OS related but it seems that the KL27Z has issues with certain PC host hubs. Specifically, the KL27Z seems to always work with Intel 8 C220 host hubs (across multiple OS's) and it never works with the KL27Z on Intel 6 C200 host hubs. However, it always to connects if I go through an unpowered USB hub, regardless of the PC's host hub.

I have not had this problem with the KL46 or the K24/K64 micros. All of my USB devices are set up the same with KDS 3.0.0 and KSDK 1.2.0 or 1.3.0.

I found it interesting the OP said the FRDM-KL27Z works because I checked the schematic for the FRDM and it has the same line resistors and everything as our custom board.

2,426 Views
santiago_gonzal
NXP Employee
NXP Employee

Hello,

Try reducing the line resistors of D+ and D-. I've seen this problem several times and reducing/changing the line resistors fixed the problem.

Regards,

Santiago

0 Kudos

2,426 Views
alexferreirós
Contributor II

Thanks for your time Santiago.

I've tried your suggestion changing those resistors from 22 to 11, 0 and even 33Ω but unfortunately the behavior remains the same.

0 Kudos

2,426 Views
bobpaddock
Senior Contributor III

Try a different cable. They are not all created equal and some are down right junk.

0 Kudos

2,426 Views
bobpaddock
Senior Contributor III

Also not all hubs are create equal. My KL27 won't work with one of the Hubs on my development PC. If I install an external hub between the PC and the KL27, then the KL27 works. I've run into things like Intel based hubs would work and NEC based ones don't; that was a AVR project. Look at the system information for the working and non-working PCs to see if there is something like this going on. The USB Gurus of the world hang out here if still stuck:  http://janaxelson.com/forum/index.php?board=2.0

0 Kudos

2,426 Views
alexferreirós
Contributor II

Thank you Bob for getting into this.

I guess cable is fine since I'm using the same in all the scenarios and everything works fine in some of them.

Regarding the hubs manufacturers, it could be related, I don't know. I just ordered an external hub to bypass this issue in my development PC. Anyway, this wouldn't be a final solution for the problem, of course.

Besides, the fact that the FRDM-KL27 development board actually works fine with all tested PCs (and the same cable) makes me suspect my board (HW or SW).

0 Kudos