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

Why does W6100 SPI fail in power-down with the same 25 MHz crystal?

An Ethernet controller uses a W6100 with a 25 MHz passive crystal. The host can read its device identifier in normal operation. The same diagnostic reads erratically after Ethernet PHY power-down. The trace shows the same SCLK frequency and the crystal is still oscillating. The W6100 specifies chip-select timing in periods of its internal system clock, which can slow down in power-saving states while the host's SCLK stays unchanged.

Identify the three clocks involved

The data sheet describes the reference crystal, the internal system clock and the SPI clock supplied by the controller. The 25 MHz passive crystal has a nominal period of 40 ns. The W6100 system clock can be configured for 100 MHz or 25 MHz during normal operation. WIZnet says that PHY power-down automatically changes the system clock to 25 MHz; it also lists that clock during a specified PHY reset sequence. Host SCLK comes from the host peripheral. The host need not share the W6100 reference. Record its settings, the W6100 clock state and the measured lengths of the CS intervals.

The SPI access table specifies at least three system periods for CS setup, two for hold and two for the high time between assertions. With a 100 MHz system clock, those are 30, 20 and 20 ns. At 25 MHz they are 120, 80 and 80 ns. A waveform valid in the first state can fail in the second. Consider 20 MHz host SCLK. One period is 50 ns. If the driver provides one nominal SCLK period in each of these places, it clears all three limits at 100 MHz and misses all three at 25 MHz. Measure the actual edges at the W6100 rather than relying on a host timing setting.

A one-byte transaction with two address bytes and one control byte requires thirty-two clocks, or 1.6 µs of bit time at 20 MHz. A valid variable-length access to contiguous addresses can avoid repeating headers. The CS intervals at the boundaries still have to meet the current system-clock limits. If the only figure available is the number of idle host cycles, convert it to an actual duration, particularly when power management also changes the host divider.

Save complete transactions and rule out an early CS release

In variable-length mode, CS stays low through address, control and data. Its rising edge terminates the frame. If a driver uses one call for the three header bytes and another for the reply, automatic host chip select may rise in between. The device then saw two transactions. The dummy clock bytes do not continue the first read. Verify complete framing before measuring the time between relevant clock and CS edges. Fixed-length mode encodes its data length in the control bits and has a different CS arrangement described in the data sheet. It does not make a split variable-length transfer valid.

Start with a documented chip identification register and read one byte, removing address increment and socket-buffer variables. Save one run with the original driver. Keep SCLK the same in the second run and extend CS setup, hold and high time to cover the slower clock limits with margin. If the second version reads correctly in the low-power state, carry those CS constraints into the driver. If it still fails, check whether the mode transition completed and whether the read remained inside one CS frame. Then inspect data edges, reset and supplies.

Measurement resolution matters. An analyzer that can only show that CS is low without locating its edge relative to SCLK within tens of nanoseconds cannot establish timing compliance. Capture both signals together using consistent thresholds and use the logic decode to preserve address and control fields. Include cold boot, sustained network traffic, and entry and exit from PHY power-down in the test.

Even after configuring conservative CS timing, retain a full trace when entering or leaving PHY power-down. The manufacturer's transition procedure calls for waiting. A single anomalous byte during a transition does not establish whether steady-state access works. Start with the read-only ID register in steady state before investigating a problem confined to one network buffer. The control header carries block selection as well as addressing and access controls. If the ID passes while buffer reads fail, use a known short pattern and verify the block number, actual address and number of returned bytes. That distinguishes insufficient CS timing from a driver reading the wrong buffer. If the host switches to manual CS to extend the intervals, verify that other devices sharing SCLK remain deselected throughout the single-frame read.

Any replacement 25 MHz passive crystal still needs load, startup and supply-corner checks against WIZnet's reference design. To investigate failures confined to power-saving operation, retain timing captures for both the normal and slower clock states. Each should show whether its CS intervals meet the applicable limits. The presence of the same reference and host SCLK does not establish compliance while the receiver's system clock is slower.

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.