Jump to content

Raspberry Pi Microcontrollers: Difference between revisions

Adding an image that shows the wiring of two Picos for debugging purposes.
Line 11: Line 11:


=== Using A Pico To Debug Another Pico ===
=== Using A Pico To Debug Another Pico ===
A Pico can be used to debug another Pico (a.k.a. target device)  by flashing it with the [https://github.com/raspberrypi/debugprobe debugprobe] binary. The debugger Pico then serves both as a USB-to-SWD and USB-to-UART bridge. The two Picos are wired as shown below.
A Pico can be used to debug another Pico (a.k.a. target device)  by flashing it with the [https://github.com/raspberrypi/debugprobe debugprobe] binary and wiring to the target Pico as shown below.


[[File:Wiring_rpi_pico_as_debugger.png | x320 px | A Raspberry Pi Pico wired to debug another Pico]]
[[File:Wiring_rpi_pico_as_debugger.png | x320 px | A Raspberry Pi Pico wired to debug another Pico]]


Note that the development machine is connected only to the debugger Pico. Console output on the target Pico is relayed through the debugger. It's possible, though, to connect a second USB cable from the development machine to the target device for simultaneous direct access to the console output.
From the debugger Pico to the target Pico, pin #4 (GP2) connects to pin SWCLK, pin #5 (GP3) connects to SWDIO, pin #6 (GP4, UART1 TX) connects to pin #1 (GP1, UART0 RX), pin #7 (GP5, UART1 RX) connects to pin #2 (GP0, UART0, TX).


The debugger Pico serves both as a USB-to-SWD and USB-to-UART bridge. The development machine needs to be connected to the debugger Pico only. Console output on the target Pico is relayed through the debugger. It is possible, though, to connect a second USB cable from the development machine to the target device for (simultaneous) direct access to the console output.


The target device can be any microcontroller that supports the CMSIS-DAP protocol over SWD.
This works not just with Pico targets. The target device can be any microcontroller that supports the CMSIS-DAP protocol over SWD.

Revision as of 2025-04-14T23:37:40

Raspberry Pi Pico Series

  • Raspberry Pi Pico
  • Raspberry Pi Pico 2

Debugging

Using the Raspberry Pi Debug Probe

The Debug Probe is a RP2040 based USB-to-UART/SWD board for connecting the USB slot of a development machine to the SWD or UART pins of a target device.

Using A Pico To Debug Another Pico

A Pico can be used to debug another Pico (a.k.a. target device) by flashing it with the debugprobe binary and wiring to the target Pico as shown below.

A Raspberry Pi Pico wired to debug another Pico

From the debugger Pico to the target Pico, pin #4 (GP2) connects to pin SWCLK, pin #5 (GP3) connects to SWDIO, pin #6 (GP4, UART1 TX) connects to pin #1 (GP1, UART0 RX), pin #7 (GP5, UART1 RX) connects to pin #2 (GP0, UART0, TX).

The debugger Pico serves both as a USB-to-SWD and USB-to-UART bridge. The development machine needs to be connected to the debugger Pico only. Console output on the target Pico is relayed through the debugger. It is possible, though, to connect a second USB cable from the development machine to the target device for (simultaneous) direct access to the console output.

This works not just with Pico targets. The target device can be any microcontroller that supports the CMSIS-DAP protocol over SWD.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.