cancel
Showing results for 
Search instead for 
Did you mean: 

PVD in VBAT MODE

raveeshhgd
Associate II

Hello

I am using STM32F103C8T6 microcontroller in my project and internal RTC is used with external 32.768Khz oscillator and CR2032 battery is connected to VBAT pin for RTC backup. RTC is working fine.

In my application I am running timer which increments at every one second and I have to store timer value in case of power failure. I do not want to store at every one second so I tried to store timer value using PVD in flash and tried to store in EEPROM also.

When CR2032 battery for RTC is inserted PVD is not working. I am able to store using PVD when RTC battery is not inserted.

Can anyone let me know if Is there any settings for PVD when VBAT pin is connected CR2032 battery?

 

Thanks

5 REPLIES 5
jiangfan
ST Employee

with CR2032 battery and RTC, you are able to keep full date/time information in RTC, as you want to store timer value every one second - you just need to store it in backup SRAM, it is non-volatile with CR2032 battery.

Can you please let me know what is the life span of backup SRAM for write cycles?

backup SRAM, as SRAM, its write cycles should be unlimited

raveeshhgd
Associate II

Thanks Jiangfan,

Now I am able to store my data in BackUp register.

But another issue is that, As I am using internal RTC, Time restores correctly But Date resets on every power off-on.

Can you please let me know the solution for this?

According to STM32F103C8 reference manual, most of its RTC registers (including time and date) should be kept not changed during power off-on cycle provided that Vbat voltage is available and valid.