Skip to main content
Tuoman
Senior II
Jun 29, 2020 5:11 AM UTC
Solved

How to setup SMPS Supply source in STM32CubeMX?

Hi,

I want to configure my STM32H7 MCU to use SMPS configuration.

I try to select RCC -> Supply Source -> PWR_DIRECT_SMPS_SUPPLY, but then get build error

Src/main.c:136:26: error: 'PWR_DIRECT_SMPS_SUPPLY' undeclared (first use in this function)

This is because "SMPS" is not defined. I try to define this manually typing #define SMPS in stm32h7b3xx.h (it is in stm32h7b3xxq.h example projects), but again got more build errors in various lines that SMPS and many more is not defined.

Where am I supposed to define and configure this? Is the STM32CubeMX supposed to work this way or is it a bug?

EDIT, additional info:

My project does not contain stm32h7b3xxq.h files, only stm32h7b3xx.h. The Q-file includes a lot of power related defines (e.g. PWR_CR3_SMPSEN).

Why my project is missing these "Q files"? Why STM32CubeMX does not generate these files for me?

Our MCU is STM32H7B3IIK6

EDIT2: wait, this number does not seem to contain SMPS (Q-type), yet our schematic is wired using SMPS configuration. Need to resolve this with the PCB designer.

This topic has been closed for replies.
Tuoman
TuomanBest answer
Senior II
Jun 29, 2020 6:51 AM UTC

Resolved issue! I used wrong part number in STM32Cube MX, H7B3IIK, instead of H7B3IIKxQ. There was wrong number in schematics.

1 reply

Tuoman
TuomanAuthorBest answer
Senior II
Jun 29, 2020 6:51 AM UTC

Resolved issue! I used wrong part number in STM32Cube MX, H7B3IIK, instead of H7B3IIKxQ. There was wrong number in schematics.