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

Why does an STM32F401 Nucleo run without an 8 MHz crystal while a custom board stalls at HSE?

Identify the Nucleo clock source first. Some MB1136 STM32 Nucleo-64 assemblies route an 8 MHz ST-LINK MCO output to target OSC_IN, even when the X3 crystal position is vacant. A custom board with only a passive crystal can stall waiting for HSE if it retains the development board's bypass configuration. The same nominal frequency does not make the oscillator circuits or software settings interchangeable. Match source, assembly and HSEBYP before ordering parts.

Why a board can have an external clock with no visible crystal

The MB1136 user manual UM1724 lists separate MCO, X3 crystal, external oscillator and unused-HSE arrangements. MCO is a debugger-side clock output. If the assembly routes it to the target, the target reads it as an external input. That does not mean a resonator is fitted across its oscillator pins. Check the PCB revision sticker and actual solder bridges before inferring the state of X3. Two boards sold as Nucleo-64 need not use the same default.

When comparing against NUCLEO-F401RE, note whether USB and the debugger remain attached. Powering the target externally does not establish that the debugger still supplies MCO. Cutting away the debugger section, changing power or moving to a battery setup can remove the reference. For an application that only works next to the computer, check actual input and selected system clock separately from successful flashing.

Compare the bypass and passive topology

ItemMCO from development boardPassive crystal on a custom board
Source of 8 MHzST-LINK drives target OSC_INCrystal spans OSC_IN and OSC_OUT
Software modeHSE bypassHSE crystal oscillator
If HSE is not operatingVerify the external signal rather than the labelVerify fitting and software startup
Purchase scopeDefined external source implementationPassive crystal and matched load components

The F401 reference manual shows an external input at OSC_IN and high impedance at OSC_OUT in bypass. In crystal mode, the resonator spans both pins with the required board loading. Bypass does not disable all HSE functions, and selecting it does not turn a passive crystal into a digital source. Verify topology first, then configuration and startup.

Check solder bridges against the actual board revision

In the Rev 12 user manual example, the MCO option lists SB16 and SB50 fitted and R35/R37 absent. X3 operation calls for disconnecting the MCO path and fitting the specified crystal and supporting parts. The manual distinguishes revision defaults and board exceptions. Confirm the exact schematic and as-built revision rather than using these lines as permission to alter a current board. Check connectivity unpowered and do not leave an active source connected to the passive network as an experiment.

A custom design may not have the same designators and may use oscillator pins differently. Trace its OSC_IN and OSC_OUT rather than transferring jumper names to the work order. Verify that generated firmware matches the layout. An “8 MHz” constant controls software calculations, not the physical source. Check the hardware first, then PLL, bus dividers and peripheral timing.

Select the 8 MHz part and reassess the load capacitors

The UM1724 X3 example is an 8 MHz, 16 pF leaded crystal position. The Japanese KDS DSX321G 7AD00800A62 also says 8 MHz, but is a surface-mount quartz option rated at 8 pF. This comparison shows why frequency is not a sufficient order description. It is not a recommendation that the KDS part directly fit X3. For a custom SMD layout, choose from the MCU requirements and footprint; do not copy old capacitors when the intended load changes.

Effective load includes the controller, external capacitors and board parasitics. The application's supply and temperature also influence startup. A photograph identifying frequency and outline does not establish load, maximum ESR or drive. After substitution, verify startup and error. A waveform near 8 MHz does not establish performance across temperature, supply and lots.

Observe the signal on the correct node before diagnosing the wait

An 8 MHz period is about 125 ns, useful when choosing a time scale. In bypass the question is whether a compliant signal reaches the input. In crystal mode the question is whether the analog loop starts. A wait at HSERDY requires reviewing what source was enabled. Firmware can produce logs while still using default HSI, so a blinking LED does not establish switching to HSE. If measuring the actual system clock, trace its active source with a method appropriate to the design.

Reproduce “works with the debugger, fails standalone”

Test the attached debugger and standalone power separately. Record firmware, reset method and actual powered rails, and confirm HSE path, readiness and final system clock each time. Do not simultaneously swap the supply, download cable, crystal and software. A debugger may silently restore power or a reference. If a working board with the same firmware depends on MCO, that can explain the lack of an external clock on the custom board.

Divide the evidence into three independent checks: whether the external reference reached the target, whether the MCU reported HSE ready, and whether the system actually switched to the intended source. Check the first against the physical topology, read the second after enabling HSE, and verify the actual switch status for the third rather than treating the requested setting as the result. The earliest failure tells you where to look next. On an intermittent board, put power rise, reset release, clock validity and the first error on the same timeline to distinguish a delayed start from an absent reference.

Do not force bypass merely to get past a software wait and then declare the board fixed. If no external driver is present, this does not restore standalone startup. Log any internal-clock fallback separately from an HSE pass. When some cold starts pass and others fail, compare power and reset traces before varying voltage and temperature one at a time. If a test instrument loads the passive node, use a buffered observation point or a firmware-configured clock output instead. For the development board's driven reference, observe it at the target rather than assuming the transmitter measurement establishes what reached the receiver.

Also distinguish a fully unpowered start from a push-button reset. A debugger connection can leave its own side powered while the target supply is off. Record which connector provides power and whether the external reference was already running at the start of each test.

What repair, procurement and testing need to know

When the development board uses the debugger clock, configure a compatible external-clock input. When the custom board has a passive crystal, use the resonant circuit and crystal mode. Give purchasing the exact part, package, CL and temperature range; tell firmware what source actually exists; retain the standalone test result. Two boards labeled 8 MHz behave alike only when their hardware and software match the intended topology.

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.