2025-01-27 06:44 AM
Hi All,
I am working on " STM32F103xE" controller. I am using internal RTC for the application. I am using internal RTC's backup register to store some Checksum value that can be used by application. We have connected the Vbat supply also to keep the operation intact.
Suddenly we have observed few of the devices started giving errors as the checksum stored in backup register got cleared automatically.
Upon checking the batter voltage, it is in a good condition and we are not clearing the backup registers from software also(using backup domain reset). We are unable to track what could be the possible reason that can clear the backup registers.
If we again write the checksum in backup register, device start working properly.
Can someone please help to debug this issue. Any help will be appreciated.
TIA.
2025-01-27 06:52 AM
@bipin_g wrote:Suddenly we have observed few of the devices started giving errors as the checksum stored in backup register got cleared automatically.
Had those devices performed a restart/reset ?
Does your startup code take care not to clear any existing data and/or checksum(s) ?
2025-01-28 01:34 AM
Had those devices performed a restart/reset ?
-Yes, frequent restart is done on those devices
Problem is we have thousands of such devices running on same code but only few are giving this issue.
2025-01-29 02:41 AM
Hello @bipin_g,
Even though you've checked the battery voltage, for me it seems that maybe VBAT dropped below the operating range of the backup domain for those devices.. Try to periodically monitor VBAT voltage, you can use an ADC channel if available to measure the VBAT level
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-01-29 03:00 AM - edited 2025-01-29 03:28 AM
You need to enable the backup regulator. At least for the H7 (BREN). I assume this MCU is not much more different, but I could be wrong. See Reference Manual.
Edit:
I found this in the RM of your MCU:
To enable access to the Backup registers and the RTC, proceed as follows:
- enable the power and backup interface clocks by setting the PWREN and BKPEN bits
in the RCC_APB1ENR register
- set the DBP bit the Power Control register (PWR_CR) to enable access to the Backup
registers and RTC.