Skip to main content
MVeen.1
Associate II
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!
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

Amel NASRI
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

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
January 19, 2025

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

Tesla DeLorean
Guru
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?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
danirpgBest answer
Associate
January 19, 2025

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