cancel
Showing results for 
Search instead for 
Did you mean: 

Please hint me on how to program with ST-Link

kevin1971
Associate II

Dear ST

 

I tried to connect with MCU "stm32l07x using STM32CubeProgrammer as below image 1, image 2.

kevin1971_1-1700453285443.png

kevin1971_0-1700453258263.png

 

Board power is 3.09V to be measured by ST-Link.

However, I can't program it.  carefully check the st-link pin maps as VCC(#1), SWDIO (#7), SWCLK(#9), RST(#15), GND(GND). In here (#1), (#7), (#9), (#15), (#GND) is for 20 pins header. VCC/ SWDIO/ SWCLK/ RST/ GND is for ST-Link. 

Please hint me on how to trobleshoot for it.

 

Thanks advance.

Best Regards,

 

Kevin,

 

1 ACCEPTED SOLUTION

Accepted Solutions
InsignificantBit
ST Employee

Hi, the problem with connecting to the target MCU can be caused by myriad of possible hardware problems.

One common cause is when the MCU program somehow misconfigures the debug peripheral (most commonly the GPIO used by SWD). It's possible to get out of that state by keeping the MCU under reset manually (by holding the reset button), then clicking "Connect", and then shortly after releasing the reset. Changing the mode to "Under reset" might be necessary. If this doesn't help, you can try doing the same, but disconnect the power to the target MCU, hold the reset button, connect the power while holding the MCU under reset, then click "Connect", then release the reset. Once connected, perform a mass erase of the flash. If you were able to connect to the board previously, this is the likely issue.

Other possible causes can be shorts or bad connections (use multimeter continuity check to see whether any of the pins are shorted together and use diode tester to see whether the revers polarity protection diodes can be measured between the programming connector pins and the ground), damaged MCU, bad orientation of the chip, multiple ST-Link probes being connected to PC and having selected the wrong one, and myriad of other reasons.

View solution in original post

5 REPLIES 5
TDK
Guru

Is this a custom board? Which chip is this exactly (part number)?

Verify power to all VDD/VDDA pins and ground to all VSS/VSSA pins. Perhaps show your schematic.

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

...and try: set > reset mode to : software..reset

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

Suggests part is not electrically functional.

Double check power and perhaps check others signs of life. Say AN2606 and AN3155 sending 0x7F data pattern at 9600 8E1

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
InsignificantBit
ST Employee

Hi, the problem with connecting to the target MCU can be caused by myriad of possible hardware problems.

One common cause is when the MCU program somehow misconfigures the debug peripheral (most commonly the GPIO used by SWD). It's possible to get out of that state by keeping the MCU under reset manually (by holding the reset button), then clicking "Connect", and then shortly after releasing the reset. Changing the mode to "Under reset" might be necessary. If this doesn't help, you can try doing the same, but disconnect the power to the target MCU, hold the reset button, connect the power while holding the MCU under reset, then click "Connect", then release the reset. Once connected, perform a mass erase of the flash. If you were able to connect to the board previously, this is the likely issue.

Other possible causes can be shorts or bad connections (use multimeter continuity check to see whether any of the pins are shorted together and use diode tester to see whether the revers polarity protection diodes can be measured between the programming connector pins and the ground), damaged MCU, bad orientation of the chip, multiple ST-Link probes being connected to PC and having selected the wrong one, and myriad of other reasons.

liaifat85
Senior III

Here is another thread about this error message: https://community.st.com/t5/stm32cubeprogrammer-mcus/how-do-i-solve-this-error-quot-error-no-stm32-target-found-if/td-p/51868

You can check the solution suggested by the STM employee. 

If you need some clearer instructions about how to use STMcube, you can check this article here:

https://www.theengineeringprojects.com/2021/10/first-project-using-stm32-in-stm32cubeide.html