2014-01-28 01:50 AM
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 downAnything 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?2014-01-28 02:11 AM
Hi
Why do people never read the manual?!? It is all in the manual people! See the section titled ''Debug support'' in the reference manual. There are 5 pins needed for JTAG/SWD JTMS/SWDIO - which you have JTCK/SWCLK - which you have JTDI JTDO/TRACESWO NJTRST You must actively drive the SWD pin during programming. ''Do i need to add a quartz? Why some people use a 8MHz quartz and some other 8.192MHz? '' This just provides a very stable source for clocking the processor. I do not know why people use the 8.192MHz but it should make little difference (unless you require absolute timing - in which case you must work all you timing calculations back to the the source clock)2014-01-28 02:30 AM
Thanks for the quick answer,
But if i use the Serial Wire Debug (not the JTAG)on the manual i just need SWCLK, SWDIO and the Reset (For the Reset i don't use it on my chinese board...). Or is it because it s the first time i use the chip? So if i anderstand well, external clock is just to have a more stable source, the internal one is enough to get the program on the chip.2014-01-28 02:36 AM
Hi
What are you using for the debugger? ALL debuggers must conform to the JTAG/SWD interface specified by ST2014-01-28 02:41 AM
2014-01-28 02:45 AM
'' so i designed one based on the schematic of this chinese board''
Does the Chinese board schematic use all the JTAG/SWD pins by any chance?2014-01-28 02:51 AM
Yes there is the JTAG 20 pin port, so i just wired two of them to program my board. What would be the difference using the JTAG instead of SWD?
thanks... :s2014-01-28 02:56 AM
''Yes there is the JTAG 20 pin port, so i just wired two of them to program my board. What would be the difference using the JTAG instead of SWD? ''
You have not even provided the basic SWD pins let alone the full JTAG port. JUST WIRE THE 5 PINS THAT ST SPECIFY and it will work!2014-01-28 03:09 AM
sorry, i am not sure i get it :
I have a stm32f4 discovery with only the SWD (no jtag), it works well programming the chinese board with only SWCLK and SWDIO (+gnd and VCC of course)I don't have other Pin on my programmer (no JTAG so no JTDI and JTDO)On the board i designed, i added a pull up to JTDI and JTDO (like the chinese board)2014-01-28 03:34 AM
Well, what does the chinese design do with the other 3 pins?
JTDI JTDO/TRACESWO NJTRST