Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using a pi 400 to debug a pico

8 views
Skip to first unread message

john larkin

unread,
Jan 15, 2024, 4:05:13 PM1/15/24
to
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?


john larkin

unread,
Jan 15, 2024, 6:13:33 PM1/15/24
to
On Mon, 15 Jan 2024 13:21:14 -0800 (PST), Lasse Langwadt Christensen
<lang...@fonz.dk> wrote:
>https://www.electronicshub.org/programming-raspberry-pi-pico-with-swd/

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.




Michael Schwingen

unread,
Jan 16, 2024, 8:58:16 AM1/16/24
to
On 2024-01-15, john larkin <j...@650pot.com> wrote:
> 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.

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:

https://github.com/mschwingen/hardware/tree/master/JTAG_hat

I think this should also work an a pi400.

cu
Michael
--
Some people have no respect of age unless it is bottled.

John Larkin

unread,
Jan 16, 2024, 10:34:35 AM1/16/24
to
On 16 Jan 2024 13:58:13 GMT, Michael Schwingen
<news-15...@discworld.dascon.de> wrote:

>On 2024-01-15, john larkin <j...@650pot.com> wrote:
>> 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.
>
>What debug software are you planning to use? OpenOCD?

Whatever the pi400 uses. I'll let a programmer deal with that.


>
>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:
>
>https://github.com/mschwingen/hardware/tree/master/JTAG_hat
>
>I think this should also work an a pi400.

Is there a schematic somewhere?

I plan to make my own board, as described. I'm especially interested
in scoping realtime performance.


>
>cu
>Michael

Michael Schwingen

unread,
Jan 16, 2024, 10:57:36 AM1/16/24
to
On 2024-01-16, John Larkin <j...@997PotHill.com> wrote:
>>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:
>>
>>https://github.com/mschwingen/hardware/tree/master/JTAG_hat
>>
>>I think this should also work an a pi400.
>
> Is there a schematic somewhere?

It is linked in the description:

https://github.com/mschwingen/hardware/tree/master/JTAG_hat/pcb_ms_v3/Doc

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.

John Larkin

unread,
Jan 16, 2024, 11:36:45 AM1/16/24
to
On 16 Jan 2024 15:57:32 GMT, Michael Schwingen
Do you think it's worth buffering the SW Debug pins? I was thinking I
might buffer the clock, since it's unidirectional and maybe
edge/impedance sensitive. I have no idea what the timing from the
Pi400 will be like, but people seem to use breadboards and dangling
wires and get away with it.

If the rate is reasonably low, the SWDIO data line won't matter much.

john larkin

unread,
Jan 16, 2024, 2:02:34 PM1/16/24
to
On 16 Jan 2024 15:57:32 GMT, Michael Schwingen
This is a first pass at the dev board.

https://www.dropbox.com/scl/fi/709v4pqjhe91jnwqh4wvg/Z566_Sch_2.jpg?rlkey=fjq3a9re53cv5l0zn9ya00akk&raw=1

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.
0 new messages