Author Topic: STLink doesn't connect to STM32F101  (Read 5404 times)

0 Members and 1 Guest are viewing this topic.

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
STLink doesn't connect to STM32F101
« on: January 17, 2018, 03:41:28 pm »
I bought an STM32F101VBT6, soldered it on a TQFP100 - DIP converter PCB, checked soldering, connected all 5 power sources yet my STLink doesn't detect my STM32. I checked everything I possibly could
Any guesses on what I'm doing wrong?
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STLink doesn't connect to STM32F101
« Reply #1 on: January 17, 2018, 04:42:20 pm »
Yay, another question without any details  |O

How did you connect the STLink to the mcu? What STLink do you have? What config file did you use? What software are you using?
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #2 on: January 17, 2018, 04:45:42 pm »
STLink v2 clone; connected via SWD using the stlink util
 

Offline Rolo

  • Regular Contributor
  • *
  • Posts: 206
  • Country: nl
Re: STLink doesn't connect to STM32F101
« Reply #3 on: January 17, 2018, 04:59:48 pm »
STLink v2 clone; connected via SWD using the stlink util
Are you using the st-link programmer software? This has an option "connect under reset" somewhere. Try setting this option, while pressing reset click on "connect", release reset button. Helped me before.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: STLink doesn't connect to STM32F101
« Reply #4 on: January 17, 2018, 05:56:13 pm »
STLink v2 clone; connected via SWD using the stlink util
A clone? These things are €18 brand new original?   :palm:
Sorry but a Keil Ulink I can understand, but an STlink ? How cheap should a manufacturer make this stuff before there will no longer be clones.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLink doesn't connect to STM32F101
« Reply #5 on: January 17, 2018, 06:01:21 pm »
You should also show us how did you wire the MCU up. That also tells a lot.

Note: Connect under reset shall not be required to connect to a brand new MCU.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: STLink doesn't connect to STM32F101
« Reply #6 on: January 17, 2018, 06:09:03 pm »
Any guesses on what I'm doing wrong?
Well, one mistake is beginning your STM32 journey with a bare chip and a clone programmer. :-//

You'd be much better off buying something like a USD $12.50 STM32L152 Discovery board.

That provides you with working hardware and an official ST-Link programmer that's built-in.
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STLink doesn't connect to STM32F101
« Reply #7 on: January 18, 2018, 03:01:14 am »
STLink v2 clone; connected via SWD using the stlink util
A clone? These things are €18 brand new original?   :palm:
Sorry but a Keil Ulink I can understand, but an STlink ? How cheap should a manufacturer make this stuff before there will no longer be clones.

I have some ST-Link v2-1 from Nucleos, but I bought one of those $4 ST-Link v2 clones from eBay to see if they work, and well they do. I can debug with them no problem, so take that for what you want.

Back to the topic at hand. I just tested my ST-Link v2 clone in STM32CubeProgammer on a Mac, and I can connect to an MCU. I also tested the setup in ST-Link Utility on Windows 10, and that also worked. So the hardware can work if you know what you're doing. The OP needs to give more details.

The first thing would be to see if ST-Link Utility recognizes the ST-Link. On the menu bar select "ST-LINK" and then "Firmware update." Is the ST-Link listed there?
« Last Edit: January 18, 2018, 03:03:14 am by mbless »
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #8 on: January 18, 2018, 07:18:08 am »
I'm not new to STM32 devices lol; in fact, I have 2 STM32F407 discoveries, a STM32F769 discovery and a L011K4 nucleo
I've been using this STLink for 3 years, tested it with other boards and it seems to work just fine
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: STLink doesn't connect to STM32F101
« Reply #9 on: January 18, 2018, 08:09:03 am »
I have some ST-Link v2-1 from Nucleos, but I bought one of those $4 ST-Link v2 clones from eBay to see if they work, and well they do. I can debug with them no problem, so take that for what you want.
I am not doubting they work, it just amazes me that someone buys a $5 clone instead of an $18 original.
An Ulink that costs $200 I could understand but this is just sad.
You are from the US always complaining about how the economy is going down well here is your answer, people , like you, rather buy a cheaper stolen IP cloned products than an original. Due to the loss of income these companies can not afford to develop new IP and go belly up. Long live China and the clone wars.
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #10 on: January 18, 2018, 09:21:35 am »
I do have an original STLink v1 but my friend borrowed it so I have no choice but to use the clone which I found lying around in my office (could've used the discovery's builtin STLink but it's a bit inconvinient)
 

Offline llkiwi2006

  • Regular Contributor
  • *
  • Posts: 105
  • Country: nz
Re: STLink doesn't connect to STM32F101
« Reply #11 on: January 18, 2018, 10:13:38 am »
Does whatever program that is already on the chip disable SWD/JTAG? Boot the chip into bootloader and try connect.
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #12 on: January 18, 2018, 11:00:28 am »
Does whatever program that is already on the chip disable SWD/JTAG? Boot the chip into bootloader and try connect.
It's a fresh one



 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #13 on: January 18, 2018, 11:26:38 am »
So I decided to use openocd w/ an arm-usb-tiny
pretty much what I got
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STLink doesn't connect to STM32F101
« Reply #14 on: January 18, 2018, 01:26:10 pm »
You are from the US always complaining about how the economy is going down well here is your answer, people , like you, rather buy a cheaper stolen IP cloned products than an original. Due to the loss of income these companies can not afford to develop new IP and go belly up. Long live China and the clone wars.

Take your xenophobic generalizations somewhere else. This is not the place for political statements.
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STLink doesn't connect to STM32F101
« Reply #15 on: January 18, 2018, 01:33:29 pm »
So I decided to use openocd w/ an arm-usb-tiny
pretty much what I got

So it's trying to connect via JTAG? Earlier you said you were using SWD.

(I have no experience with JTAG so I can't help you there.)
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #16 on: January 18, 2018, 02:27:36 pm »
So I decided to use openocd w/ an arm-usb-tiny
pretty much what I got

So it's trying to connect via JTAG? Earlier you said you were using SWD.

(I have no experience with JTAG so I can't help you there.)
I did try w/ SWD earlier w/ stlink util, no luck; decided to use jtag
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #17 on: January 18, 2018, 02:32:18 pm »
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results :palm: so now at least I know the chip isn't dead and I have 2 (currently) useless uCs ::)
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: STLink doesn't connect to STM32F101
« Reply #18 on: January 18, 2018, 03:19:08 pm »
can you make a rough schematic on how you wired the mcu on the adapter ?
in the first post you wrote something about "connected all 5 power sources" - what does that mean ?

i'm used to making quick prototypes with your setup.
i got some of the same issues with the kind of clone debugger you are using so now i'm just using a STM32F051 dev board with a desoldered mcu ( read the dev. board manual as they explain how to use it as a SWD interface )
try to keep the wires between the CPU and SWD interface as short as possible

=> first post a photo / schematic to see what's connected where and how - psu decoupling, reset pin, etc.
also, post the output of openocd in swd mode
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14309
  • Country: fr
Re: STLink doesn't connect to STM32F101
« Reply #19 on: January 18, 2018, 04:14:30 pm »
STLink v2 clone; connected via SWD using the stlink util
Are you using the st-link programmer software? This has an option "connect under reset" somewhere. Try setting this option, while pressing reset click on "connect", release reset button. Helped me before.

Good catch. It could be a problem such as this. But for this option to work, you have to connect the reset pin to the matching pin of the jtag adapter (NRST?)
If you can't do that, one trick to try is to hold the µC in reset manually just before attempting to connect to it and then release the reset.

The issue there if it solves the connection problem would most likely be that the µC internal clock is stopped. When it is, you can't connect JTAG or SWD. This is an issue if your µC for instance is in stop mode while you're attempting to connect to it.

In the same vein, does the STM32F101 has an internal oscillator that it can start from? I have never used the STM32F1 family (only STM32L4 and F4, that do have an internal oscillator). If suppose it does, but if not, you may need to wire an external crystal or such.

All in all, if you're sure about power supply and SWD connections, it may be this kind of oscillator problem - something to check. SWD will not work without the µC clock running.

You could also try to lower the SWD frequency in the settings.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: STLink doesn't connect to STM32F101
« Reply #20 on: January 18, 2018, 05:45:48 pm »
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results :palm: so now at least I know the chip isn't dead and I have 2 (currently) useless uCs ::)
Are you powering VDDA in addition to all the VDD pins? Is there decoupling somewhere?

Sounds like either a power or wiring problem.
 

Offline UshiwakaTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: jp
Re: STLink doesn't connect to STM32F101
« Reply #21 on: January 19, 2018, 02:05:50 am »
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results :palm: so now at least I know the chip isn't dead and I have 2 (currently) useless uCs ::)
Are you powering VDDA in addition to all the VDD pins? Is there decoupling somewhere?

Sounds like either a power or wiring problem.
afaik VDDa and VSSa are 'optional'

Also I don't think an external osc. is required
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: STLink doesn't connect to STM32F101
« Reply #22 on: January 19, 2018, 03:08:57 am »
afaik VDDa and VSSa are 'optional'

The datasheet does say, "VDDA and VSSA must be connected ..."
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: STLink doesn't connect to STM32F101
« Reply #23 on: January 19, 2018, 07:58:31 am »
I should connect all voltages and small decoupling cap.
Measure if the internal osc is functioning at the MCO pin,
And not sure about bootpins but check anyway, these should be configured for boot from user flash.
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: STLink doesn't connect to STM32F101
« Reply #24 on: January 19, 2018, 09:56:06 am »
VDDA and VSSA are not optional.

on page 12 of the data sheet: http://www.st.com/content/ccc/resource/technical/document/datasheet/6b/28/4e/ce/a7/d3/42/8d/CD00161561.pdf/files/CD00161561.pdf/jcr:content/translations/en.CD00161561.pdf
NRST is in the VDDA domain -> VDDA domain needs to be powered as well

also, on page 16 under "2.3.9 Power supply schemes":
VDDA and VSSA must be connected to VDD and VSS, respectively.

The internal oscillator is enough to get SWD running and it's enabled by default.
Connect the 2 boot pins to a valid state - even if that's the internal bootloader.
Check that NRST is pulled high with 10K or something like that - the SWD clones can't handle low value reset resistors.
You really need some capacitors on all VDD pins - 100nF is enough to get it going.
Check the power supply voltage - it must be 3.3V and stable.
Check the current draw - you should see ~1mA or less when you pull NRST low and then it will go to 10mA or more once the chip tries to boot.
Add a clear photo with you setup, maybe someone can see something obvious.

If you don't send any of the data we requested above this will be a guessing game ...
 
The following users thanked this post: Ushiwaka


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf