Most basic setup for SWD to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-19 10:07 AM - last edited on ‎2025-03-19 10:50 AM by Andrew Neil
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
- Labels:
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-19 10:48 AM - edited ‎2025-03-20 1:13 AM
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
@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
PS:
@LubO_o wrote:the chip isn't recognized.
Using what tools?
Show any error messages & logs you get.
Note that keeping your wiring short & tidy is important. Wiring should be kept short, neat, and direct - with the minimum of joints.
Be particularly wary of solderless breadboards, cheap "dupont" style headers, etc:
More tips on resolving debugger connection issues here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-19 6:06 PM
The minimum required connections are GND, SWDIO, SWCLK, and the chip must be powered.
Perhaps a bad programmer or mismatched connections. Works on F103 doesn't mean it works on other chips.
