cancel
Showing results for 
Search instead for 
Did you mean: 

Debug Mode & Voltage Scaling

MVeen.1
Associate II

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!
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4
Amel NASRI
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

danirpg
Associate II

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

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
Up vote any posts that you find helpful, it shows what's working..

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