MCU Selection, Clocks, Reset, and Boot
The microcontroller is the coordination point of many embedded boards. Choosing it is only the first step. The hardware must also provide stable power, clock sources, reset behavior, boot configuration, programming access, and enough pins and peripherals for the product lifecycle.
Learning Objectives
By the end of this lesson, you should be able to select an MCU from requirements, plan clock sources, design reset and boot strapping, provide programming/debug access, and review common startup failures.
MCU Selection Criteria
Choose from requirements:
- CPU performance and real-time needs;
- flash, RAM, EEPROM, and external memory support;
- ADC, timers, PWM, communication peripherals;
- GPIO count and alternate-function conflicts;
- operating voltage and temperature;
- low-power modes and wake sources;
- package, availability, cost, and lifecycle;
- toolchain, debugger, examples, and community support.
Leave pin and memory margin for revision changes.
Clock Sources
Common clock options:
- internal RC oscillator: cheap and quick startup, lower accuracy;
- crystal: accurate, needs load capacitors and careful layout;
- ceramic resonator: between RC and crystal;
- external clock module: accurate but adds cost and power.
Crystal load capacitors are estimated from:
[
C_L \approx \frac{C_1 C_2}{C_1+C_2}+C_{STRAY}
]
For equal capacitors:
[
C_1 \approx C_2 \approx 2(C_L-C_{STRAY})
]
Place the crystal and capacitors close to the MCU pins with a quiet return path.
Reset Circuit
Reset must hold the MCU inactive until power and clocks are valid. Options include:
- internal power-on reset;
- external reset supervisor;
- RC reset for simple products;
- manual reset button;
- watchdog reset.
External reset supervisors are preferred when rail ramp rate, brownout behavior, or safety matters.
Boot Configuration and Programming
Boot pins select flash, ROM bootloader, external memory, or debug modes. Strap them with resistors so the default state is reliable but still overrideable for programming or recovery.
Provide a programming connector or test pads for SWD, JTAG, UART, USB, or vendor-specific tools. Include ground, target voltage reference, reset, and required boot control where applicable.
Practical Review Checklist
- Pinout supports all required peripherals without conflicts.
- Boot pins have defined default states.
- Debug/programming access is available after assembly.
- Reset timing matches regulator and clock startup.
- Crystal layout follows MCU vendor guidance.
- Decoupling capacitors are placed at each supply pin group.
- Firmware can identify board revision if needed.
Common Mistakes
- Using all pins with no spare debug or revision margin.
- Forgetting pull resistors on boot straps.
- Hiding the programming connector under a cable or enclosure.
- Placing crystal traces long or near noisy signals.
- Releasing reset before the rail is stable.
Summary
MCU hardware design includes selection, clocks, reset, boot, and debug access. Reliable startup depends on defined pins, valid rails, correct timing, clean clock layout, and a recoverable programming path.
Further Reading
- STMicroelectronics, "Getting Started with STM32 Hardware Development."
- Microchip, "AVR and SAM Hardware Design Considerations."
- Nordic Semiconductor, "Hardware Design Guidelines."