How to use SWO with STM32 F405 Feather Express?

Post here first, or if you can't find a relevant section!
Post Reply
vs13
Posts: 1
Joined: Fri Jul 05, 2024 3:16 pm

How to use SWO with STM32 F405 Feather Express?

Post by vs13 »

I have a STM32 F405 Feather Express board that I can't seem to connect to read Serial properly and receive Serial output from the board through Arduino when I know the program has been uploaded correctly and the program is running. I'm trying to explore using SWO instead using an STLink V3 MINIE but I can't figure out how to connect the SWO pin. Would anyone be able to explain the hardware connections?
Attachments
STLink Connections.png
STLink Connections.png (88.47 KiB) Viewed 2439 times
STM32ardui
Posts: 142
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: How to use SWO with STM32 F405 Feather Express?

Post by STM32ardui »

You need SWCLK and SWDIO.
SWD Port

On the bottom there is also a 2x5 connector pad that can be used to connect an SWD debug port for advanced uses. We don't solder the connector in place because it would take up space and make it hard to insert into a breadboard. However, you can pick up a 2x5 connector and solder it yourself! Pinout matches any/all JLink/SWD programmers with 2x5 connectors.
Here you can see schematic:
https://learn.adafruit.com/adafruit-stm ... /downloads
So you know, wher connect GND, SWCLK and SWDIO.
ag123
Posts: 1907
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: How to use SWO with STM32 F405 Feather Express?

Post by ag123 »

instead of using SWO, my guess is it is normally easier to simply Serial.println("hello world");
in fact it is probably easier to simply use a UART e.g. Serial1.println("hello world"); if one don't want to use the USB CDC serial interface.
beyond that, learn to debug a soc, you can literally trace the execution step, continue, return, breakpoints etc.
F405 feather express a problem is accessibility of those SWD pins, but that at least they left the pads there.
it isn't as straightforward as simply connect dupont wires, it'd take an adapter of some sort or perhaps solder fpc wires there.
Post Reply

Return to “General discussion”