Skip to main content
Francesco Sfragara
Associate
February 19, 2018
Question

Keil: SWDIO no target connected

  • February 19, 2018
  • 4 replies
  • 9056 views
Posted on February 19, 2018 at 14:48

I'm using a stm32f407vg board. Suddenly I can't download my code to flash memory anymore. I'm using the keil toolchain. I tried stm32 st-link utility, but it can't connect to target either. I tried the option 'connect under reset', but it didn't work. I tried to unistall and install again the st link drivers and utility, but it didn't work. 

Can somebody please help me? Thanks.

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    February 19, 2018
    Posted on February 19, 2018 at 15:32

    Try pulling BOOT0 high, reset, and program/erase via ST-LINK Utilities

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Andrew Neil
    Super User
    February 19, 2018
    Posted on February 19, 2018 at 15:56

    Cross-post: 

    http://www.keil.com/forum/63376

     
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    ACarb
    Visitor II
    November 14, 2018

    I've solved the issue following these steps:

    -Install STM32 ST-LINK Utility;

    -Open it, click on ST-LINK -> Firmware update;

    -Plug your board, then click on Device Connect. If the board is recognised proceed with the firmware update (click yes), otherwise check if the drivers are correctly installed;

    -Click on Target -> Settings. Under "Mode" select "Connect under reset". Leave all the other settings as default;

    -Go on Target -> Connect. You are now connected to the board (see the registers);

    -Finally click on the red Rubber figure (Full Chip Erase).

    Now you should be able to download your code into the flash using Keil.

    RKlaj
    Visitor II
    May 21, 2019

    Hi, thank you for sharing the solution! I had the same issue and it worked for me too.

    ersinkecis
    Visitor II
    June 30, 2019

    hi, thank you for all.

    but this solution is not working for me. :(

    sometimes connecting. sometimes does not connect.

    Is there anyone have an idea?

    STLinkUSBDriver.dll v5.1.2.0

    ST-LINK Firmware v2.J34.S7

    Tesla DeLorean
    Guru
    June 30, 2019

    Does your device go into a low power mode? Interfere with clocks, or pins related to SWD interface? NRST connected?

    Try "Connect Under Reset"

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    ersinkecis
    Visitor II
    July 1, 2019

    like you said, because I use a low-powered power supply. thank you so much.