Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Measurement and Acceptance

A 24 MHz crystal is running. Why can full-speed USB go more than half a microsecond between edges?

A USB board uses a 24 MHz passive crystal. An edge capture shows gaps of roughly eighty nanoseconds and others exceeding half a microsecond. The long gap looks like missing clock edges. First verify the measurement is on the data pair and identify the packet and link speed. Full-speed USB encodes bits on the bus. Transitions depend on bit values and need not occur every bit or every reference-clock cycle.

Bit time and edge spacing describe different things

Infineon's EZ-USB FX2LP supports an external 24 MHz crystal and uses an internal PLL to generate its high-rate clock. A full-speed USB link runs at twelve megabits per second, so one nominal bit is 83.33 nanoseconds. The crystal period is 41.67 nanoseconds. Other clock signals on the device can have different rates. Measuring consecutive differential transitions on D+ and D− can yield several bit times. It is not a direct observation of every crystal cycle.

USB-IF describes NRZI coding and bit stuffing. A zero causes a transition and a one leaves the state unchanged. After six consecutive ones, a zero is stuffed so the receiver can keep recovering timing. If a zero transition is followed by six ones and that stuffed zero, the next transition is seven bit times later, about 583.33 nanoseconds. Its inverse is approximately 1.71 megahertz. That is perfectly compatible with the nominal USB signaling rate.

The example applies within the relevant encoded data interval. End of packet, idle, and reset have separate behavior. Do not take the longest gap across an entire capture as a bit-stuffing measurement. Confirm the device actually enumerated at full speed and that it transmitted the packet being measured. A host token mainly reflects the host transmit path, so it cannot qualify the device crystal.

Use contrasting payloads to check edge spacing

In a controlled transfer between test devices, compare payloads rich in zeros and in consecutive ones. Zero-rich data provides many transitions near one bit apart. Runs of ones give longer intervals and subsequent stuffed transitions. The on-wire packet is not just the software payload. Packet fields, synchronization, checking, and stuffing all contribute. If the decoder exposes raw bits, retain the stuffed position. If it removes them, retain raw edge timestamps as well.

Group transitions within valid data by whether they span one, two, or more bit cells. Valid intervals cluster near multiples of 83.33 nanoseconds. A few outliers call for checking spurious crossings or missed transitions from a poor connection. If short spacings shift uniformly and longer spans divided by their bit counts show the same ratio, investigate the actual reference and PHY timebase.

Use sufficient measurement resolution. Even a reference one hundred parts per million fast, scaled ideally into the bus rate, shortens one 83.33-nanosecond bit by only about 8.3 picoseconds. Over seven bits the shift is approximately fifty-eight picoseconds. That is much smaller than misinterpreting seven bits as one. If the instrument cannot resolve this per bit, fit a longer interval with a known bit count and verify the PHY reference independently. Formal electrical compliance uses the applicable USB-IF method and fixture.

Group transitions by direction as a separate check. Opposing transitions can cross the observed threshold at different times. If a drive or probe change affects just one direction, inspect leg amplitude, asymmetry, and threshold before blaming frequency. A pure scale error shifts many bit times proportionally. Keep one differential reference plane so cable ends and different loads are not combined in one statistic.

Decide whether the crystal is involved

Save a few raw bits before and after an apparently long gap and check any stuffing or error flag. Compare ordinary transitions with the suspect one and see whether it recurs at the same payload position. A repeatable interval tied to a correctly stuffed pattern can clear one kind of false alarm. If decoding fails there, retain the analog waveform instead of relying on one displayed frequency. Repeat a known packet to distinguish deterministic bit structure, retry behavior, and a clock issue.

Keep link speed, packet direction, raw bit counts, and waveforms. Verify the actual 24 MHz crystal path at a permitted buffered monitoring point where available. If direct crystal probing is necessary, account for its effect on the oscillator. Expected bit stuffing does not imply a missed crystal cycle, and successful decoding does not certify analog edge quality. Compare replacement crystals at the same link speed, loading, and test data. A usable conclusion distinguishes the transmitted bit sequence, physical signal quality, and device clock accuracy.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.