cancel
Showing results for 
Search instead for 
Did you mean: 

How do I include HAL PWREx Power extension driver and other extension drivers?

Tom MacDonald
Associate III

I am trying to use the HAL_PWREx_EnableSRAMRetention() function described in UM2319 Description of STM32G0 HAL and low-layer drivers

I am using STM32CubeIDE, with my project configured as a STM32 project (with .ioc file for managing software packs, etc)

Problems I am having:

  • UM2319 - Description of STM32G0 HAL and low-layer drivers doesn't seem to contain any information on how to actually download and access the extension driver that it is documenting.
  • STM32CubeG0 MCU Firmware Package does not contain the PWREx driver (wrong)
  • I cannot find PWREx driver listed in the STM32CubeIDE Embedded Software Packages Manager (see screenshot below)
  • Google searches on this topic have been frustrating - I just get a whole bunch of UMXXXX pdf user manuals for different STM32 MCUs --> I need the driver!

Help please?

0693W00000QKsKdQAL.png

1 ACCEPTED SOLUTION

Accepted Solutions
Tom MacDonald
Associate III

Figured it out: it actually was in the STM32CubeG0 MCU Firmware Package, my bad!

It's even included in my project. I just needed to add the following to the top of the c file where I was calling the HAL_PWREx_EnableSRAMRetention() function:

#include "stm32g0xx_hal_pwr_ex.h"

0693W00000QKsPsQAL.png

View solution in original post

1 REPLY 1
Tom MacDonald
Associate III

Figured it out: it actually was in the STM32CubeG0 MCU Firmware Package, my bad!

It's even included in my project. I just needed to add the following to the top of the c file where I was calling the HAL_PWREx_EnableSRAMRetention() function:

#include "stm32g0xx_hal_pwr_ex.h"

0693W00000QKsPsQAL.png