2021-11-26 07:23 AM
Hi
We are using the STM32H7A3ZIT6 for one of our irrigation controllers that we are developing. To check the "power cuts" time, we always save the RTC value (uint_32 seconds value) before voltage goes down, using:
HAL_PWR_EnableBkUpAccess();
HAL_RTCEx_BKUPWrite(&hrtc, RTC_BKP_DR2, Value);
It has been working fine. But, suddenly, in two protos it started to fail. When we read the RTC register using:
HAL_RTCEx_BKUPRead(&hrtc, RTC_BKP_DR2);
We always read 0. Same hardware and same code.
Do you have any idea of what could be the problem?
Thank you in advance
2021-11-26 08:13 AM
Are you absolutely sure that you have not accidentally triggered the tamper function and thus deleted the RTC backup data registers?
Regards
/Peter
2021-11-30 01:00 AM
Hi Peter
Yes, we have checked it. We don't use any tamper function.
2021-11-30 04:48 PM
Maybe somebody somewhere activated tamper function and the trigger pin is/was in active state?
Try a fresh new chip.
2021-12-01 01:13 AM
If I remove VBAT (CR2032) for a while (reset RTC), then it works fine. Maybe some register has been activated?? What could be?