RTC Backup Register Read/Write not Working
I am trying to read/write from backup registers in STM32H7.
Below is my code:
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
HAL_PWR_EnableBkUpAccess();
HAL_RTCEx_DeactivateTamper(hrtc, RTC_TAMPER_1);
__HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP1F);
uint32_t tmp = HAL_RTCEx_BKUPRead(hrtc, RTC_BKP_DR0);
HAL_RTCEx_BKUPWrite(hrtc, RTC_BKP_DR0, (uint32_t) 0xFF88FF88);
tmp = HAL_RTCEx_BKUPRead(hrtc, RTC_BKP_DR0);The read/write is not working, I am getting the same value (which is 1701732715) every time I read. The RTC clock is enabled and tamper 1 is enabled.
What is the issue?
Related questions:
https://community.st.com/s/question/0D50X00009XkXJ0/why-rtc-backup-register-write-fails-stm32f446 (I have tried the related question from here).
