cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F091RC backup registers

peterpeter9163
Associate
Posted on April 20, 2016 at 12:47

Hi

I admit I am a complete newbie so please go easy.... 🙂

I need to store some variables in the 5 memory locations in the STM32F091RC.  We have the following code:

mark1 = 123;

RTC_HandleTypeDef RtcHandle;

RtcHandle.Instance = RTC;

HAL_PWR_EnableBkUpAccess();

HAL_RTCEx_BKUPWrite(&RtcHandle, RTC_BKP0R, mark1);

HAL_PWR_DisableBkUpAccess();

RTC_HandleTypeDef RtcHandle1;

RtcHandle1.Instance = RTC;

reg1 = HAL_RTCEx_BKUPRead(&RtcHandle1, RTC_BKP0R);

I never see the number written to reg1.  Can you tell me where im going wrong!

Much appreciated!

Mark.
0 REPLIES 0