cancel
Showing results for 
Search instead for 
Did you mean: 

Low-power STOP MODE function using NUCLEO-H563ZI

JEngineerHW
Associate

 

Hello, I am new to programming the NUCLEO-H563ZI. I am interested in the low-power STOP MODE function.

I have watched an STM32 video tutorial for a different core. Everything works fine except for this function __HAL_RCC_PWR_CLK_ENABLE();

../Core/Src/main.c:98:3: warning: implicit declaration of function ‘__HAL_RCC_PWR_CLK_ENABLE’ [-Wimplicit-function-declaration]

98 | __HAL_RCC_PWR_CLK_ENABLE();

| ^~~~~~~~~~~~~~~~~~~~~~~~

 

What is causing this error?

 

Thank you for your help.

 

2 REPLIES 2
Pavel A.
Super User

Was this main.c generated by CubeMX or part of some STM32H5 example ?

The "implicit declaration" warning means that the function has not been defined. Probably it does not exist at all.

 

Saket_Om
ST Employee

Hello @JEngineerHW 

The problem may be caused by the HAL Power (PWR) module not being enabled in the stm32h5xx_hal_conf.h file.
In this configuration file, verify that the macro HAL_PWR_MODULE_ENABLED is defined (not commented out). If it is missing or commented, the power-related HAL APIs will not be compiled, which can lead to build errors or missing functionality when using power management features on the STM32H5 device.

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.
Saket_Om