2024-02-26 07:55 AM
Hi everyone,
I'm using a STWINBX1.
Some documentation say that RTC can be plug to Vbat. In my case, my board won't be plug to current and will only work with a battery.
My question is simple, is RTC can "remember" date and time if the battery run out of energy ?
I read that some RTC on modern computer can work without battery, with a crystal. But I can't find a similar information for my board.
Thanks
Solved! Go to Solution.
2024-02-27 02:20 AM - edited 2024-02-27 02:23 AM
You said you're using STWINBX1 board.
After checking its schematics, and unfortunately for you, VBAT is tied to VDD in the PCB:
So if the VDD is lost you lose the time and date.
You said your board have a battery.. It could be to power all the board not Vbat pin. So you need in that case to guarantee that the battery keep feeding the system to prevent losing time and date.
Above I'm talking about a battery that could be connected to Vbat pin.
Hope I answered all of your questions.
2024-03-04 02:35 AM
Hello,
I'm looking for a way of keeping correct timestamp even if Vbat is not powering anymore the board.
I checked online solutions to find a way to "secure" the timestamp if Vbat is out of power.
So, I know that if Vbat is down, I lose timestamp. But I'm looking for solutions to retrieve a correct timestamp when Vbat is reloaded.
- HTTP API call ?
- Provide a new timestamp from a phone with bluetooth ?
My ideas seems a bit complicated (as they use WiFi or BLE...), and I dont find anything online.
Is there known method for this type of problem ?
I want to create a consistant solution which require the minimum of effort to the user.
2024-03-04 05:49 AM - edited 2024-03-04 07:29 AM
Hello,
You can use an external RTC module backed up with a battery like these:
https://learn.adafruit.com/adafruit-pcf8523-real-time-clock/overview
For this you need an I2C bus communication available on your board.