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

Why won't a glitch-free clock multiplexer switch to backup after the main clock stops?

With both oscillators running on the bench, changing the select signal switches the output to the backup. When the main source actually stops, the backup input keeps running and the output can still stall. Those tests exercise different internal conditions. Some glitch-free switches need a few more cycles of the old clock before they can disable it on a safe edge. Once the old source has no edges, that sequencing can wait indefinitely. Check whether the part has an inactive-clock mode.

Which edges does the switch wait for?

An ordinary combinational multiplexer can switch as soon as select changes. If the old source is high and the new one low, that can shorten the output high pulse. Two sources with different phases can also place edges too close together. Many glitch-free designs wait for a safe phase on the old source, disable it, then enable the new source at its own safe phase. There may be a gap to preserve minimum high and low pulse widths. Glitch-free behavior addresses malformed pulses. Check gap length, phase jumps, and source-failure recovery against separate requirements.

Microchip's PolarFire documentation describes modes for two active clocks and for transfer from an inactive or unknown clock to a running source. A data sheet that calls for several cycles of the current source as well as the destination exposes a possible dependency. Review which sources the algorithm needs when switching, in addition to select polarity and the glitch-free or synchronous description.

A stopped source can be stuck high, stuck low, or high impedance. In an AC-coupled connection, receiver bias determines its eventual voltage independently of the source's former state. If high and low stops affect the mechanism differently, a cable disconnect alone cannot cover both. A design recovering from a dead source needs a detector timebase that survives that failure. A monitoring program clocked by the failed domain may never issue a switch request.

Budget the gap before the backup is usable

Suppose both oscillators are 50 MHz, giving 20 ns periods. An illustrative switch specification calls for three old-source periods and three new-source periods. With both clocks running, six full periods account for about 120 ns. Also allow for request synchronization, initial phase, and device delay as specified. If the main clock is stuck, its three periods never arrive. The 120 ns calculation provides no dead-source recovery guarantee.

Suppose the product tolerates 30 µs without a usable clock and an independent detector declares loss after 10 µs. The switch and receiver then have about 20 µs combined to recover. Look for a supported dead-source procedure and timing. An independent controller may be able to use approved reset and output masking while establishing the backup. Measure the first valid pulse, its width, and when the downstream function resumes. A running backup input alone cannot show that the system recovers in 30 µs.

Capture both inputs, select, and output. Where available, capture loss-of-clock flags, receiver reset, and valid signals using more channels or the same repeatable trigger. Start with a live-to-live transfer. Then test a stopped-high source, stopped-low source, and power loss using supported ways to disable or hold the source. Disconnecting hardware also changes electrical conditions. Reproduce a pure clock stop with supply, load, and termination fixed, then test the real product fault separately.

Write approval criteria that guide part substitutions

Record support for live-to-live and dead-to-live transfers, their limitations, and the applicable mode next to the BOM entry. A fast live-to-live switch may still require an architecture change for failure recovery. When a dead-to-live mode is available, read back registers or confirm generated configuration and straps to establish that the board uses it. Switching back when the main clock recovers is another requirement. Verify backup transfer on failure first.

Test the slowest frequency mode if several are supported. A too-short loss window can flag a valid slow clock. A long window reduces time for switching. Keep fault-injection method, edge criteria, minimum consecutive good pulses, and output gap together so the same fault can be repeated after supply or firmware changes.

If the architecture requires downstream logic to stop immediately, try asserting a defined hold state before requesting the switch. This requires an independent means of control. Even if the backup's first pulse meets the minimum width, check that validity waits for enough consecutive cycles. System recovery may end later than the first edge, so record both waveform and log times.

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.