Skip to main content
Explorer
December 17, 2024
Solved

Debug Mode & Voltage Scaling

  • December 17, 2024
  • 2 replies
  • 1058 views

I'm using a STM32L151RBT6 and trying to debug with a STLink V3.

The debugger loses connection when I encounter the line:

PWR_VoltageScalingConfig(PWR_VoltageScaling_Range3);
 
Specifically, when it changes the PWR-CR Bits 12:11 (VOS). I have no issue changing it to Range 1 or 2, but 3 results in this message:
"ST-LINK device status: Failed to get status, Target not responding, retrying... 19"
 
Any help would be greatly appreciated!
    This topic has been closed for replies.
    Best answer by danirpg

    I found the problem was on a bad SWD cable, but interstingly it only crashes when changing the voltage scaling.

    2 replies

    Technical Moderator
    January 6, 2025

    Hi @MVeen.1 ,

    Please make sure to be aligned with the maximum CPU frequency allowed for Range 3 (as explained in this table):

    AmelNASRI_0-1736175469847.png

    -Amel

    Visitor II
    January 19, 2025

    This happens to me as well in STM32H573RIT but when setting the VOS to 2 or 1 or 0.

    Graduate II
    January 19, 2025

    Seems unrelated. You could perhaps drop the connection speed, to 500 KHz or 1 MHz

    Perhaps open as a new question, or attach schematic of custom board to better understand your situation.

    Something that's just started to fail?

    danirpgAnswer
    Visitor II
    January 19, 2025

    I found the problem was on a bad SWD cable, but interstingly it only crashes when changing the voltage scaling.