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

Why does FT2232H synchronous FIFO lose the first byte with a good 12 MHz crystal?

An acquisition board with an FT2232H connects reliably to the PC, and its 12 MHz passive crystal is already oscillating. The programmable logic sometimes receives a short packet starting with the second byte or with a stale byte at the front. First identify the edge on which the synchronous interface actually transfers data, then compare the pointers at both ends. PC enumeration, a correct crystal frequency and observable transfers do not show that the first byte reached the logic as intended.

Confirm synchronous mode, then check output and read enables

The FTDI application note provides a useful mode check. The data sheet’s mode selection section starts with asynchronous FIFO configuration in external memory. The host driver then switches Port A to synchronous operation. The dedicated output then carries 60 MHz. Synchronous operation uses the other port's resources, so that port cannot be tested as an independent data channel at the same time. If USB enumeration succeeds but this clock is absent, check which port received the mode command and whether it returned successfully. Once the output is present, use it as the timing reference for the analyzer. The passive crystal is at the oscillator pins. The rising edge of the 60 MHz interface clock is the common timing reference for the two devices.

First check that the device has data to deliver. When RXF# is low, the programmable logic must release the bidirectional bus, then assert OE# low before asserting RD#. The data sheet requires OE# to lead by at least one interface clock period. A read occurs on a rising edge with RD# and RXF# both low. If a state machine asserts OE# and RD# together, the FT2232H has only just gained control of the data bus when the receiving logic starts counting. Later bytes may all be correct, leaving the fault concentrated at the beginning of each burst.

Capture the write enable of the receiving buffer too. With OE# low, data may already appear valid before RD# is asserted. Seeing the byte does not justify enqueuing it yet. If RD# remains low and RXF# returns high, later rising edges do not count. The same trace distinguishes a duplicated first byte from an extra last byte. Check the pin table for the installed package and verify that the probe is attached to OE#, rather than an adjacent wake or read function.

A 16.7 ns cycle is larger than the remaining board timing margin

A 60 MHz clock has a nominal period of about 16.67 ns. Suppose a rising-edge state machine asserts OE# and then RD# on successive edges. Its internal commands are one cycle apart. The two output delays, board routes and any level translators can change when their edges arrive at the FT2232H. The timing table also specifies up to 7.15 ns from the clock edge to valid read data. Subtracting that from 16.67 ns leaves roughly 9.52 ns for a first look at the timing budget. External propagation, receiver setup and relative clock delay still have to come from that interval. Use the manufacturer's waveform and static timing constraints to decide which edges and windows actually apply.

Use repeatable packets with distinct opening and closing markers and nonrepeating sequence bytes in between. If every packet loses its first byte while long transfers are otherwise correct, focus on bus turnaround and the order of the read controls. Save one continuous read trace and one trace of a read immediately after a write. If only the second test fails, confirm when the programmable logic releases the bus and when the bridge starts driving. While both devices contend, a digital analyzer may still report an ordinary one or zero. Inspect analog amplitude and transitions as well.

Check which clock domain generates the read controls at the programmable logic. Some boards feed a request from a separate system clock directly into combinational logic driving RD#. Its phase relative to CLKOUT can drift into the sampling edge. Hand the request into the interface domain with a clock-domain crossing designed for the request type, then generate OE# and RD# there. Use a suitable crossing buffer if data must return to the system clock domain. Test by pausing producer commands and consumer reads independently. The interface byte count must still match the handshakes qualified in the interface domain.

Count qualified FIFO edges separately from throughput at the PC

One byte on each qualified edge gives the eight-bit interface an arithmetic ceiling of 60 million bytes per second. RXF#, direction changes and USB scheduling reduce effective throughput. Budget eight full clock periods, about 133 ns, to transfer eight bytes on consecutive qualified cycles, apart from the preceding enable and other pauses. If only seven bytes arrive, compare how many rising edges met the read conditions with how many writes occurred in the receiver's queue. Seven qualified edges point to the handshake. Eight qualified edges and seven enqueue operations point to the receiver or its buffer.

For production acceptance, retain a startup check for the 12 MHz passive crystal and a run-time check for the 60 MHz interface. Use large transfers for load testing and short bursts to check the first and last bytes, including both directions of bus turnaround. Those records distinguish a stopped reference, missing synchronous mode, a premature read and a receiver dropping data. On an already oscillating board, the qualified bus cycles show where the first byte went.

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.