Field Notes
Bring-upNov 27, 2026 · 6 min read

The Circuit Every STM32F407 Needs Around It

Power pins, the two VCAP capacitors, the crystal, reset, BOOT0 and the SWD header: the circuit an STM32F407 needs before it runs a single line of code.

Ray MalikPCB design engineer · MuffinByteLabs

An STM32F407 board can do a hundred different jobs, but the circuit around the chip itself is always the same: supply pins and their capacitors, two capacitors for the core regulator, a crystal, a reset pin, a boot pin and a debug header. Get these right and the board runs its first line of code the day it arrives. Get one wrong and nothing runs at all, and there is very little you can measure that tells you why.

This is the checklist for the STM32F407VGT6, the 100-pin version, and nearly all of it applies to the rest of the family. Check every value against the current datasheet for your exact part before the design goes out.

1. Power: a capacitor on every pin

The chip runs from 1.8 V to 3.6 V, and most boards use 3.3 V. It has several VDD pins, each paired with a VSS pin, and ST's power-supply scheme asks for:

  • A 100 nF ceramic capacitor on every VDD pin, right at the pin, with its own short path to ground.
  • One 4.7 µF capacitor on one of the VDD pins, as the bulk store for the whole chip.

"Every pin" is the part that gets skipped. Two capacitors shared between six supply pins look fine on a schematic, and leave four of those pins with a long, inductive path to the nearest capacitor. Decoupling placement beats value explains why that path matters more than the capacitor's value.

2. The analog supply: VDDA and VREF+

VDDA powers the ADCs and DACs, and also the reset circuit, the internal oscillators and the PLL. That means it can't be left out even on a board with no analog inputs at all. VREF+ is the reference the ADC measures against.

The datasheet shows 100 nF plus 1 µF for the analog supply and for its reference. Both usually come from the 3.3 V rail, and a ferrite bead or a small resistor between VDD and VDDA keeps digital noise out of your measurements. If the readings really matter, feed VREF+ from a precision reference instead. Connect VSSA to the same ground as VSS.

3. VCAP_1 and VCAP_2: the pins people miss

Inside the chip, a regulator makes the supply for the processor core, and it needs two external capacitors to be stable: 2.2 µF on VCAP_1 and another 2.2 µF on VCAP_2, each to ground. Use low-ESR ceramic parts and place them as close to their pins as the decoupling capacitors. They are not decoupling for your 3.3 V rail, and nothing else connects to them.

Leave them off and the core supply is unstable: the chip may not start at all, or it starts and then resets at random. In a schematic symbol the VCAP pins look like any other power pin, which makes this a classic reason a first STM32F4 board is completely dead.

4. VBAT: tie it to VDD if there's no battery

VBAT keeps the real-time clock and the backup registers alive when the main supply is off. With a coin cell, it goes to the battery. Without one, ST's guidance is to connect VBAT to VDD, with a 100 nF capacitor from that node to ground. Don't leave it floating.

5. Clocks

Out of reset the chip runs from its internal 16 MHz oscillator, the HSI, and for many boards that is enough. Add an external crystal, the HSE, anywhere from 4 to 26 MHz (8 MHz is common), when you need:

  • USB. The USB peripheral needs a precise 48 MHz clock, made by the main PLL from the HSE crystal. The HSI isn't accurate enough.
  • Accurate timing, such as high UART baud rates, or anything that has to keep time with the outside world.

Two rules for the crystal:

  • Work out the load capacitors; don't guess them. With two equal capacitors, each is about 2 × (CL − Cstray), where CL is the load capacitance on the crystal's datasheet and Cstray is the stray capacitance of the board and the pins, a few picofarads.
  • Keep it tight. The crystal and its capacitors sit right beside OSC_IN and OSC_OUT (PH0 and PH1), with a ground area around them and no other signals routed underneath.

The 32.768 kHz crystal, the LSE, goes on PC14 and PC15. It's only needed if the real-time clock has to keep accurate time.

6. Reset

NRST has an internal pull-up, so the chip comes out of reset on its own. A 100 nF capacitor from NRST to ground, close to the pin, is the usual addition: it stops noise on the line from resetting the chip. A reset button simply connects NRST to ground. Bring NRST to the debug header too; you'll see why in a moment.

7. BOOT0: how the chip starts

At reset, BOOT0 and BOOT1 (which is PB2) choose where the chip starts:

  • BOOT0 low: from the main flash, running your program. This is normal operation, whatever BOOT1 is.
  • BOOT0 high, BOOT1 low: from system memory, ST's built-in bootloader, which can load new firmware over a UART or USB.
  • BOOT0 high, BOOT1 high: from the embedded SRAM, which few boards ever use.

So pull BOOT0 low with a resistor (10 kΩ is typical) and give yourself a way to pull it high: a jumper, a button or just a test pad. That one cheap part is a recovery path if a firmware update ever leaves the board unresponsive.

8. The debug header

Programming and debugging use two pins, PA13 (SWDIO) and PA14 (SWCLK), plus ground, NRST and 3.3 V for the debugger's voltage reference. Bring them out to a header. The 10-pin, 1.27 mm Cortex debug connector is compact and standard; a row of 2.54 mm pins is easier to clip onto. Add PB3 (SWO) if you want trace output, such as debug prints over the same cable.

Don't use PA13 and PA14 for anything else. If firmware turns them into ordinary GPIOs, the debugger can only get back in by connecting while it holds the chip in reset, and that needs NRST on the header.

The checklist

  1. 100 nF on every VDD pin, plus one 4.7 µF.
  2. VDDA and VREF+: 100 nF plus 1 µF, filtered from VDD, even with no analog on the board.
  3. 2.2 µF ceramic on VCAP_1 and on VCAP_2, to ground and to nothing else.
  4. VBAT to VDD with 100 nF, unless there's a battery.
  5. An HSE crystal if the board uses USB, with calculated load capacitors.
  6. 100 nF on NRST, and NRST on the debug header.
  7. BOOT0 pulled low, with a way to pull it high.
  8. SWD on a header, and PA13 and PA14 left alone.

To find where any peripheral or register lives, the STM32F407 memory map explorer has the whole address space in one tree. And if you'd like a second pair of eyes on your schematic before it goes to the factory, that's the first service I offer.