1
\$\begingroup\$

While browsing the stm32f051xx datasheet I came across this section (p23, section 3.15, Real-time clock (RTC) and backup registers)

timestamp feature which can be used to save the calendar content. This function can be triggered by an event on the timestamp pin, or by a tamper event. The MCU can be woken up from Stop and Standby modes on timestamp event detection

As I understand it, this allows you to take a snapshot of the date and time that a pin change occurs either with or without waking up. However, there is no further explanation of this feature, even in the RTC application notes.

I could see obvious uses for this feature if you could save multiple timestamps, or it had sub-second accuracy. However, none of that is available. I assume this feature must be commonly useful to be included, so I'm curious what kind of use-cases this feature was designed in mind with.

\$\endgroup\$
13
  • 1
    \$\begingroup\$ Data logging... \$\endgroup\$
    – DKNguyen
    Apr 11, 2020 at 22:38
  • \$\begingroup\$ @DKNguyen but you can store only a single timestamp. And on many models, not even sub-second accuracy. \$\endgroup\$
    – Azsgy
    Apr 11, 2020 at 22:43
  • 1
    \$\begingroup\$ That's why you then move it to more long term storage afterwards. There's not really much point in trying to understand why a feature exists when you don't need it. \$\endgroup\$
    – DKNguyen
    Apr 11, 2020 at 23:08
  • 1
    \$\begingroup\$ it takes time to wake up ... sub-second data is mentioned as being available \$\endgroup\$
    – jsotola
    Apr 11, 2020 at 23:54
  • 1
    \$\begingroup\$ @Azsgy You speak as if you pay extra for the features that come with a microcontroller, and as if you must use all the features that come with a microcontroller, and as if get to choose the exact feature set you want with a microcontroller. This is not like a car where you pick and pay for each little thing you want it to come with. If you don't want to use a feature, just don't use it. \$\endgroup\$
    – DKNguyen
    Apr 12, 2020 at 0:57

1 Answer 1

1
\$\begingroup\$

I think the explanation in the reference manual gives one good use case for the feature: Tamper event. This may be the main reason of existence of this feature. For example, by using it you can say "Analyzing the device logs, we determined that you have opened the case of the product on [some date & time]. So, the product warranty is void."

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.