cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't i connect to my STM32F103

davidmodulartech
Associate III
Posted on November 08, 2017 at 15:28

I have a ST-LINK-V1 connected to a OLIMEXINO-STM32, an F103RBT6 using the System Workbench.

Using the ST-LINK utility I can see that I communicate to the ST-LINK. I can flash the com light and change basic configuration.

But when I try to connect to the device it times out without much feedback as to why.

Trying to connect for debug on the WB there is more detailed information.

It seems to connect, I see the unit voltage but it says '0' breakpoints and something about not connecting through JTAG even though i have SWD selected. 

Since I an writing this from my cel phone, I'll submit this and go to the computer to to collect images and data and post a subsequent post.

1 ACCEPTED SOLUTION

Accepted Solutions
davidmodulartech
Associate III
Posted on November 08, 2017 at 19:23

I'm fine now. Lovely to see it working properly!! Serial com interface debugging is very tedious!!

I removed TDI and SWO, oh and uh, SWCLK was actually connected to GND. Ooops. fortunately ST designs for 'anything can happen' environments.

View solution in original post

7 REPLIES 7
Posted on November 08, 2017 at 17:02

The V1 is very antiquated.

Typical reasons for connectivity loss are reconfiguring GPIO used for SWDIO/SWCLK, entering low power mode via WFI, etc

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on November 08, 2017 at 17:34

Uhh-ohh my mistake, is a V2. I've seen a lot of suggestions involving the problem you mention, in particular trying to do the initial connect while pressing 'reset'. Doesn't seem to help.

I have 'Connect under reset' and 'hardware reset' configured, I see that it actually resets. But the system then says that the stm disconnects while connected.

Also gives a JTAG error even though I have SWD mode selected.  That I don't understand. 

I'm preoaring a bit more info now. 

Posted on November 08, 2017 at 18:12

Unfortunately I just packaged up my board to send to customer.

I'll have to find and hook up another one to get details of messages that it sends me.

I used this connection scheme:

0690X00000604CjQAI.jpg

I went to have a look and most don't seem to have SWO nor TDI connected. Will this make a difference?

The next is to see if I stepped on any DIO pins. 

davidmodulartech
Associate III
Posted on November 08, 2017 at 19:23

I'm fine now. Lovely to see it working properly!! Serial com interface debugging is very tedious!!

I removed TDI and SWO, oh and uh, SWCLK was actually connected to GND. Ooops. fortunately ST designs for 'anything can happen' environments.

davidmodulartech
Associate III
Posted on November 13, 2017 at 12:32

Oops.

Changed CPUs, now using the STM32F103c8Tx min system board.

WIred it up and although the 'SWD' connector doesn't have Reset available, it is available on the board.

It's wired properly, in fact at one point it was actually working in debug, except that I somehow had the wrong source for the binary that was being debugged. Once I straightened that out, now it gets stuck on reprogramming the flash.

It erases flash OK, but hangs on the reprogramming.

I've checked and double checked about a 1000 times. connections, configurations, changed reset configurations, you name it.

BTW, the ST-Link Utility works great. Reprograms without a hitch.

davidmodulartech
Associate III
Posted on November 13, 2017 at 12:35

In the meantime, is there a way to program using the utility and debug without erasing and reloading the flash.

I know this isn't the ideal solution, but it would be better than debugging using serial port feedback. (ugh)

davidmodulartech
Associate III
Posted on November 13, 2017 at 13:57

BTW which port should I use. 3333, 4444 it doesn't SEEM to make a difference.

Added the -d to options, now where do I find the log. I know that 'somewhere' I saw something about 'log' but I can't find it now.

Sorry I'm such a nube, at least with ST-Link.