cancel
Showing results for 
Search instead for 
Did you mean: 

How to Enable the Backup Voltage regulator with STM32 Cube?

andywild2
Associate III
Posted on December 21, 2015 at 11:19

Hello to all,

I am currently converting my Code from ST Periperal Lib to Cube which is a hell of a work because EVERYTHING has changed. The function names, the structures, the constants.

I am using a STM32F2xx.

I have to enable the backup voltage regulator.

In STPerLib this was done with PWR_BackupRegulatorCmd(ENABLE);

The bit was defined there nicely with bit banding.

In cube I miss this function.

How can it be done with cube?

Thanks a lot

Andy
4 REPLIES 4
Nesrine M_O
Lead II
Posted on December 21, 2015 at 13:58

Hi Andy,

To enable the Backup Regulator you may use the function declared in the stm32f2xx_hal_pwr_ex.c file: HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg() 

 

-Syrine-

andywild2
Associate III
Posted on December 21, 2015 at 14:42

Hello Syrine,

thanks a lot for your quick answer!

The pwr-cube files were not linked to my project thats why I did not find it.

Please one more question to make my work easier:

I have a working project with ST Per Lib.

In order to convert it to Cube sometimes I have to dive into the appropriate function in STPerLib, copy some destinctive cpu register or constant names and search for these strings throughout my new project with cube.

Thus I can find the corresponding cube function.

This a strenuous work though.

The only doc for cube I found in UM1940 user manual which is a pdf only.

In contrast to this the doc for STMPerLib was a nice *.chm Help-File:

http://www.st.com/web/en/catalog/tools/PF257898#

It has a lot of text links and is much more conveniant.

I would be happy if you can post me a link for the same help file for cube STM32F2xx.

But first of all I wish you a happy christmas with a good time and less bits and bytes!

Andy

Nesrine M_O
Lead II
Posted on December 21, 2015 at 15:36

Hi Andy,

You can find the *.chm file for STM32F2xx  HAL Drivers underSTM32Cube_FW_F2_V1.3.0\Drivers\STM32F2xx_HAL_Driver\

 

Merry Christmas 🙂

-Syrine-

andywild2
Associate III
Posted on December 21, 2015 at 17:46

Hi Syrine,

thank you for your hint with the help file.

However I downloaded the STM32Cube_FW_F2_V1.3.0

 

Within STM32Cube_FW_F2_V1.3.0\Drivers\STM32F2xx_HAL_Driver\

 

I found 2 files, each only about 7MB size:

 

 

STM32F215xx_User_Manual.chm      and

 

STM32F217xx_User_Manual.chm

 

 

When I open them they show only the contents structure in the left column, but nothing in the main screen.

 

 

The STPerLib chm file on the other side is 17MB!

 

 

So I think these 2 files are somehow not complete.

 

 

Thanks again for your kind help

 

Andy