cancel
Showing results for 
Search instead for 
Did you mean: 

SWD Interface for STM32F051 and / or STM32F030

mvonahnen
Associate III
Posted on April 15, 2014 at 01:51

I have a STM32F030 design which I migrated from a STM32F051 design.  When I read documentation on the programming interface, it specifies SWDCLK, SWDDIO, and NRST.  I noticed however that the Discovery board has another pin connected to PB3 which is called SWO.  The documentation for the STLINK-V2 also uses this pins (referred to as TRACESWO).  

The whole reason for this question is that I am having an issue talking to my design that uses the STM32F030 with the STLINK-V2.  It appears to see something, since the error code is not ''Device not present''.  I get the ''Internal Error'' which I remember getting on a STM32F207 evaluation board when I did not have PB3 connected.  I do have this pin connected on the board, but since it is not listed on the datasheet, I was wondering if possibly it had moved to another pin.

#stm32f030-stlink
3 REPLIES 3
Posted on April 15, 2014 at 02:17

The M0 core does not provide trace via SWO (PB3)

The most probable cause for not being able to connect is that the user code running is doing something objectionable* when it initially starts, and prevents the debugger from wrestling control after reset. This can be overcome by pulling BOOT0 high.

* Going into low power modes, WFI loops, DMA, reprogramming critical GPIO, etc.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mvonahnen
Associate III
Posted on April 15, 2014 at 04:15

I will try this, but this is a new board so I would expect the device to be blank.  This might be a dumb question, but will the STLINK-V2 programming adapter work with the STLINK Utility or does the SW have to be upgraded to work with the STM32F030 devices?

Posted on April 15, 2014 at 04:46

The alternative is of course that the part simply isn't running. The other signs of life method would be to try and talk to the system loader via the USART.

I'd probably look to have v17 or v19 firmware on the ST-LINK, the most current utilities should provide a upgrade to a most recent version.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..