Hardware Configuration

The Debug Probe firmware is designed to run on multiple hardware targets. The specific GPIO pin assignments for SWD, UART, and status LEDs are defined in board-specific configuration header files.

Configuration Files

The main configuration file is include/probe_config.h, which includes a board-specific file based on the DEBUG_ON_PICO CMake flag.

  • Official Debug Probe: include/board_debug_probe_config.h
  • Raspberry Pi Pico: include/board_pico_config.h
  • Template: include/board_example_config.h serves as a template for custom hardware.

Raspberry Pi Debug Probe

This is the default build target. It uses a level-shifter for the SWD signals, requiring a dedicated input pin (SWDI) and a combined I/O pin (SWDIO).

Pinout

Function GPIO Description
SWCLK 12 Serial Wire Clock
SWDI (Input) 13 Serial Wire Data Input (from target)
SWDIO (Output) 14 Serial Wire Data Output (to target)
UART TX (to target) 4 UART Transmit (connect to target's RX)
UART RX (from target) 5 UART Receive (connect to target's TX)

LEDs

LED GPIO Function
USB Connected 2 Lit when USB is connected and enumerated.
DAP Connected 15 Lit when a debugger host is connected.
DAP Running 16 Lit when the target is running.
UART RX (Green) 7 Flashes on data received from the target.
UART TX (Yellow) 8 Flashes on data sent to the target.

Raspberry Pi Pico

When built with the -DDEBUG_ON_PICO=ON flag, the firmware is configured for a standard Raspberry Pi Pico. It uses a simple, direct connection for SWD, assuming the target operates at the same 3.3V logic level.

Pinout

Function GPIO Description
SWCLK 2 Serial Wire Clock
SWDIO (I/O) 3 Serial Wire Data Input/Output
UART TX (to target) 4 UART Transmit (connect to target's RX)
UART RX (from target) 5 UART Receive (connect to target's TX)
nRESET (Optional) 1 Optional target reset pin (uncomment to enable)

LEDs

LED GPIO Function
Onboard LED 25 Lit when USB is connected and enumerated.

Custom Hardware

The file include/board_example_config.h provides a template for defining your own hardware configuration. Key defines include:

  • PROBE_IO_RAW: For simple two-pin SWD (SWCLK, SWDIO).
  • PROBE_IO_SWDI: For level-shifted inputs where SWD input is on a separate pin.
  • PROBE_IO_OEN: For configurations with an explicit output-enable signal for the SWDIO buffer.
  • PROBE_CDC_UART: To enable the USB-to-UART bridge.
  • PROBE_PIN_*: Defines for all necessary GPIOs.