cancel
Showing results for 
Search instead for 
Did you mean: 

STlink/V2 wont work with STM32L031Fxxx

KSkor.1
Associate III

0693W000007Ch51QAC.jpgHello,

i made custom board for STM32F031F6P6 chip, made few prototypes and flashed 5 prototypes with no problem. Then the current STM32 shortage hit my suppliers so i switched to STM32L031F6P6 on same board. I checked the datasheet and pinout and it looks the same, but when i solder it on same board, i cant get ST-LINK debugger to detect target.

In attached picture is circuit, i only soldered down power supply(LDO) and the MCU to eliminate any other possible causes of problems.

ST-LINK FW is V2J37s7 and i use CUBEIDE.

Conenctions on STlink/V2 are:

1-3.3V

4-GND

7-SWDIO

9-SWDCLK

15-RST

P.S. i tried same pinout connection with nucleo F072RB and it works. So i assume something is wrong on my PCB. But i based my PCB on the Nucleo schmetacis and i cant find what i missed.

1 ACCEPTED SOLUTION

Accepted Solutions
KSkor.1
Associate III

Yes, this was the problem. I connected VDDA to 3.3V with jumper wire and MCU started up with no problem. And in this MCU keeping VDDA connected and disabling analog system in software, doesn't really impact power consumption at any effective amount. Another improvement among many that i noticed, after moving from Atmel to STM .

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Is pin BOOT0 connected to anything?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Does VDDA actually connect to a supply?

BOOT0 should be pulled low to assure your code runs at startup.

Check the level of NRST

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi, thanks both for answer. Yes i also noticed that Boot0 pin, but didn't really paid any attention to it, since i didn't notice in any application note or datasheet, that it cant be left floating, but did notice in Nucleo schematics that it is connected to switch and is always high/low. Thanks for tip, will pull it to gnd. And no, VDDA is not connected to VDD, since i don't use analog functions. I always tie it to ground via capacitor when i don't use it. Reset levels are as they should be.

KSkor.1
Associate III

Ok, i tied Boot0 to GND on 3 prototypes, but problem is the same. However, i paid more attention to reset lines this time around and noticed that they are stuck on low. Any idea what could keep them stuck on low? Checked and they are not shorted to GND physically. Even when i try to connect with st-link utility, there is no spike or any change on reset line. I thought it might be power on/power down reset, but on VDD pin, voltage is steady 3.34V and my LDO is capable of delivering 400mA, which it should be plenty, since for testing, MCU is only thing on PCB.

KSkor.1
Associate III

OK found most likely problem:

The device has integrated power-on reset (POR) and power-down reset (PDR) circuits.
They are always active, and ensure proper operation above a threshold of 2 V. The device
remains in reset mode when the monitored supply voltage is below a specified threshold,
VPOR/PDR, without the need for an external reset circuit.
• The POR monitors only the VDD supply voltage. During the startup phase it is required
that VDDA should arrive first and be greater than or equal to VDD.
• The PDR monitors both the VDD and VDDA supply voltages, however the VDDA power
supply supervisor can be disabled (by programming a dedicated Option bit) to reduce
the power consumption if the application design ensures that VDDA is higher than or
equal to VDD.

So according to this, i need to have first VDDA supplied, so the POR lets system startup and after that i can disable POR watching VDDA. So in this case, i need to either have a jumper that connects VDDA to 3.3V and i remove it after i reprogram option bit, or just modify PCB to have VDDA always connected.

KSkor.1
Associate III

Yes, this was the problem. I connected VDDA to 3.3V with jumper wire and MCU started up with no problem. And in this MCU keeping VDDA connected and disabling analog system in software, doesn't really impact power consumption at any effective amount. Another improvement among many that i noticed, after moving from Atmel to STM .