Skip to main content
Visitor II
May 7, 2019
Question

When using the ST-LINK Utility, it doesn't connect to the Discovery card.

  • May 7, 2019
  • 7 replies
  • 1985 views

I'm using True Studio to compile a sample PWM program and using ST-LINK to program the device. It worked for the first 20 or so iterations but now it won't connect. It gives me this message:

0690X000008BLcBQAW.jpg

OK I go to settings and there is no where to select "Connect Under Reset" nor is there anywhere to select a lower SWD Frequency. I had changed the ABH prescaler in clock configuration of MXCube from /1 to /16 going by the PWM example I found, but when I tried to change it to / 64 it quit working.

    This topic has been closed for replies.

    7 replies

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    I guess I wiped out the on-board ST-LINK since I was connected via the USB port. But I have a ST-LINK V2 programmer so I probably just need to connected it to the (4) SWD pins on the board.

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    Assuming pin 1 of the SWD port is near the usb end of the card I connected according to the table 2 on page 24 of the manual:

    1) VDD

    2) SWCLK

    3) GND

    4) SWDIO

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    Nope, that didn't work. I think there's a way to reflash it using the serial port...

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    OK, you have to hold down the reset button for at least 1 second and then try to connect, then release the reset button.

    Graduate II
    May 7, 2019

    So perhaps your code is reconfiguring the SWD/JTAG pins, or going into a low power mode. The other alternative is to strap BOOT0 HIGH, or select "Connect Under Reset" type options, which requires you also wire up NRST

    Visitor II
    May 7, 2019

    Which STM32 part number and is it custom board ? If yes, which signals are connected between STM32 and STLinkV2?

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    It's the STM32F100RB. I was using VCC (3v3), gnd, SWDIO and SWCLK. It works fine now connected to the USB port after I hit reset just after trying to connect with the ST-LINK utility. I had the same problem with an STM32F103C8T (Blue Pill) for a while and I'm wondering if it caused another problem I asked about in one of my other posts.

    Dan in WYAuthor
    Visitor II
    May 7, 2019

    https://community.st.com/s/feed/0D50X0000AhOHAY

    I had a problem with the Blue Pill's outputs not working. The only pins that work are A0->A3, A9, A10 & B12.