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

Why can a WM8962B fail to select an external clock while its 24 MHz oscillator is running?

A WM8962B audio board sometimes stays silent after resuming from idle. Its external 24 MHz oscillator still runs. Initialization writes the planned source, but later readback points to the frequency-locked loop. Capture GPIO5 during startup and resume. In the default automatic configuration, that pin can take control of the clock source and prevent a write from changing it.

Identify the active clock source

At the codec, the waveform at MCLK and the clock selected internally are separate observations. The WM8962B can use the MCLK input, the FLL, PLL3, or its crystal oscillator circuit. Cirrus Logic documents that a high level at GPIO5 selects the FLL in the automatic configuration and locks the MCLK_SRC field. CLKREG_OVD restores software control. The falling edge of GPIO5 selects MCLK as the default, after which software can select another source normally.

The external oscillator can therefore run while a write fails to change the active source. A bus acknowledgment proves only that the transaction reached the device. Capture GPIO5, MCLK, the digital supply and the control bus, then read back the field. Give GPIO5 a defined level when it is an input, including at startup. Check the board's default bias when the main processor is still in reset and its pin is high impedance.

For ordinary GPIO use, check how firmware sets the override and pin function. Review any wake-up routine that restores default registers. Avoid changing the strap as the first troubleshooting step. Observing the board in both the cold-start and resume sequences will help distinguish a hardware bias problem from a later software write.

Derive two audio rates from one oscillator

Suppose the audio design uses an MCLK-to-sample-rate ratio of 256. At 48 kHz the target is 12.288 MHz. At 44.1 kHz it is 11.2896 MHz. Confirm the intended audio functions against the sample-rate and MCLK ratio tables. A tighter tolerance on a 24 MHz part will not produce either target directly.

Consider the FLL path. Prescale the 24 MHz input by two to obtain a 12 MHz reference. Choose an output division ratio of eight. To generate 12.288 MHz and 11.2896 MHz, the resulting internal oscillator frequencies are 98.304 MHz and 90.3168 MHz, within the 90–100 MHz range in the data sheet. With a reference ratio of one, the multiplication factors are 8.192 and 7.5264. The fractional parts can be expressed as 24/125 and 329/625 for checking the numerator and denominator fields. These are nominal values along this clock path. Configure the audio interface and its master or slave role separately.

A 48 kHz frame interval is about 20.833 µs, compared with about 22.676 µs at 44.1 kHz. Record LRCLK as one check, and confirm which device drives it. In slave mode, a correctly timed external LRCLK provides no direct evidence of the codec's internal source. Keep the observed frame interval, source readback, divisors and FLL state together in the test record.

Verify the source with a known audio stream

Play a known digital clip and capture both frame clock and bit clock. With two 32-bit slots and no extra gaps, 48 kHz frames need a 3.072 MHz bit clock. At 44.1 kHz the same framing needs 2.8224 MHz. The result follows the slot count and width regardless of whether the samples themselves contain 24 or 16 significant bits. A correct frame clock with the wrong bit clock points to framing. If both disappear at resume, identify which end is supposed to drive them.

If the FLL uses BCLK as its reference, check the startup dependency. An FLL configured for BCLK cannot lock to an absent reference while both sides wait for the other to provide it. Capture the external clock, BCLK and reference selection together. This distinguishes a missing reference from an FLL configuration problem even when the 24 MHz oscillator is healthy.

Hand off the replacement and wake-up checks

Save a working configuration and capture GPIO5, the external clock and source readback on cold start and resume. The data sheet recommends disabling SYSCLK during source reconfiguration. A change to the FLL reference frequency has its own disable and re-enable sequence. Check the point at which the product can resume the audio stream with its actual clock and data interface.

If a proposed replacement is a 24 MHz passive quartz crystal, identify the circuit before accepting it. An external logic oscillator and the codec's crystal circuit call for different checks. For the former, verify supply, output levels, duty cycle, loading and default enable behavior. For the latter, use the crystal-input requirements and qualify loading and startup. Save the complete order number and the sampled clock at the receiver along with board and configuration revisions. When two lots produce a valid external clock and the failure follows GPIO5, the next investigation belongs in clock selection and initialization.

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.