Communication Protocols · Interview question

A USB device fails to enumerate. Where do you look?

A strong answer

Three areas, in order. First, descriptors: malformed or internally inconsistent descriptors are the most common cause, wrong total/length fields, an endpoint count that doesn't match the descriptors actually returned, a max-packet-size mismatch for EP0, or a bad class/VID/PID, so I'd dump and validate the descriptor set (USB analyzers and host-side tools show exactly where enumeration aborts). Second, the physical/PHY layer: the D+/D− pull-up must be present and on the correct line for the intended speed, the connector and D+/D− routing must be correct, and critically USB needs an accurate clock, full/high-speed USB has tight tolerance the internal RC oscillator usually can't meet, so a missing crystal or misconfigured clock tree commonly breaks enumeration. Third, power and stack state: a bus-powered device exceeding the ~100 mA pre-configuration budget (or mis-declaring its current) can be cut off, and the device stack must actually be running and responding to EP0 requests in time. The debugging method is to capture the enumeration on a USB protocol analyzer (or read the host's enumeration logs) to see exactly which request fails, then correlate to descriptors, clock, pull-up, or power. Re-reading application code rarely helps, because enumeration is below the application, it's the stack, descriptors, and electricals.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

USB Basics

Host-controlled, self-describing, and far more complex than UART: enumeration, descriptors, endpoints, and the four transfer types, plus device classes like CDC that need no custom driver.

More USB Basics questions

Browse all 472 interview questions
A USB device fails to enumerate. Where do you look? | EmbeddedPrep.io