Skip to main content
MVeen.1
Associate II
Dec 17, 2024 7:47 PM UTC
Solved

Debug Mode & Voltage Scaling

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.
danirpgBest answer
Associate
Jan 19, 2025 9:10 PM UTC

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

4 replies

Amel NASRI
ST Technical Moderator
Jan 6, 2025 2:58 PM UTC

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

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Associate
Jan 19, 2025 8:17 PM UTC

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

Tesla DeLorean
Guru
Jan 19, 2025 9:07 PM UTC

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?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
danirpgBest answer
Associate
Jan 19, 2025 9:10 PM UTC

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