Insight
Firmware bring-up notes: first power to first useful log
A field-tested sequence for new PCB bring-up — power rails, clocks, SWD, pinmux, and the first deterministic log line that proves the board is alive.
- Firmware
- Embedded
- Bring-up
Framing note: These notes summarize a repeatable bring-up sequence used in internal training examples. They are not attributed to any customer project.
New hardware arrives. Everyone wants features. Resist that. The goal of day one is narrower: prove power is safe, the core runs, and you can observe state.
Before you apply power
Do the boring work first.
- Continuity check power and ground nets against the schematic. Look for shorts at connectors and under BGA/QFN footprints.
- Confirm regulator enable polarity and sequencing assumptions match the schematic notes.
- Set the bench supply current limit low. A hard short should trip the supply, not vaporize a plane.
- Have a smoke plan: which LED, which rail, which probe point you will watch first.
Power rails, then clocks
Apply power in the order the design intends. Measure every rail at the load side, not only at the regulator output pin.
- 3V3 / 1V8 / core rails within tolerance under no-load, then with the MCU held in reset if possible.
- Check for oscillation on LDO outputs — some layouts ring until load or compensation is right.
- Verify crystal / oscillator amplitude and frequency before chasing “random” boot failures.
- Confirm reset release timing. A brown-out detector that trips during rail ramp looks like a haunted chip.
Get a debug channel early
SWD / JTAG first. UART second. Application logic third.
If you cannot halt the core, you do not have bring-up — you have hope. Flash a minimal image that:
- Configures clocks to a known state
- Blinks a GPIO you can probe
- Emits one UART line at a fixed baud with a hardcoded board revision string
That single log line — board=revB rail=ok — is more valuable than half a driver stack.
Pinmux and peripherals
Only after the core is deterministic should you enable peripherals.
- Bring up GPIO and EXTI with known pull states from the schematic.
- Initialize I²C / SPI buses with a scan or loopback before attaching complex drivers.
- Treat power domains and level translators as first-class: a “dead” sensor is often a missing enable rail.
- Log every init step with a result code. Silent success is how intermittent faults hide.
What “done” means for bring-up
Bring-up is complete when you can:
- Power cycle repeatedly without manual babysitting
- Halt and flash reliably over the debug probe
- Read a stable identity (UID, revision straps, OTP) from software
- Run a short self-test suite that covers rails, memory, and primary buses
Feature work starts after that gate. Skipping it does not save time — it relocates the same time into week-three mysteries.
Keep a bring-up notebook (even a markdown file in the repo): rail measurements, probe photos, unexpected strapping, and the exact firmware hash that first printed a clean log. Future you will need it when revision C arrives.