cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L431 can not be debugged; SWD communication failure?

ZJing
Associate III

Hello all,

I am using STM32L431 in this project, and I have made a prototyping board for it. However, the MCU will not communicate with the debugger.

Below is MCU part of schematic:

0693W00000WJybNQAT.pngOnly SWDIO and SWCLK are connected to the debugger. The MCU is powered seperately by an on board LDO.

Error message:

0693W00000WJyYtQAL.jpg0693W00000WJybrQAD.jpg

I tried to reset by pressing S1 after powering up, but that did not work.

I initially left VDDA unconnected to 3V3 while all VDDs are connected to 3V3, by not mouting ​BEAD L1. Now the L1 pads are shorted with solder. Could this have damaged the MCU?

Power supply schematic:

0693W00000WJydTQAT.pngThe typical design of this LDO suggested using output capacitor of 1uF, while I am using 4.7. However, they did mention that using output capacitors larger than 1uF is possible.

Please help! Thanks in advance!

10 REPLIES 10
Jaroslav JANOS
ST Employee

Hi @ZJing​,

is GND connected to the debugger as well? If not, this is probably the issue...

Concerning the VDDA, the damage of the MCU cannot be ruled out... But otherwise I do not see any issues with the power supply and the decoupling.

BR,

Jaroslav

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.

Hi @Jaroslav JANOS​ ,

Thank you for your reply.

The GND is not connected to the debugger.

Indeed, this issue you pointed out sounds like a very real possibility. This board's 5V input to LDO is from a lab power supply, while the debugger is powered from USB. Not connecting their grounds together will create a difference in ground level?

I will try powering the board directly from the debugger now.

Thanks again for point this out,

Zhi

Basic electronics dictate the need for common grounds. You're creating a circular path. You can have different supplies, but they need the same basis.

V​DDA powers POR and PLL, not just ADC/DAC.

Debugger should have NRST to allow "connect under reset"​

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

Hi @Community member​ ,

Thanks for the reply.

Yes, indeed they should have the same GND connection​. This is a rather big mistake by me, and probably the cause to the problem.

>V​DDA powers POR and PLL, not just ADC/DAC.<

Does this mean that if VDDA is not connected to 3V3 and instead is floating, the MCU will definitely not function properly?

This debugger comes with only 3V3, GND, SWCLK and SWDIO pins. Could there be potential problems when "connect under reset" is not used?

Kind regards,

Zhi

>>Does this mean that if VDDA is not connected to 3V3 and instead is floating, the MCU will definitely not function properly?

It means it powers a lot of sub-circuits in the IC, and can't be ignored just because you don't think you're doing anything "analogue"

It needs to be at a similar voltage to VDD, the data sheet should give you margins/ranges. It can be sourced from the same supply or an independent one.

If you leave it floating the device will be held in reset.

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

Hello,

I connected 3.3V and GND from debugger to the board directly. Same error. Maybe the MCU is damaged already?

AScha.3
Chief III

try another cpu.

and have always ground connected, and 3v3 on vdd+vdda .

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

Thanks for the reply,

Another board is being made. Although all components are soldered by hand. Maybe that could mess things up too...

And yeah, the ground and VDDA connections are fixed now.

Zhi

Jaroslav JANOS
ST Employee

Hi @ZJing​ ,

first try to check settings of the debugger - that you have set correct debugger, you use SWD and not JTAG,... You can also try another debugger, if you have one (e.g. ST-Link on Nucleo).

BR,

Jaroslav

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.