Just taking a shot here. I have known good hardware. I'm using a K20 with a USB3320 PHY. I have an older version of the stack (when it was Freescale) that runs on this same hardware without issue. I'm running High Speed Mode, device mode only, CDC class.
I'm trying to upgrade to a newer version of the stack because the driver code on the older stack, version 3.8.x is virtually incomprehensible from a readability/maintainability standpoint. The upper layers of the CDC class and USB framework are largely the same, though.
The problem I'm having with the 4.1.1. stack is that on the very first enumeration request, the driver sends back all "FF" data in the response packet. I know this because I've traced it with a hardware based USB network analyzer. But the receive side works fine. The incoming setup packet is the correct 8 bytes and the data is correct. The transmit side has the issue. It sends the correct size packet, but the data is garbage. I've verified that the EPLISTADDR is correct, and the DTD pointers look good. I don't see anything obviously wrong. All the functions in the driver are returning success codes. The actual device descriptor, the 18 byte structure, is in memory that should be accessible. Overall, the memory mapping is very similar between the two versions of drivers
Does the "FF" filed return paket point to anything basic that I've overlooked?