AnsweredAssumed Answered

R/W to RTC backup registers

Question asked by b.m.002 on Aug 27, 2016
Latest reply on Sep 6, 2016 by b.m.002

 

Hi.

 

I’m using an RTC example program from the CUBE F3 (STM32F3Nucleo) download, and it work ok, except I cannot read or write to the RTC backup registers.

 

 

 

The example configures RTC as follows:

 

__HAL_RCC_PWR_CLK_ENABLE();

 

HAL_PWR_EnableBkUpAccess();

 

__HAL_RCC_RTC_ENABLE();

 

 

 

When I try to read and write to the backup registers, I cannot read back what I have previously written.

 

 

 

HAL_RTCEx_BKUPWrite(&RtcHandle, RTC_BKP_DR1, 0x32F2);

 

HAL_RTCEx_BKUPRead(&RtcHandle, RTC_BKP_DR1);

 

 

 

Even if I precede the read and or write with:

 

 

 

__HAL_RCC_PWR_CLK_ENABLE();

 

HAL_PWR_EnableBkUpAccess();

 

 

 

Any ideas?

 

Martin.

 

Outcomes