Choose an HSE crystal for an STM32F103CB
Select the crystal frequency, load capacitors and startup margin for an STM32F103CB board.
Choose a crystal for the configured clock tree
For an existing board, read the schematic and clock configuration first. Many Blue Pill and Maple designs use an 8 MHz HSE, but the oscillator limits and PLL setup depend on the MCU and board. If the input is a driven clock instead of a crystal, use the documented HSE bypass configuration.
Use the STM32F103x8/xB datasheet for the HSE limits. Check the crystal's specified load capacitance, maximum equivalent series resistance, drive level and frequency tolerance against the design requirements.
Calculate loading and check startup margin
For symmetric loading, first estimate each external capacitor as 2 × (CL − Cstray), where CL is the crystal's load capacitance and Cstray is the effective stray contribution for that layout. Check the full expression in AN2867 when the capacitors or pin loading differ. Include package and PCB parasitics in the estimate.
Check gain margin and crystal drive level using AN2867, then validate startup on the assembled board over the intended temperature and supply range. Keep the oscillator traces short. A probe adds capacitance to crystal pins, so use an MCU clock output when it can expose the frequency you need to verify.
