cancel
Showing results for 
Search instead for 
Did you mean: 

STLINK-V3MODS SWD protocol

Gomar
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief

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

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

9 REPLIES 9
AScha.3
Chief

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

 

If you feel a post has answered your question, please click "Accept as Solution".

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

Gomar
Associate II

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?

>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.)

If you feel a post has answered your question, please click "Accept as Solution".

@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.

@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...

If you feel a post has answered your question, please click "Accept as Solution".

@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! 

>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

 

 

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.

If you feel a post has answered your question, please click "Accept as Solution".