Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
STM32F103C8T6 ARM STM32 Development Board

Getting an STM32F103 Board Running: SWD Programming, Boot Modes and First Checks

A compact STM32 board can offer plenty of peripherals, but the first upload is less obvious than plugging in a familiar Arduino Uno. The USB connector, factory bootloader and debug interface are separate pieces of the system. Understanding their roles makes troubleshooting much faster.

The STM32 development boards collection includes several board types and programming accessories. This guide focuses on an STM32F103C8T6 board and a Serial Wire Debug connection. Check the exact microcontroller marking and board revision before applying its details to another STM32 family.

Start with the part number, not the board nickname

The STM32F103C8T6 development board is listed with boot jumpers, a micro-USB connector and an ST-LINK header. Informal names such as Blue Pill describe a familiar layout, but do not guarantee identical components, schematics or firmware.

According to ST's STM32F103x8/xB datasheet, the C8 variant is specified with 64 KB of flash, while the CB variant has 128 KB. Configure your project for the documented part rather than relying on reports that some samples accept a larger program. The datasheet's supply limits apply to the microcontroller, not automatically to every labelled input on an assembled board.

Save the board's pinout and, where available, schematic beside the project. A reference image from another manufacturer is useful for orientation, but it is not evidence that every connector on your board is wired identically.

Separate the three connections

Connections that are easily confused during first setup
Connection Purpose Common assumption to check
Power input Runs the board A programmer may not supply the target automatically
SWD Programs and debugs the microcontroller Header position and voltage-reference arrangements vary
USB data Communicates through firmware and supported hardware A USB socket does not guarantee an installed USB bootloader

For a first test, choose one documented power arrangement. Do not connect two power outputs together merely because both are labelled 3.3 V. Some debug probes expose a target-voltage sensing connection; others provide a supply output. Read the probe's own documentation and identify which you have.

Likewise, a board powered from USB may contain a regulator, but that does not make its signal pins universally tolerant of USB's supply voltage. Check each proposed external signal against the device datasheet, pin mode and board circuitry before connecting it.

Wire SWD by signal name

SWD uses SWDIO and SWCLK with a common ground; reset and the probe's specified voltage-reference or power arrangement may also be required. On the STM32F103, PA13 is the SWDIO function and PA14 is SWCLK. Confirm where those signals appear on the actual board header instead of assuming a left-to-right order.

PMD Way also lists an ST-LINK programming accessory. Check its connector labelling and supported target interface before wiring it. STM8 programming and STM32 SWD are different interfaces; the presence of both names on an accessory does not make every output pin interchangeable.

With power disconnected, make a small connection table covering both endpoints. Keep the first wiring arrangement short and simple. If reset is available and supported by the probe, including it can make recovery easier when application software interferes with normal connection.

Establish a read-only connection first

STM32CubeProgrammer supports programming and verification through several interfaces. Select the interface you physically connected, then try identifying the target before erasing or programming it. This separates communication problems from problems in your compiled application.

Record the reported device information, target voltage where the probe supports reporting it, and any connection error. A successful connection is a useful milestone even before an LED blinks. If the board contains firmware you need to preserve, establish what can be backed up and what protection settings permit before changing its memory.

Do not experiment casually with option bytes, readout protection or security settings. They are not ordinary sketch preferences. Some changes can trigger erasure or restrict later access; consult the exact device documentation before altering them.

Build a deliberately small first application

Choose the correct MCU, memory size, clock configuration and upload method. Start with one known output and a slow visible state change. The store listing identifies an LED on PC13, but confirm the fitted board's LED connection and active polarity. A dark LED alone does not prove that programming failed.

If using Arduino software, follow the maintained STM32duino upload-method documentation. Its SWD, serial and DFU choices refer to different programming paths. Installing a core does not create missing hardware or install a USB bootloader automatically.

After programming, request verification where supported, reset the target and observe the test. Then disconnect and reconnect its normal power source. A project that works only while the debugger is attached may have a startup, reset, power or configuration issue worth finding immediately.

Understand boot selection before moving jumpers

Boot settings determine which memory supplies the initial program after reset. ST documents device-specific system bootloader support in AN2606, system memory boot mode. Consult the entry for the exact device; support for a peripheral on the chip does not prove that its factory bootloader uses that peripheral.

Photograph the initial jumper positions. Change them only according to the intended programming procedure, then restore the documented normal-boot arrangement when required. Label jumpers by function rather than memorising “left” or “right”, which changes when the board is rotated.

Troubleshoot one layer at a time

  1. Confirm the board's supply and ground at the intended test points.
  2. Recheck SWDIO, SWCLK and the probe's voltage-reference requirements.
  3. Confirm the tool detects the programmer itself before blaming the target.
  4. Try a lower documented SWD speed if the wiring or target clock conditions make connection unreliable.
  5. Use an appropriate reset-assisted connection procedure if the application prevents access.
  6. Once connected, verify the build target, flash limits and startup configuration.

Keep a short record of the configuration that first worked. When adding sensors or communication software, preserve that minimal test as a recovery project. It gives you a reliable way to distinguish a damaged connection from a complicated application bug.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat