cancel
Showing results for 
Search instead for 
Did you mean: 

How do I retrieve a timestamp from RTC with a button press?

Member
Associate III

I am looking for a way to save a timestamp from Real-Time-Clock (RTC) with a button press, save that, and store it somewhere. How can I do this?

3 REPLIES 3
Peter BENSCH
ST Employee

You can either program this manually. Or you can take ready-made examples with HAL or LL from the repository (use RTC_TimeStamp as a search term) that show how easy this is, e.g. with the STM32F412G-Discovery.

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

Good luck!

/Peter

In order 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.
I am not sure how to read the time from the RTC at the point when the button was pressed.