cancel
Showing results for 
Search instead for 
Did you mean: 

How can I connect to my STM32 MCU through STLINK-V2 using STM32CubeProgrammer?

MQasi.2
Associate II

Hello,

I am trying to connect the STM32 MCU to STLINK using stm32cubeprogrammer but it shows: Error: No STM32 target found!.

0693W00000aIGK7QAO.pngi have powered the MCU by connected 3.3V to VDD and VBAT,connected GND to VSS of MCU, SYS_SWCLK to SWCLK of STLINK-V2 and SYS_SWDIO to SWDIO of STLINK-V2, i have connected an pushbutton with a PULLUP resistor to NRST pin of MCU.

when i tries to connect STM32CUBEPROGRAMMER with STM32 it shows the error given bellow.

0693W00000aIGMIQA4.pngPlease give me some suggestions.

Thanks in advance.

7 REPLIES 7
Rim LANDOLSI
ST Employee

Hello @MQasi.2​ ,

Thank you for reporting this issue.

Could you please check this few points:

  1. Check that STLinkServer is installed.
  2. Check that STLink usb drivers are installed , they will be installed with STM32CubeIde installer.
  3. When you plug the board to the PC, It should enumerate as a STLink debug probe in device manager.
  4. Upgrade STLink firmware.
  5. Check the wiring cable and find one you know for sure is a data cable.

I will be waiting for your feedback.

Thanks,

Rim

MQasi.2
Associate II

Hello @Rim LANDOLSI​ ,

Thanks for responding.

I have checked the points you mentioned, everthing seems OK but i'm still facing the same issue.

Sara BEN HADJ YAHYA
ST Employee

Hello @MQasi.2​ ,

Thanks for your feedback,

Please try to connect the MCUs NRST pin directly to the STLink-V2 NRST pin (pin 15) and make sure that the power supply VDD from the application board is connected to the ST-LINK/V2 pin1 to ensure signal compatibility between the boards.

You also need to connect at least one of STLink/V2 GND to the ground.

Let me know if it helps!

Sara.

Hello @Sara BEN HADJ YAHYA​ 

Thanks for responding.

i have did that but unfortunately it doesn't work.

Sara BEN HADJ YAHYA
ST Employee

Hello @MQasi.2​ ,

Could you please send me the schematic for further check ?

Thanks in advance,

Sara.

MQasi.2
Associate II

Hello @Sara BEN HADJ YAHYA (ST Employee)​ 

Thanks for responding.

Here is the schematics of STM32G070


_legacyfs_online_stmicro_images_0693W00000bhfRHQAY.pngHere is the schematic of STLink V2-1


_legacyfs_online_stmicro_images_0693W00000bhfRRQAY.pngand there connection is


_legacyfs_online_stmicro_images_0693W00000bhfS0QAI.pngpreviously i was trying to connect it through STlink V2 but as in its nucleo board they are using STLink V2-1.

while i try to connect the STLink V2-1 with the MCU it shows Error: No STM32 target found!.


_legacyfs_online_stmicro_images_0693W00000bhfSjQAI.pngi tried to connect via UART so i was sucessfull to connect the MCU to STM32cubeprogrammer and i have uploaded a programs hex file and the program is running fine. As i reset the MCU the program in flash is init again but i am not able to connect cube programmer to MCU via STLInk UART by showing the erorr:


_legacyfs_online_stmicro_images_0693W00000bhfTvQAI.pngI can't able to find what should i do to with which the mcu jump into system memory and run the bootloader and connect the cube programer to MCU via STLink UART.

if any thing else you need to ask i'll post it.

Thanks in advance.

Qasim.

Hello @Sara BEN HADJ YAHYA (ST Employee)​ 

Thanks for responding.

Here is the schematics of STM32G070


_legacyfs_online_stmicro_images_0693W00000bhfRHQAY.pngHere is the schematic of STLink V2-1


_legacyfs_online_stmicro_images_0693W00000bhfRRQAY.pngand there connection is


_legacyfs_online_stmicro_images_0693W00000bhfS0QAI.pngpreviously i was trying to connect it through STlink V2 but as in its nucleo board they are using STLink V2-1.

while i try to connect the STLink V2-1 with the MCU it shows Error: No STM32 target found!.


_legacyfs_online_stmicro_images_0693W00000bhfSjQAI.pngi tried to connect via UART so i was sucessfull to connect the MCU to STM32cubeprogrammer and i have uploaded a programs hex file and the program is running fine. As i reset the MCU the program in flash is init again but i am not able to connect cube programmer to MCU via STLInk UART by showing the erorr:


_legacyfs_online_stmicro_images_0693W00000bhfTvQAI.pngI can't able to find what should i do to with which the mcu jump into system memory and run the bootloader and connect the cube programer to MCU via STLink UART.

if any thing else you need to ask i'll post it.

Thanks in advance.

Qasim.