Skip to main content
isikli
Associate II
March 2, 2026
Solved

CubeMX generates wrong configuration for STM32L071

  • March 2, 2026
  • 1 reply
  • 184 views
 

 

Hi everyone,

I think STM32CubeMX is generating an incorrect configuration for STM32L071.
In CubeMX → System Core → SYS → System power supply,
I selected Power Regulator = SMPS (instead of LDO) and generated the project.
image.png
After code generation, I get build errors because CubeMX inserts code that does not exist for this device / HAL package:

In stm32l0xx_hal_msp.c, I see references like: HAL_PWREx_ConfigSupply(...) PWR_SMPS_SUPPLY But for STM32L0 / my CubeL0 HAL, these are not defined


image.png

My version is :

image.png

Best answer by Ghofrane GSOURI

Hello @isikli 

Your contribution is much appreciated.

After checking the datasheet DS10690 Rev 7 and the ordering information for STM32L071, there is no SMPS capability listed, which explains the compilation error we are facing. Ticket 228061 has been escalated to the development team to remove this option from the GUI.

THX

Ghofrane

1 reply

Ghofrane GSOURI
Ghofrane GSOURIBest answer
Technical Moderator
March 2, 2026

Hello @isikli 

Your contribution is much appreciated.

After checking the datasheet DS10690 Rev 7 and the ordering information for STM32L071, there is no SMPS capability listed, which explains the compilation error we are facing. Ticket 228061 has been escalated to the development team to remove this option from the GUI.

THX

Ghofrane

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.