cancel
Showing results for 
Search instead for 
Did you mean: 

Programming Bare STM32F0 Chip with Discovery SWD

rohittheozzy
Associate II
Posted on June 18, 2015 at 12:57

I have programmed many STM32F030C8 chips with Discovery board but the success rate while trying to program each Chip is very low. Some times after many tries the chip gets programmed and some times it does not work at all. Then I have to program the chip serially. And now with 20 pin STM32F0 it is not working at all. I don't seem to understand why this is happening. 

#swd #stm32f0discovery
7 REPLIES 7
Posted on June 18, 2015 at 14:49

Perhaps you can provide some salient details about your board designs, and connectivity?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
rohittheozzy
Associate II
Posted on June 19, 2015 at 07:24

For the STM32F030F4P6 Chip I have done following connections

VDD & VDDA to 3.3V

VSS to GND

BOOT open

NRST Connected to ground through capacitor.

and 

Connection with Discovery

SWDIO, SDCLK and GND connected from chip.

markb
Associate II
Posted on June 19, 2015 at 08:36

Second attempt to reply to this message (why is this forum SW so unreliable?)

All I wanted to say was that I have found that the ST-LINK/V2 dongle is much more

reliable than a discovery board when it comes to SWD programming an MCU. I found the

discovery board was very hit and miss. Even with very short wires from the discovery

to the MCU it was not very reliable and I think that EMI from the host via the USB was

not helping. With the same host and an ST-LINK/V2, it's pretty much 100% reliable.

Cheers,

Mark

Posted on June 19, 2015 at 10:46

I would:

Connect NRST to my debug interface

Have a pull-up on NRST

Have a pull-down on BOOT0

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
rohittheozzy
Associate II
Posted on June 23, 2015 at 13:24

Attaching Pull-up or pull-down causes no change.

I tried reducing the wire length and used shielded wire,  this improved the result.

But the failure rate is still very high.

I have written script to continuously try programming.

markb
Associate II
Posted on June 23, 2015 at 13:58

Try using the ST-LINK/V2 if you have one. Also it's worth trying a different host computer in case the one you are using is very noisy.

rohittheozzy
Associate II
Posted on June 27, 2015 at 09:28

Using only the discovery board I was able to program multiple chips.

I think below 3 things are required to make everything work

3 wires SWD, CLK and GND interleaved/twisted from board to chip. (Connection to RST and BOOT is not relevant)

Good mechanical connection of wire

and stable power supply to chip.

Thank you all.