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

Can a timer clocked by a 50 MHz oscillator report that the oscillator stopped?

A controller uses a 50 MHz active oscillator for acquisition logic. A timer in that same domain is intended to raise an alarm after some interval without activity. Disconnecting the clock never produces an alarm. The timer stops with its clock. A complete clock loss needs a monitor driven by an independent timebase. Observe a periodic activity signal from the monitored domain and record timeout and recovery in the surviving domain.

Export a slow activity bit

A counter in the 50 MHz domain can generate a slower square wave. Divide by 64 and its period is 1.28 µs, with a transition every 0.64 µs. An independent 25 MHz monitor has 40 ns sampling periods, about sixteen per high or low in this example. Detect both transitions after synchronization. If only rising edges are detected, normally they are 1.28 µs apart and need a different deadline. Directly sampling the 50 MHz clock as a plain logic level can alias. Some clock ratios and phases give the monitor the same level repeatedly.

AMD notes that an XPM_CDC_SINGLE input must be sampled multiple times by the destination clock. Select the proper implementation, synchronizer depth, source register and reset behavior for the FPGA and timing constraints. Moving just one slowly changing bit avoids incoherent snapshots of a binary count with several changing bits. Accurate frequency measurement calls for an appropriate counter crossing. Also verify clock independence. A nominal 25 MHz from a PLL referenced to the monitored 50 MHz may disappear with it.

Set a deadline for observable activity

Suppose the monitor clears its count at every synchronized transition and asserts an alarm after 100 samples without another one. At 25 MHz this is about 4 µs since the last observed activity. Include crossing time and delivery to the system state machine. From the instant of physical clock loss, a final valid transition could still be passing through the synchronizer, moving the latest deadline by several cycles. Check whether the comparator asserts on the hundredth sample or on the next cycle. A system that needs switching within 2 µs cannot meet that target with this example threshold.

Short pulses present another problem. Some logic may recognize a narrow pulse even though another consumer misses it. An activity monitor can detect a sufficiently long absence, but does not enforce waveform requirements. Use analog observation or another dedicated path for duty or glitch limits. Consider supported low-rate and stop modes. If a valid standby state stops the reference for 10 ms, document how monitoring is suspended or interpreted. Verify that a stopped clock domain is not responsible for rearming its own monitor.

Test a stop, a slowdown and a restart independently

Control the real receiver input and capture the external source, divider output, synchronized bit and alarm on one timeline. Stop valid 50 MHz at different phases and record the earliest and latest alarms. Test failure before reset release, stopping high or low, and brief stops followed by recovery. If PLL lock is used as another observation, measure its timing relative to real clock loss instead of expecting immediate response. Withhold stale acquisition values until the restarted clock and data pipeline qualify.

Exercise operating voltage and temperature limits, and account for the monitor's own frequency tolerance. A nominal four-microsecond check is not a worst-case bound. Specify oscillator frequency, output, enable and startup conditions with the component. Record independent monitor supply, expected transitions, alarm deadline, legal clock absence and first valid data after recovery with the board. Disconnecting the oscillator during qualification then tests the actual failure path.

Stop the source around the instant the activity bit changes so the monitor sees both early and late final transitions. Record time from last external edge to alarm and then to quarantine of old data. If firmware polls the alarm, poll delay may exceed the no-clock deadline itself. A requirement about when invalid output stops must include the complete latency. Preserve a hardware marker from the monitor beside the application log.

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.