cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F042 problem with SWD

daviddavid96
Associate II
Posted on November 06, 2016 at 14:17

Hi I have designed my first PCB ever so sorry if ask stupid quetions.

The thing is my board has MCU STM32F042 and is based on nucleo reference design but for some reason I can not connect my stlink to using a nucleo stlink module in ''stand alone mode''.

It seems STM does not respond. When connected nucleo Stlink its led stays red. Notice I only connect SWDCLK and SWDIO and GND pins and this setting works an a board bought from ebay without problem and also on STM I have used at my work.

My schematic can be found at:

https://github.com/mike7b4/solary2_pcb/blob/master/pdf/solary2.pdf

I have only soldered the capasitors, STM and 3v LDO(notice shematic says 3.3v it it is 3v LDO) the rest of the components is not connected. no external crystal or its caps are connected since this should not be needed when test. 

So LDO put out 3v as expected stable after around 2uS and no ripple on upstart. However I noticed SWCLK gives 3v even if stlink is not connected. Reading the HW manual it says SWCLK is pulldown? 

I have soldered 2 boards now and got same issue on both so I don't think it is a soldering issue :\

4 REPLIES 4
Posted on November 06, 2016 at 15:31

Cursory scan doesn't immediately suggest anything.

You'd want to review the orientation.

You'd want to look at the state of NRST

You are using a detached ST-LINK from a NUCLEO, right?

Are you using the ST-LINK Utilities? what exactly is the error message?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
daviddavid96
Associate II
Posted on November 06, 2016 at 17:14

Posted on November 06, 2016 at 20:28

Ok, and presumably it works with the Nucleo board, is that an F042 or F0 too? Was the eBay board an F0?

I'd prefer to use the ST Utilities rather than some third part stuff, but if this same configuration is viable for other chips, and is patched up to date, then fair enough. Make sure firmware is also current.

The next step would be to go over the due diligence work on the chip pins to the schematic and gerbers, double check the net-lists, etc.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
daviddavid96
Associate II
Posted on November 07, 2016 at 20:01

From: clive1

Posted: Sunday, November 06, 2016 8:28 PM

Subject: STM32F042 problem with SWD

> Ok, and presumably it works with the Nucleo board, is that an F042 or F0 too? Was the eBay board an F0?

Nope STM32F103

> I'd prefer to use the ST Utilities rather than some third part stuff, but if this same >configuration is viable for other chips, and is patched up to date, then fair enough. Make >sure firmware is also current.

ST utilitius is not available in Linux. But in this case it is not st-tuil related (at first atleast)

Normally one of the leds blinks green on stlink when it has got contact with the MCU. This is before it has talked to st-util daemon.

Btw. my nucleo stlink run latest FW (V2J28M16)

> The next step would be to go over the due diligence work on the chip pins to the > > schematic and gerbers, double check the net-lists, etc.

yep doing that again now.

From: hermansson.mikae.001

Posted: Sunday, November 06, 2016 5:14 PM

Subject: STM32F042 problem with SWD