Skip to main content
Visitor II
April 12, 2025
Question

stm32L562 error connection SWD

  • April 12, 2025
  • 4 replies
  • 920 views

Hi! I have custom board with new mcu stm32l562ve. Board has out pins - SWDIO and SWCLK.

I am try connect by st-link v3. But mcu not connected. Also, i tested with connect nRST ( setting "Under Reset" in st-link ). But this variant same as first. MCVU new from Mouser. Do you have any idea?

    This topic has been closed for replies.

    4 replies

    Super User
    April 12, 2025

    Need to connect GND, SWDIO and SWCLK for minimum viable SWD connection.

     

    Here are some possibilities:

    • Design is not viable.
    • Part orientation is incorrect.
    • Pins are not connected to what you think they are.
    • Bad soldering or board manufacturing.
    • Bad USB cable.
    • Bad programmer.
    dlpPavloAuthor
    Visitor II
    April 12, 2025

    Thank you for replay! I have over 10 years of experience with sim. But 32l5xx series work first. If this series has no distinction - I think mcu is bad. All connection I checked. Also. I check signals by oscilloscope on pins swdio and swclk. Signal is ok...

    Super User
    April 12, 2025

    Regardless of experience level, everything needs to be set up correctly. I also have many years of experience and still make mistakes, sometimes "dumb" ones. Hardware doesn't care about experience level. You haven't shown much information here, so it's going to be difficult to diagnose the issue.

    You can throw your hands up and think the chip is bad. Unlikely. Up to you. Choose your reality.

     

    If you want to further diagnose the issue here, show some pictures of the setup, and enough to verify the connections are correct. Verify voltages are as expected. Programmer does not supply power.

    dlpPavloAuthor
    Visitor II
    April 13, 2025

    Thank you for your reply. I agree with you about the experience. Today is a day off. Tomorrow I will show a schematic and a photo of the board assembly. I will also add the measured parameters. I will be grateful for your help. I read from the description of this controller that it has JTAG port enabled by default. To switch to SWD mode, the debugger must send a certain packet of a large number of units. This is what made me suspicious.

    Super User
    April 13, 2025

    A schematic along with an in focus high resolution picture of the board is generally enough to figure out what is going wrong, and maybe another picture showing external connections.

    The software will do what it needs to do to get SWD working when you press "connect". No user configuration needed.

    Cheers.

    dlpPavloAuthor
    Visitor II
    April 14, 2025

    Hi! I am attach pdf with my schematic. I check connection on board. It's the same as in this pdf...

    dlpPavloAuthor
    Visitor II
    April 13, 2025

    By default the JTAG-DP is selected after a system or a power-on reset. The five IO pins are configured by hardware in debug alternative function mode. The SWJ-DP incorporates pull-up resistors on JTDI, JTMS/SWDIO, and nJTRST, as well as a pull-down resistor on JTCK/SWCLK. A debugger can select the SW-DP by transmitting the following serial data sequence on JTMS/SWDIO: ... (50 or more ones) ..., 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, ... (50 or more ones) ... JTCK/SWCLK must be cycled for each data bit.  - I talk about this...