Skip to main content
Explorer II
April 28, 2024
Solved

STLINK-V3MODS SWD protocol

  • April 28, 2024
  • 3 replies
  • 3060 views

Hello everyone.

I want to connect a STLINK-V3MODS to a microcontroller STM32L031 using SWD protocol, I have tried the following the following conection:

Gomar_0-1714322235216.png

Is that enough to flash a program using stmcube mx?

    This topic has been closed for replies.
    Best answer by AScha.3

    Ooooo, 

    1. connect ALL Vss to gnd and ALL Vdd/Vdda to 3v3 .

    2. place cer.caps CLOSE to vss/vdd from cpu , maybe solder smd cer.cap at/between pins of pinheader;

     0805 size can be soldered perfect between two pins at 0,1" distance. (pin 16 -- 17 )

     

    Then try connect again.

    3 replies

    Super User
    April 28, 2024

    Hi,

    >I want to connect a STLINK-V3MODS

    ok, but its connections are on the edge - not the STDC14 connector. So this cannot work. :)

    see manual:

    AScha3_0-1714323037073.png

    -> STLINK-V3MINI only !!!

    >Is that enough to flash a program using stmcube mx?

    If you make the connections to the edge connector : yes, just need : gnd, vdd (input), swd , swc .

    AScha3_1-1714323322485.png

     

    GomarAuthor
    Explorer II
    April 28, 2024

    Thank you! I am going to be careful when reading datasheet :D

    GomarAuthor
    Explorer II
    May 12, 2024

    I already tried the solution bit it is still not working for me.

    I Update connecttions as follow:

    Gomar_0-1715553149993.png

    I run debug in STCube and got the following error:

    Gomar_1-1715553216514.png

    I connected a logic analyzer in swd wires and I see that there are communication

    Gomar_2-1715553290885.png

    Since I am using Ubuntu as OS, I gave all permission to the programmer (sudo chmod 777 /dev/ttyACM0)

    Someone know what else I have to do in order to flash a program?

    Super User
    May 13, 2024

    >I connected a logic analyzer in swd wires and I see that there are communication

    Good, so it should work...

    Can you install CubeProgrammer ? We can see more info about, whats not working .

    AScha3_0-1715580846396.png

    +

    Is your STM32L031xx  on know working board or first test of something new ? (show circuit then.)

    GomarAuthor
    Explorer II
    May 14, 2024

    >Is your STM32L031xx  on know working board or first test of something new ? (show circuit then.)

    I just placed a microcontroller in a PCB and put it in a protoboard.

    Gomar_0-1715647166541.png

    In a protoboard I connected the following signals:

    Gomar_1-1715647252225.pngGomar_2-1715647325698.png

    >Can you install CubeProgrammer ? We can see more info about, whats not working .

    Gomar_3-1715647363372.png

    Gomar_4-1715647377685.png

     

     

    Graduate II
    May 13, 2024

    @AScha.3, wouldn't you want NRST connected as well?

    @Gomar, after installing CubeProgrammer don't forget to do the firmware upgrade of your STLINK.

    Super User
    May 13, 2024

    @David Littell  , with > software reset < setting , NRST not needed (except special cases, target in power down mode etc.).

    And he showed in pic, he used NRST for the connection...

    Super User
    May 13, 2024

    @AScha.3 wrote:

    @David Littell  , with > software reset < setting , NRST not needed (except special cases, target in power down mode etc.)...


    @Gomar  Indeed it's not generally essential, but I would strongly advise to included it - to avoid all risk of getting yourself stuck in one of those "special cases" where you really do need it!