Go Down

Topic: Portenta H7 SWD interface. Where is the SWDIO and SWCLK Debug pins or pads? (Read 659 times) previous topic - next topic


Not that I want to break my boards in the first week, but just in case I want to do a bit of debugging/software rebooting where is the SWD interface? On the Nano33BLE there are 5 little pads on the bottom of the board.

I can see in the top left of this link  https://www.idealchip.com/press/wp-content/uploads/2020/01/Arduino_Portenta_H7_idealchip.png that there is an SWD Debug interface.

And on the official Pinout PDF at https://content.arduino.cc/assets/Pinout-PortentaH7_latest.pdf I can see that the key says "SWD in brown" but nothing on the diagram is in brown. I can also see that PINS 75 (SWDIO) and 77 (SWCLK) on J1 (nearest 80 pin connector to the USB port) shows what I am interested in, but I don't see an easy way to connect to these pins to allow debugging/software rebooting. Any ideas, am I missing something?

I don't really want to get the PortentaH7 carrier board until I have a use for it.

This is a nice Segway to the 80 pin connector.

I have found this github site https://github.com/Rufus31415/arduino-pro-portenta-h7-carrier-board which looks interesting and does show access to SWDIO and SWCLK

From that github it looks like the 80 pin high density connectors are made by Hirose DF40C-80DS-0.4V(51) and here is a DigiKey link at $1.51 USD per connector.

Anyone want to make a small board that has one connector to 80 outputs (say 2 x 40-pin GPIO header )? That might be useful for hacking around until you can decide on getting the carrier board.


It just occurred to me that with a dual core, wouldn't it need 2 x SWDIO and SWCLK pins, one set of pins for the M7 core and one for the M4 core?  Probably why the interface is hidden since it probably is a bit more confusing than just connecting a debugger.


Love that carrier board on github. Probably going to end up having some made.


The Interactive Board Viewer is a really useful tool for trying to figure out the pin mappings. It's located at  portenta store page under the "Documentation" tab.

Example: to locate SWDIO
1. Start on the Schema view, page 1, SWDIO is wired to pin PA13 (page quadrant A1)
2. Click to highlight the SWDIO wire
3. From the properties menu to the right, click the PCB button

This will open the PCB view with that specific trace highlighted. With the SWDIO example, the PCB view will show the Test Point (TP) is located on the bottom of the board under the i2c connector, situated in a row of 4 JTAG TPs just above the top 80-pin High Density (HD) connector, 3rd in from the edge of board (from left edge looking at the bottom, USB port up). The PCB view and Schematics also show that the SWDIO pin terminates at the J1 HD connector too, pin 79. Schematics drop-down list is in the upper-left for the different page views.

As far as connecting to them, either a custom pogo pin device, a carrier board with the 80 pin HD connectors like you noted, or fine wire leads soldered to the pads...

With regards to debugging, it's just one port shared between the cores. ST has a document that covers the architecture and debugging a dual core MCU .



This interactive viewer, with the schematics, PCB and then the 3D view is very awesome. It needs it's own link instead of being just inside https://store.arduino.cc/usa/portenta-h7

Here are where the SWDIO and SWCLK pads are


I tried also to figure out, where are the SWD signals (and are they used)?
I want to connect an ST-LINK (and actually use AC6 SystemWorkbench, CubeMX etc.).

The PORTENTA H7 does not have any ST-LINK chip and the SDW signals are not used.
Instead, the board comes with mbed OS and a bootloader, a flash tool programmed already on the board, connected via USB (and COM/DFU firmware loader running after reset).

So, even I could connect ST-LINK - be careful: if you overwrite, erase, the bootloader (which seems to be located in Flash ROM 0x08000000 ... 0x0803FFFF) - you will kill your mbed, Arduino IDE Scatch download etc.

Looking at the pictures below, I was a bit confused: schematics says, the last lower pins on J1 (75, 77, 79) are the SWD signals. The J1 has actually 2x42 pins, so that the top and bottom pins do not seem to be used and not given in schematics.
But it seems to match with what the picture above shows.

TP29 ... TP32 are there with NRST, SWD (SWDIO), SCK (SWDCLK) and SWO (but shared, might be helpful to get printf messages via SWO Viewer in ST-LINK).
Look at the bottom side of PCB, USB-C is on your left: TP29 ... TP32 are on lower left end of J1, from top downwards.


Be careful if you solder to the test points - those pads lift easily.


Be careful if you solder to the test points - those pads lift easily.

I think I will wait for a carrier board before messing around with those. Thanks for the heads up.



If I can say, I'm pretty good with a soldering iron - and I almost gave up and was going to order those bare connectors on DigiKey - I lifted the two pads closest to the board edge - and then had to scrape the traces and put a tiny jumper on one to get it to work - and I was using 1mm hardware for all of this - so, yeah, if you're not good at rework I don't recommend it.  Even so, I ended up melting the end off of the J1 header almost - so, that approach wasn't the best but it is working - at least I've been able to get the GDB server to connect via JLink.

I'm going to post something else I discovered in one of your other threads regarding the DFU stuff that you may find interesting.



Go Up