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

CubeMX generates wrong configuration for STM32L071

  • March 2, 2026
  • 2 replies
  • 282 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 

This issue has been fixed in the latest version of STM32CubeMX 6.18.0 

Download STM32CubeMX6.18.0 from  here 

THX

Ghofrane

2 replies

Ghofrane GSOURI
ST 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.
Ghofrane GSOURI
Ghofrane GSOURIBest answer
ST Technical Moderator
July 1, 2026

Hello ​@isikli 

This issue has been fixed in the latest version of STM32CubeMX 6.18.0 

Download STM32CubeMX6.18.0 from  here 

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.