cancel
Showing results for 
Search instead for 
Did you mean: 

Differences between HAL_PWR_EnterSTOPMode and HAL_PWREx_EnterSTOPMode

Tuoman
Senior II

There is hal_pwr.c module, and hal_pwr_ex.c ("Extended") modules

These seem to have equivalent functions, such as

HAL_PWR_EnterSTOPMode

HAL_PWREx_EnterSTOPMode

HAL_PWR_EnterSTANDBYMode

HAL_PWREx_EnterSTANDBYMode

What are the difference between these? Why some pwr functions are separated/duplicated to Extended module?

It seems that Extended module adds Domain information. Can you use non-extended version if you don't beed Domain control?

1 ACCEPTED SOLUTION

Accepted Solutions

I don't know the exact answer in your case, but generally, non-Ex functions ought to work towards compatibility between STM32 models/families, i.e. sticking to them is supposed to facilitate portability. The Ex-functions thus handle features which are specific to a given family or model.

JW

View solution in original post

4 REPLIES 4

Which STM32/Cube?

JW

STM32H7, CubeMX 6.0.1

I don't know the exact answer in your case, but generally, non-Ex functions ought to work towards compatibility between STM32 models/families, i.e. sticking to them is supposed to facilitate portability. The Ex-functions thus handle features which are specific to a given family or model.

JW

TDK
Guru

Easy enough to inspect:

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c#L616

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c#L817

Looks like the PWREx function can specify the domain. The function notes explain the differences for dual core devices.

If you feel a post has answered your question, please click "Accept as Solution".