Field Guide · concept

Also known as: ISP, ICSP

In-system programming (ISP) is the practice of writing a microcontroller’s firmware while the chip remains soldered into its circuit board.1

Host PC USB Programmer ST-LINK header MCU target board (soldered) CLK DAT RST GND
An ISP session: the host PC talks over USB to a small programmer (here an ST-LINK), which drives a handful of debug pins — clock, data, reset, ground — on a header wired straight to the microcontroller. The chip never leaves the board, and the same link usually allows step-debugging and memory readback.

Overview

Before ISP, a chip had to be removed and placed in a dedicated programmer. ISP instead uses a small debug interface on the board — SWD or JTAG on ARM Cortex-M parts, an SPI-based ICSP header on AVR/ATmega, or vendor schemes on PIC — so a programmer like ST-LINK, J-Link, or PICkit can flash and debug the device in place.

Only a few wires are needed: a clock, one or two data lines, reset, and ground. The same interface usually allows single-step debugging and reading memory back, which is why the ISP header is as much a debugging port as a programming one.

Common ISP interfaces

Which pins you break out depends on the chip family:

Interface Typical parts Pins Programmer
SWD ARM Cortex-M, STM32 2 (+ reset) ST-LINK, J-Link
JTAG Larger ARM, FPGAs 4–5 J-Link, generic
SPI/ICSP AVR/ATmega 3 (+ reset) USBasp, Arduino as ISP
ICSP (PIC) PIC 2 (+ reset) PICkit, ICD

Where it fits

ISP is the lowest-level way to get code onto a chip and is how a brand-new, blank MCU is first programmed — including installing a bootloader, after which routine updates can happen over USB instead. On an STM32 board, the SWD pins broken out next to the MCU are the ISP interface. It is the standard production and bring-up workflow for embedded systems, including the small controllers and SDR front-end boards that surround a capture setup.

Sources

  1. In-system programming — Wikipedia, on programming chips in place. 

See also