Ultra Start 23xx User Manual Page 21

  • Download
  • Add to my manuals
  • Print
  • Page
    / 45
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 20
AN3371 Overview of the STM32 advanced RTC
Doc ID 018624 Rev 5 21/45
1.7 Time-stamp function
The Time-stamp feature provides the means to automatically save the current calendar.
Figure 14. Time-stamp event procedure
Provided that the time-stamp function is enabled, the calendar is saved in the time-stamp
registers (RTC_TSTR, RTC_TSDR, RTC_TSSSR) when a time-stamp event is detected on
the pin that the TIMESTAMP alternate function is mapped to. When a time-stamp event
occurs, the time-stamp flag bit (TSF) in RTC_ISR register is set.
Note: The time-stamp sub-second register is not available for all products. Please refer to
Table 15: Advanced RTC features.
AM
PM
hh mm s
TIME
(RTC_TR)
MS19532V1
Date
Week
date
Month Year
DATE
(RTC_DR)
ss
Sub-second
(RTC_SSR)
12h or 24h
format
Calendar Unit
AM
PM
hh mm s
TIME
(RTC_TSTR)
Date
Week
date
Month Year
DATE
(RTC_TSDR)
ss
Sub-second
(RTC_TSSSR)
Copy:
RTC_TSTR = RTC_TR
RTC_TSDR = RTC_DR
RTC_TSSSR = RTC_SSR
On Time- Stamp
event
Table 11. Time-stamp features
What to do How to do it Comments
Enable Time-stamp
Setting the TSE bit of
RTC_CR register to 1
Map TIMESTAMP pin
alternate function
Selecting with TSINSEL bit
in RTC_TCR register
Only for F2 series devices.
The TIMESTAMP pin can be either PI8
or PC13.
Detect a time-stamp event by
interrupt
Setting the TSIE bit in the
RTC_CR register
An interrupt is generated when a time-
stamp event occurs.
Detect a time-stamp event by
polling
By polling on the time-
stamp flag (TSF
(1)
) in the
RTC_ISR register
To clear the flag, write zero on the TSF
bit.
(2)
Page view 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 44 45

Comments to this Manuals

No comments