cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 - programming ?

nick239955
Associate II
Posted on October 03, 2012 at 18:34

Hello,

I have a STM32F0 on a custom board that I'm trying to program via SWD using IAR and a ST-LINKv2 dongle I got after cutting a discovery board in two.

What happens is I always get the fatal error - no MCU device found error... although everything seems in order.

Both VDD, VDDA and NRST are high with 100nF caps, all pins get nice stable 3V3. BOOT0 is high with the resistors as datasheet suggests. CLK and DATA are both connected properly - PA14 to  pin 2 and PA13 to pin 4 on the CN3 header. Both jumpers removed from the ST-LINK. 

Earlier I thought maybe I broke it when i sawed it off but i've also tried with an intact Discovery kit (jumpers off) and same thing happens.

Would appreciate any suggestions?

Thanks!
4 REPLIES 4
Posted on October 03, 2012 at 19:25

I'm not sure there is a quick way of detecting signs-of-life as by default it doesn't enable external clocks.

One suggestion would be to start the device in System Loader mode (BOOT0=1), and then send a 0x7F at 9600 8E1 to USART1, this should elicit a 0x79 response if the chip is alive.

If it is not, I'd be looking at the supplies, and the state of the NRST pin. For example is the POR circuit clamping it low?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 03, 2012 at 19:34

What about the solder bridges SB19 and SB22?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on October 03, 2012 at 19:57

I guess you checked all connections, especially on your custom board to the pins. And probably also to the neighboring pins, to exclude shorts.

Both VDD, VDDA and NRST are high with 100nF caps,...

 

That's o.k. for Vdd, but rather high for the reset pin.

I would recommend not more than a few nF, and a 0.1...1k resistor.

nick239955
Associate II
Posted on October 07, 2012 at 16:53

Turns out the boot0 pin had nothing to do with it. SWDIO needed to be pulled up to VDD with a 100K res. Found it somewhere on the ARM site in very small letters.