Skip to main content
Associate III
December 30, 2024
Question

Why is USE_PWR_LDO_SUPPLY defined by default when generating a project in CUBEMX?

  • December 30, 2024
  • 3 replies
  • 2431 views

Hi there, 

i configure power as PWR_DIRECT_SMPS_SUPPLY, 

Peter3718_0-1735523854879.png

but after generating project,  both PWR_USE_LDO_SUPPLY and PWR_DIRECT_SMPS_SUPPLY are defined. This will cause program exception sometime, i have to remove USE_PWR_LDO_SUPPLY.  I took several days to locate this issue!

Peter3718_1-1735524172686.png

so my question is:

1. Why is USE_PWR_LDO_SUPPLY always defined by default?

2. Where are these preprocessors comming from? so I can configure.

 

Best regards

Peter

 

 

3 replies

Tesla DeLorean
Guru
December 30, 2024

>>Why is USE_PWR_LDO_SUPPLY always defined by default?

Probably because a significant majority of ST boards, be it DISCO, EVAL and NUCLEO use the LDO

There are a handleful of -Q / -P boards/chips using the SMPS mode.

Some chips run at derated speeds with SMPS

So, I'd expect the defaults here are driven by part or board selection earlier in the process.

From your post it's not clear what board/chip you are bug reporting.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Peter3718Author
Associate III
December 30, 2024

I use STM32H755ZIT6,  if generating from ST board NUCLEO-H755ZI-Q in CUBEMX, it has no this preprosssor. If generating from chip level, even has no any IO setting, the two predefined marco are there. You can try this, it's really tricky!  I want to know where it is from.

Peter

Amel NASRI
Technical Moderator
December 30, 2024

Hi @Peter3718 ,

Thanks for bringing this issue to our attention. I tracked it internally (199456) for farther investigation by our development team, looking forward for a quick fix.

A similar problem is being discussed here.

-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.
GMG
Associate III
February 14, 2025

Same problem! Two days of wast time for this problem on NUCLEO-H755ZI-Q!

Also USE_PWR_LDO_SUPPLY is recreated in the defines for CM4 e CM7 every time you modify the IOC file and regenerate de code.

I have no words to describe...