2026-03-01 10:10 PM - edited 2026-03-01 10:16 PM
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.
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
My version is :
Solved! Go to Solution.
2026-03-01 11:04 PM - edited 2026-03-01 11:45 PM
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.
2026-03-01 11:04 PM - edited 2026-03-01 11:45 PM
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.