cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RBT6 basic requirement to load program with SWD

jean2
Associate II
Posted on January 28, 2014 at 10:50

Hi! 

I have been playing with a STM32f103rbt6 chinese board for the last few months, it's working well. I am using the SWD of my stm32F4 discovery to upload the program. 

Now i wanted to make my own board, so i designed one based on the schematic of this chinese board and the same micro-contrôleur, but impossible to program it... I always get a ''Can not connect to target'' error with stm32 utility. 

So i focused on what's is really important to just push a program with SWD, i have : 

 -Every VDD to a 3.3V, all of them with 1uF capacitor. 

 -All the VSS to the ground

 -Reset with 10k pull up

 -BOOT0 and BOOT1 to the ground

 -SWDIO to PA13 with 10k pull up

 -SWCLK to PA14 with 10k pull down

Anything else really mandatory to upload with SWD? Do i need to add a quartz? Why some people use a 8MHz quartz and some other 8.192MHz? 
19 REPLIES 19
jean2
Associate II
Posted on January 28, 2014 at 12:54

the three are pull up with 10k resistor... so that's what i did on my design

chen
Associate II
Posted on January 28, 2014 at 13:06

Let try it another way - What are your differences with the Chinese design?

jean2
Associate II
Posted on January 28, 2014 at 13:31

I post the schematic of my board, and the one of the chinese board. There is a lot of differences between the two boards, because i had to remove and add a lot of fonctionnality.

The connector P1 is my swd connector (only 4 pin of the 6 are linked)

But on the basic STM32 to make the programmation possible, it s quiet the same... that's the problem :s

I am gonna try to print another one and see... i checked all the pin, but maybe my board has a problem.

If you have any advice on my schematic... would be a great help ^^

thanks

From: sung.chen_chung

Posted: Tuesday, January 28, 2014 1:06 PM

Subject: STM32F103RBT6 basic requirement to load program with SWD

Let try it another way - What are your differences with the Chinese design?

________________

Attachments :

Schematic_STM32F103_Board.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0sA&d=%2Fa%2F0X0000000ber%2FKZKDunTAA6wHVxbruGfeV5DLnhpQE5dkkC21dk2YVJU&asPdf=false

STM32F103.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0s5&d=%2Fa%2F0X0000000bep%2FphEEzjWpPlvN1c9kqYQHA_uKuRIgUIFcnXxibM0P6IU&asPdf=false
jean2
Associate II
Posted on January 28, 2014 at 13:38

the schematic are in attachement, 

I checked the Olimex STM32F103 board, there is a difference : the PA14 JTCK has a pull up, and my design has a pull down (the chinese one as well), maybe it s this... 

jzawadzk
Associate II
Posted on January 28, 2014 at 14:08

Here's how my setup looks like (due to very limited board space it's absolute minimum):

 -Every VDD to a 3.3V, all of them with 100nF capacitor, 

-All the VSS to the ground

 -Reset, 100nF to GND, no pull up (according to datasheet it's already inside the chip)

 -BOOT0 and BOOT1 to the ground

 -SWDIO to PA13 no pull up

 -SWCLK to PA14 no pull down

works just fine with STM32F4 discovery board as a debugger/programmer.

if you need precise clock source (for example for USB), use external 8.000MHz,

if you need Ethernet, use external 8.192MHz,

otherwise you can use internal 8.000MHz
Posted on January 28, 2014 at 15:08

CAN and USB need a crystal to meet specs

ETHERNET does too, but these may be on the PHY, and 50 MHz or 25 MHz, for ST designs. If you use a 25 MHz HSE you can output that via MCO1, or 25/50 via the main PLL if you run the CPU at a multiple thereof, or MCO2 if you exploit PLLI2S

USB HS PHY often have 24 MHz or 26 MHz

Do you have any Ethernet examples, or other boards, using 8.192 MHz? (512 KHz PCM audio?)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jean2
Associate II
Posted on January 28, 2014 at 18:55

THANKS A LOT :) 

I have no ethernet connection, i think the 8Mhz will do just fine, i try all of this tomorrow with this minimum component, but it should be all right ;) 

jean2
Associate II
Posted on February 03, 2014 at 08:43

Hi,

Spend some time on the weekend to try to figure it out... no results yet.

So i came back on the basics and i made a new board just to allow me to solder easily the Pin of the STM32F I wired everything like we said (RST with Pull Up, BOOT1; BOOT2, PA13 and 14 for SWD) and all the VCC/VSS with 100nF capacitor). But still no results.

I start to wonder if the oven i use to melt the solder past doesn't go to strong and kill the chip (240°C should be all right for components no?) because i really don't see any other things to do. I bought the ST-Link, it should arrive soon, so i can test with the full JTAG and not only PWD, but i don't think it would change a lot...

I added i picture of my board, any advice is welcome, i am quiet lost on what i should do :s

________________

Attachments :

photo.JPG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0s0&d=%2Fa%2F0X0000000beo%2FEOV4XRRH2JM9ADdkjK.6D4WtQ0Hc9HdgTO_iuNoRgX4&asPdf=false
Posted on February 03, 2014 at 09:35

And what net exactly is VDDA attached too? In your circuit diagram posted earlier is see a capacitor to ground, but no supply anywhere. You need an analogue supply, as it's attached to the power-on-reset circuitry.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jean2
Associate II
Posted on March 04, 2014 at 17:02

Success!!!!!!!

Took me a while, i wasn't home last month, but i discover my problem. And it s a very stupid one :s

I took the schematic on the file i attached, everything is good exept that i made my design thinking the way you turn the micro-controleur is the same as the writing of this file... so my uC was on a bad position of 90°... and of course nothing was working ^^. Its working perfectly with just few capacitors.

Now i just have to draw again my PCB, and it s gonna be good!!

Thanks a lot for your help and advice

________________

Attachments :

STMF103RxTx_pinout.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0ph&d=%2Fa%2F0X0000000ben%2Fj5iNxoajLcUDPEefuBpKILjfioNW2qsCdzc6MaMOWE4&asPdf=false