cancel
Showing results for 
Search instead for 
Did you mean: 

Most basic setup for SWD to work?

LubO_o
Visitor

Hello, i need help with na stm32l031k6, I want to just start the processor and read it with an st-link v2, I have connected BOOT0 to GND(i haven't added a 10k resistor, but that shouldn't be the problem ), NRST with pull-up 1k to VDD, VDDA and VDD are connected together. From what I read online I can pass without the external crystal because there is an internal one. So when I connect the VDD to 3v3 on the st-link, the GND to the st-link GND, SWCLK to PA14, SWDIO to PA13 and the chip isn't recognized. I have ruled out an faulty st link because it recognizes a blue pill f103 board. Please tell me if I am forgetting something

1 REPLY 1

Rather than try to describe your circuit in words, please use a schematic - it's far clearer.

You also need some decoupling caps.

See the datasheet and AN4467 for power supply connections.

https://www.st.com/resource/en/datasheet/stm32l031k6.pdf

https://www.st.com/resource/en/application_note/an4467-getting-started-with-stm32l0xx-hardware-development-stmicroelectronics.pdf

 


@LubO_o wrote:

 From what I read online I can pass without the external crystal because there is an internal one


Correct (although, strictly, it's not a crystal - it's an RC oscillator)

 


@LubO_o wrote:

 when I connect the VDD to 3v3 on the st-link


What ST-Link do you have?

Note that a genuine ST-Link does not provide power to the target

See: How to recognize a genuine ST-LINK/V2 versus a cloned one

In particular: https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/tac-p/703663/highlight/true#M965