using a pi 400 to debug a pico

Jan 15, 2024 Last reply: 2 years ago 4 Replies

The Raspberry Pi pico has its 3-pin SWD debug port. I'd like to connect it to the 40-pin header on the back of the Pi400, to use the



400 as the dev/debug platform for some RP2040-based boxes.

Has anyone done this? What Pi400 pins connect to the SWD port?



Googling doesn't help. I have the RP400 Beginners Guide book and it doesn't mention doing this.



Anybody have links about doing this?



It doesn't say so, but when he says "raspberry pi" I think he means a Pi3. I'll be using a Pi4, inside the Pi400 unit, but I expect the pins are the same on its 40-pin header.

Oh, I found a reference in the book "Programming the Raspberry Pi Pico/w in C". Looks like the same pins, GPIO24(18) and GPIO25(22).

Thanks

I'm designing a PCB that will have a 40 pin ribbon cable connector to the Pi400 and a 20-pin ribbon to the various RP2040 target boards. It will do the debug connection and have a bunch of scope mux's and DVM mux's and stuff, to make it easy to time code execution and check the power supplies and such.

Looks like I can power my board from the 40 pin header too.

What debug software are you planning to use? OpenOCD?

The pinout seems to be quite flexible - look at interface/raspberrypi-gpio-connector.cfg in the OpenOCD sources / distribution.

If you want something nice with level translation that handles power sequencing between Pi and Target board, the JTAG Hat should do what you want:

formatting link
I think this should also work an a pi400.

cu Michael

It is linked in the description:

formatting link
It's basically a bunch of 74LVC2T45 (which handle the "one side powered down" as well as the level-shifting), plus open-drain drivers for the reset signals. Note that you need to switch direction for the SWDIO signal, the rest is unidirectional.

cu Michael

This is a first pass at the dev board.

formatting link
It would be used in development and production test. Every RP2040-based board would have the small-pitch 20 pin ribbon cable header.

The pushbuttons look primitive but will probably work.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required