Skip to main content
Francesco Sfragara
Associate
Feb 19, 2018 1:48 PM UTC
Question

Keil: SWDIO no target connected

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.

    8 replies

    Tesla DeLorean
    Guru
    Feb 19, 2018 2:32 PM UTC
    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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Andrew Neil
    Super User
    Feb 19, 2018 2:56 PM UTC
    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
    Nov 14, 2018 12:34 PM UTC

    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 6:13 PM UTC

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

    ersinkecis
    Visitor II
    Jun 30, 2019 9:53 PM UTC

    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
    Jun 30, 2019 11:45 PM UTC

    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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ersinkecis
    Visitor II
    Jul 1, 2019 10:09 PM UTC

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