cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner`s ask for help to flash the STM32

Vilius
Associate II

Hi,

I am an absolute beginner in STM32 ecosystem. This is my first time programing an STM32. My MCU is STM32F756VGH6 in TFBGA100 package. I wrote a simple led blink program and encountered a problem while trying to flash the MCU (got some kind of error while trying to flash directly from the STM32CubeIDE). After consulting with my friend, I tried only building the project in the STM32CubeIDE and using STM32CubeProgrammer to flash the MCU. However, there was no luck yet... While trying to flash the .elf file from the project`s debug folder I was constantly getting error ,,Problem ocurred while trying to connect". I guess its worth mentioning that I was also constantly getting message that I should update my stlink`s firmware, but that process was not successful either.

For the record, my stlink is not an original one (picture down below), but it worked for my friend, and also a few years ago I programmed an STM8 with it, so I guess this should not cause any problems - the programmer has to be working.

I made sure that my wiring is correct, I am getting the 3.3V where it has to be... I made a custom PCB just for the TFBGA100 to 2.54 header adapter and already put solid amount of decoupling smd capacitors on the other side of the board, I believe it has nothing to do with hardware also...

I tried to connect the stlink`s RST pin with NRST pin on the MCU, also tried to connect a reset button with a pull-down resistor and capacitor to it, I have not noticed any difference...

What else could be wrong? Any hints or observations? Thank you in advance

Sorry for the extensive post, just wanted to get in front of some of the obvious and regular answers...

41 REPLIES 41
TDK
Guru

There have been a lot of posts lately from people with counterfeit programmers with this error. Seems STM32CubeIDE may have been updated to reject them.

Programmers (at least STLINK-V3MINIE) and nucleo boards are cheap, recommend getting one of those. I doubt ST is making any profit off of them.

If you feel a post has answered your question, please click "Accept as Solution".

I did some experiments with an old blue-pill including an old programmer identical to the on of the OP from similar origin. (If I am not mistaken, the black V2 ST-Link programmer used to work with STM32CubeIDE properly)

My findings point in the same direction as indicated by @TDK:

  • STM32CubeIDE is refusing to connect to the blue pill but request a firmware upgrade.
  • Firmware upgrade process gives strange feedback messages (upgrade succeeded and failed together ?):

Johi_0-1690563498507.png

Trying to reconnect -> same cycle restarts

Using STLINK V3-Set, programming and debugging works as it should.

Johi_1-1690564972655.png

 

So the conclusion is that my third-party programmer just wont work, I have to buy V3 one and thats simply a given?

If you want to use ST tools, yes it appears that is the case, for now. Until the cloners update their firmware to trick the ST software once again, and the saga continues.

And just to be clear, official V2 programmers will still work fine as well.

If you feel a post has answered your question, please click "Accept as Solution".
Amel NASRI
ST Employee

Hi All,

The content of this article may be helpful here: https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/ta-p/49471.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Vilius
Associate II

Ok, a little update...

I got an original stlink V3 with the latest software. Also wrote a simple LED blik program that does compile, however, I encountered problems while flashing again. 


No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication

Thats what the STM32CubeProgrammer tells me when I press ,,Connect" button in the STM32CubeProgrammer... Some other details:

Stlink NRST -> NRST stm32

Stlink DIO -> PA13 stm32

Stlink CLK -> PA14 stm32

Stlink GND -> GND stm32

Stlink VCC is not connected anywhere


BOOT0 is pulled up via 4.7k to VCC
I am getting the 3.3V on the power pins (I use a 3.3V regulator powered by 5V usb supply), the voltages are all ok.
It could look like a simple mistake for you, but I dont really have any experience with STM32, any ideas how to fix it? If you need any additional information, please, let me know...

Should work. Double check your pin connections. Shouldn't need to, but you can click "connect under reset" to prevent bad code from re-assigning the SWD pins.

How confident are you that the BGA is properly soldered?

Are VCAP decoupled to ground with a 2.2 uF cap? Are VCAP voltages ~1.2V?

Are VDDA and all other VDD pins powered? VSS/VSSA all connected? Other schematic errors?

Typically BOOT0 is pull down to GND, not to 3V3, so that user code is run on startup. Not the problem here though.

If you feel a post has answered your question, please click "Accept as Solution".

Connect the VCC to ST-LINKv3.

NRST pull up and BOOT0 pull down is normal config.
On your V2 pill you connect RST , but this is designed for STM8 . For STM32 you dont connect it. And use ST Link utility instead programmer may work.

For your new V3 i mean as TDK you BGA isnt right soldered. For manual soldering at home is more beter use packages where you see what you do.

Try check your V3 on other board for example Nucleo ... Maybe show your schematics helps.

And i hope you dont insert pins inside

MM1_0-1698693168251.png

because allinline is in short circuit = newer work...