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?
Yay, another question without any details
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?
STLink v2 clone; connected via SWD using the stlink util
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.
STLink v2 clone; connected via SWD using the stlink util
A clone? These things are €18 brand new original?
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.
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.
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.
STLink v2 clone; connected via SWD using the stlink util
A clone? These things are €18 brand new original?
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?
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
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.
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)
Does whatever program that is already on the chip disable SWD/JTAG? Boot the chip into bootloader and try connect.
So I decided to use openocd w/ an arm-usb-tiny
pretty much what I got
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.
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.)
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
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results
so now at least I know the chip isn't dead and I have 2 (currently) useless uCs
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
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.
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results 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.
*sigh*
Okay so I decided to go out and buy another STM32F101 and a LQFP100 -> DIP PCB
still the same results 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
afaik VDDa and VSSa are 'optional'
The datasheet does say, "VDDA and VSSA must be connected ..."
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.
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.pdfNRST 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 ...