Skip to main content
Graduate
December 1, 2022
Question

STM32L431 can not be debugged; SWD communication failure?

  • December 1, 2022
  • 4 replies
  • 2809 views

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!

    This topic has been closed for replies.

    4 replies

    ST Employee
    December 1, 2022

    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

    ZJingAuthor
    Graduate
    December 1, 2022

    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

    Graduate II
    December 1, 2022

    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"​

    ZJingAuthor
    Graduate
    December 2, 2022

    Hello,

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

    Super User
    December 2, 2022

    try another cpu.

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

    ZJingAuthor
    Graduate
    December 2, 2022

    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

    ST Employee
    December 2, 2022

    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

    ZJingAuthor
    Graduate
    December 2, 2022

    Hello @Jaroslav JANOS​,

    Thanks for the reply.

    This is a cheap debugger from China, it only comes with SWD. This debugger has been used with their STM32L431 development board without any problems. We are going to order a ST-Link, but it might not be the debugger's fault.

    Best regards,

    Zhi