Skip to main content
Bjoernar Maelum
Associate
March 15, 2017
Question

STM32F407 and UlinkPro D

Posted on March 15, 2017 at 17:45

Hello!

I want to program/debug an STM32F407 using the UlinkPro D. I have connected the Ulink to STM32 using datasheet for the micro controller and found what I think is the correct pinout for the Ulink.

Serial Wire Debug is being used as this seems the easiest, unless you have a better suggestion for this micro controller.

I am a beginner at this and wonder if there is a tutorial somewhere, and if not: Can I find a Setup Guide of some sort to connect the two devices?

Is there anything specific I have to do to the STM32 or in Keil other than checking if the Ulink is connected and then trying to flash?

The error 'SWD Communication Failure' is showing when I look at setting under 'Debug' in the 'Options for target...'.

Thanks,

Bjørnar
    This topic has been closed for replies.

    9 replies

    Tesla DeLorean
    Guru
    March 15, 2017
    Posted on March 15, 2017 at 18:25

    http://www2.keil.com/coresight/coresight-connectors/

     

    Sounds like it is not wired up properly. External pods tend to depend on getting the VTref (Target Voltage) to power their buffers. Make sure you don't have the connection backward.

    For wiring of the board headers, I suggest a review the STM3240G-EVAL or MCBSTM32F400 schematics. The later I've used with the U-LINK Pro (non D), you have to disconnect some high order address pins via jumpers for trace

    http://www.keil.com/mcbstm32f400/

     
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Bjoernar Maelum
    Associate
    March 16, 2017
    Posted on March 16, 2017 at 15:06

    It seems I have connected the pins correctly.

    The reason I am doing this is to learn how to program the STM32F407VGT6 chip. I am making my own PCB and want to know how to program the chip before I print the PCB. Is it better to use an ST-Link for this? As I mentioned earlier I am fairly new to this and does not know quite where to begin. 

    Using SWD it seems I only need SWDIO, SWCLK, 3V/VDD and GND to program the chip, is this correct? 

    Tesla DeLorean
    Guru
    March 16, 2017
    Posted on March 16, 2017 at 15:53

    I would add NRST to that list, I'd also recommend adding SWO (PB3) to permit the Serial Wire Viewer (SWV) to work.

    The 3V (VTref) is needed for buffered pods, if you use a DISCO/NUCLEO board this isn't required as there are no buffers.

    We use full JTAG on the 10-pin header as it permits boundary scan of the boards.

    A cheap ST-LINK is perfectly adequate to program/debug boards.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Bob Boys
    Visitor II
    March 3, 2018
    Posted on March 03, 2018 at 20:44

    Hello

    Here is an answer I received from Hans, one of the Keil engineers:

    The TRST signal was never really necessary. It exists on many ARM7/9 and also Cortex-M3/4 devices but it is only available in the old 20 pin JTAG connector. The newer 10 pin Cortex and 20 pin Cortex+ETM connectors do not contain this signal. There are newer devices (especially Cortex-M0) which only have a SWD (no JTAG) interface and they don?t have a TRST signal at all. So one can leave this signal off. This saves one pin.

    uVision uses the methods to RESET the part:  you can select them here:

    A ULINK D is a ULINKpro without ETM instruction trace.  SWV works fine.

    0690X00000609tdQAA.png
    Bjoernar Maelum
    Associate
    March 3, 2018
    Posted on March 03, 2018 at 22:53

    Thank you, Clive and Bob!

    Sorry for not responding to this thread until now.

    I have resolved the issue and the PCB is working perfectly. This project was finished in June 2017 but I forgot to respond to this thread. 

    I looked up the documentation and we ended up connecting

    the SWCLK to PA14, SWDIO to PA13 as well as 3V3 and GND signals to the STM32-chip. Keil found the ST-link and both debugging and programming worked perfectly. 

    We used the ST-LINK/V2 for this.

    http://www.st.com/en/development-tools/st-link-v2.html

     

    Thanks for the help!