cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Nucleo - ST Link problem

AFE123x
Associate

Hello,

 

hope everyone is well. I'm working on the software side for a micro mouse bot. We're planning on using the STM32G070RB for the microcontroller. For prototyping, I'm using the NUCLEO-G070RB. I separated the ST Link from the board, and wired the two together, as shown below (source and the schematic:(

IMG_0495.jpg

And here's the schematic below:

IMG_0496.jpg

When I flash a program (I use openOCD, but I've also tried STM32CubeIDE), it works until I unplug the ST-Link, then it doesn't seem to work until I plug it back in. Any advice? Am I missing an additional connection? 

To clarify, the Arduino powers the Nucleo board.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Probably: When USB power isn't present, the st-link chip is not powered and NRST is held low.

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

View solution in original post

5 REPLIES 5
TDK
Super User

Probably: When USB power isn't present, the st-link chip is not powered and NRST is held low.

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

Hey, thanks for the response. I'm a little confused. Is the ST link required for the microcontroller to run? I thought the st link flashes the binary onto the stm32g070rb system memory. could you clarify?

What do you mean by "unplug the ST-Link"? totally disconnect the ST-LINK from the target MCU or just disconnect the USB cable from it? in the second case (disconnect the USB cable without diconnecting it from the target MCU) makes the ST-LINK pulling down the reset pin of your target MCU.

For your second question, you don't need ST-LINK for the MCU in the final application.

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.

By "unplug the ST-Link," I mean disconnecting the USB cable from the st link. I decided to remove the nrst connection, and it seems to fix the problem. Now, the program runs after unplugging the usb from the st-link.

It is not required, but if NRST is low, the chip will be held in reset. If you disconnect the NRST line, it will work with the st-link unpowered.

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