• using a pi 400 to debug a pico

    From john larkin@3:770/3 to All on Mon Jan 15 13:05:06 2024
    XPost: sci.electronics.design

    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?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From john larkin@3:770/3 to langwadt@fonz.dk on Mon Jan 15 15:13:21 2024
    XPost: sci.electronics.design

    On Mon, 15 Jan 2024 13:21:14 -0800 (PST), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    mandag den 15. januar 2024 kl. 22.05.18 UTC+1 skrev john larkin:
    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?

    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Michael Schwingen@3:770/3 to john larkin on Tue Jan 16 13:58:13 2024
    XPost: sci.electronics.design

    On 2024-01-15, john larkin <jl@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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From John Larkin@3:770/3 to news-1513678000@discworld.dascon.de on Tue Jan 16 07:33:19 2024
    XPost: sci.electronics.design

    On 16 Jan 2024 13:58:13 GMT, Michael Schwingen <news-1513678000@discworld.dascon.de> wrote:

    On 2024-01-15, john larkin <jl@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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Michael Schwingen@3:770/3 to John Larkin on Tue Jan 16 15:57:32 2024
    XPost: sci.electronics.design

    On 2024-01-16, John Larkin <jl@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.

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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From John Larkin@3:770/3 to news-1513678000@discworld.dascon.de on Tue Jan 16 08:35:30 2024
    XPost: sci.electronics.design

    On 16 Jan 2024 15:57:32 GMT, Michael Schwingen <news-1513678000@discworld.dascon.de> wrote:

    On 2024-01-16, John Larkin <jl@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.

    cu
    Michael

    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From john larkin@3:770/3 to news-1513678000@discworld.dascon.de on Tue Jan 16 11:02:19 2024
    XPost: sci.electronics.design

    On 16 Jan 2024 15:57:32 GMT, Michael Schwingen <news-1513678000@discworld.dascon.de> wrote:

    On 2024-01-16, John Larkin <jl@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.

    cu
    Michael

    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)