\n

RTC

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x400 byte (0x0)
mem_usage : registers
protection :

Registers

RTC_TR (TR)

RTC_PRER (PRER)

RTC_WUTR (WUTR)

RTC_CR (CR)

RTC_WPR (WPR)

RTC_CALR (CALR)

RTC_SHIFTR (SHIFTR)

RTC_TSTR (TSTR)

RTC_TSDR (TSDR)

RTC_TSSSR (TSSSR)

RTC_DR (DR)

RTC_ALRMAR (ALRMAR)

RTC_ALRMASSR (ALRMASSR)

RTC_ALRMBR (ALRMBR)

RTC_ALRMBSSR (ALRMBSSR)

RTC_SR (SR)

RTC_MISR (MISR)

RTC_SCR (SCR)

RTC_CFGR (CFGR)

RTC_SSR (SSR)

RTC_ICSR (ICSR)


RTC_TR (TR)

RTC time register
address_offset : 0x0 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_TR RTC_TR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SU ST MNU MNT HU HT PM

SU : Second units in BCD format
bits : 0 - 3 (4 bit)
access : read-write

ST : Second tens in BCD format
bits : 4 - 6 (3 bit)
access : read-write

MNU : Minute units in BCD format
bits : 8 - 11 (4 bit)
access : read-write

MNT : Minute tens in BCD format
bits : 12 - 14 (3 bit)
access : read-write

HU : Hour units in BCD format
bits : 16 - 19 (4 bit)
access : read-write

HT : Hour tens in BCD format
bits : 20 - 21 (2 bit)
access : read-write

PM : AM/PM notation
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

AM or 24-hour format

0x1 : B_0x1

PM

End of enumeration elements list.


RTC_PRER (PRER)

RTC prescaler register
address_offset : 0x10 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_PRER RTC_PRER read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PREDIV_S PREDIV_A

PREDIV_S : Synchronous prescaler factor This is the synchronous division factor: ck_spre frequency = ck_apre frequency/(PREDIV_S+1)
bits : 0 - 14 (15 bit)
access : read-write

PREDIV_A : Asynchronous prescaler factor This is the asynchronous division factor: ck_apre frequency = RTCCLK frequency/(PREDIV_A+1)
bits : 16 - 22 (7 bit)
access : read-write


RTC_WUTR (WUTR)

RTC wakeup timer register
address_offset : 0x14 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_WUTR RTC_WUTR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 WUT

WUT : Wakeup auto-reload value bits When the wakeup timer is enabled (WUTE set to 1), the WUTF flag is set every (WUT[15:0] + 1) ck_wut cycles. The ck_wut period is selected through WUCKSEL[2:0] bits of the RTC_CR register. When WUCKSEL[2] = 1, the wakeup timer becomes 17-bits and WUCKSEL[1] effectively becomes WUT[16] the most-significant bit to be reloaded into the timer. The first assertion of WUTF occurs between WUT and (WUT + 1) ck_wut cycles after WUTE is set. Setting WUT[15:0] to 0x0000 with WUCKSEL[2:0] = 011 (RTCCLK/2) is forbidden.
bits : 0 - 15 (16 bit)
access : read-write


RTC_CR (CR)

RTC control register
address_offset : 0x18 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_CR RTC_CR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 WUCKSEL TSEDGE REFCKON BYPSHAD FMT ALRAE ALRBE WUTE TSE ALRAIE ALRBIE WUTIE TSIE ADD1H SUB1H BKP COSEL POL OSEL COE ITSE TAMPTS TAMPOE TAMPALRM_PU TAMPALRM_TYPE OUT2EN

WUCKSEL : ck_wut wakeup clock selection 10x: ck_spre (usually 1 Hz) clock is selected 11x: ck_spre (usually 1 Hz) clock is selected and 216 is added to the WUT counter value
bits : 0 - 2 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

RTC/16 clock is selected

0x1 : B_0x1

RTC/8 clock is selected

0x2 : B_0x2

RTC/4 clock is selected

0x3 : B_0x3

RTC/2 clock is selected

End of enumeration elements list.

TSEDGE : Timestamp event active edge TSE must be reset when TSEDGE is changed to avoid unwanted TSF setting.
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

RTC_TS input rising edge generates a timestamp event

0x1 : B_0x1

RTC_TS input falling edge generates a timestamp event

End of enumeration elements list.

REFCKON : RTC_REFIN reference clock detection enable (50 or 60 Hz) Note: PREDIV_S must be 0x00FF.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

RTC_REFIN detection disabled

0x1 : B_0x1

RTC_REFIN detection enabled

End of enumeration elements list.

BYPSHAD : Bypass the shadow registers Note: If the frequency of the APB1 clock is less than seven times the frequency of RTCCLK, BYPSHAD must be set to 1.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Calendar values (when reading from RTC_SSR, RTC_TR, and RTC_DR) are taken from the shadow registers, which are updated once every two RTCCLK cycles.

0x1 : B_0x1

Calendar values (when reading from RTC_SSR, RTC_TR, and RTC_DR) are taken directly from the calendar counters.

End of enumeration elements list.

FMT : Hour format
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

24 hour/day format

0x1 : B_0x1

AM/PM hour format

End of enumeration elements list.

ALRAE : Alarm A enable
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A disabled

0x1 : B_0x1

Alarm A enabled

End of enumeration elements list.

ALRBE : Alarm B enable
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B disabled

0x1 : B_0x1

Alarm B enabled

End of enumeration elements list.

WUTE : Wakeup timer enable Note: When the wakeup timer is disabled, wait for WUTWF=1 before enabling it again.
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Wakeup timer disabled

0x1 : B_0x1

Wakeup timer enabled

End of enumeration elements list.

TSE : timestamp enable
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

timestamp disable

0x1 : B_0x1

timestamp enable

End of enumeration elements list.

ALRAIE : Alarm A interrupt enable
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A interrupt disabled

0x1 : B_0x1

Alarm A interrupt enabled

End of enumeration elements list.

ALRBIE : Alarm B interrupt enable
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B interrupt disable

0x1 : B_0x1

Alarm B interrupt enable

End of enumeration elements list.

WUTIE : Wakeup timer interrupt enable
bits : 14 - 14 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Wakeup timer interrupt disabled

0x1 : B_0x1

Wakeup timer interrupt enabled

End of enumeration elements list.

TSIE : Timestamp interrupt enable
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Timestamp interrupt disable

0x1 : B_0x1

Timestamp interrupt enable

End of enumeration elements list.

ADD1H : Add 1 hour (summer time change) When this bit is set outside initialization mode, 1 hour is added to the calendar time. This bit is always read as 0.
bits : 16 - 16 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No effect

0x1 : B_0x1

Adds 1 hour to the current time. This can be used for summer time change

End of enumeration elements list.

SUB1H : Subtract 1 hour (winter time change) When this bit is set outside initialization mode, 1 hour is subtracted to the calendar time if the current hour is not 0. This bit is always read as 0. Setting this bit has no effect when current hour is 0.
bits : 17 - 17 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No effect

0x1 : B_0x1

Subtracts 1 hour to the current time. This can be used for winter time change.

End of enumeration elements list.

BKP : Backup This bit can be written by the user to memorize whether the daylight saving time change has been performed or not.
bits : 18 - 18 (1 bit)
access : read-write

COSEL : Calibration output selection When COE = 1, this bit selects which signal is output on CALIB. These frequencies are valid for RTCCLK at 32.768 kHz and prescalers at their default values (PREDIV_A = 127 and PREDIV_S = 255). Refer to .
bits : 19 - 19 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Calibration output is 512 Hz

0x1 : B_0x1

Calibration output is 1 Hz

End of enumeration elements list.

POL : Output polarity This bit is used to configure the polarity of TAMPALRM output.
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

The pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL[1:0]), or when a TAMPxF/ITAMPxF is asserted (if TAMPOE = 1).

0x1 : B_0x1

The pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL[1:0]), or when a TAMPxF/ITAMPxF is asserted (if TAMPOE = 1).

End of enumeration elements list.

OSEL : Output selection These bits are used to select the flag to be routed to TAMPALRM output.
bits : 21 - 22 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Output disabled

0x1 : B_0x1

Alarm A output enabled

0x2 : B_0x2

Alarm B output enabled

0x3 : B_0x3

Wakeup output enabled

End of enumeration elements list.

COE : Calibration output enable This bit enables the CALIB output
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Calibration output disabled

0x1 : B_0x1

Calibration output enabled

End of enumeration elements list.

ITSE : timestamp on internal event enable
bits : 24 - 24 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

internal event timestamp disabled

0x1 : B_0x1

internal event timestamp enabled

End of enumeration elements list.

TAMPTS : Activate timestamp on tamper detection event TAMPTS is valid even if TSE = 0 in the RTC_CR register. Timestamp flag is set after the tamper flags, therefore if TAMPTS and TSIE are set, it is recommended to disable the tamper interrupts in order to avoid servicing 2 interrupts.
bits : 25 - 25 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Tamper detection event does not cause a RTC timestamp to be saved

0x1 : B_0x1

Save RTC timestamp on tamper detection event

End of enumeration elements list.

TAMPOE : Tamper detection output enable on TAMPALRM
bits : 26 - 26 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

The tamper flag is not routed on TAMPALRM

0x1 : B_0x1

The tamper flag is routed on TAMPALRM, combined with the signal provided by OSEL and with the polarity provided by POL.

End of enumeration elements list.

TAMPALRM_PU : TAMPALRM pull-up enable
bits : 29 - 29 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No pull-up is applied on TAMPALRM output

0x1 : B_0x1

A pull-up is applied on TAMPALRM output

End of enumeration elements list.

TAMPALRM_TYPE : TAMPALRM output type
bits : 30 - 30 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TAMPALRM is push-pull output

0x1 : B_0x1

TAMPALRM is open-drain output

End of enumeration elements list.

OUT2EN : RTC_OUT2 output enable Setting this bit allows to remap the RTC outputs on RTC_OUT2 as follows: OUT2EN = 0: RTC output 2 disable If OSEL ≠ 00 or TAMPOE = 1: TAMPALRM is output on RTC_OUT1 If OSEL = 00 and TAMPOE = 0 and COE = 1: CALIB is output on RTC_OUT1 OUT2EN = 1: RTC output 2 enable If (OSEL ≠ 00 or TAMPOE = 1) and COE = 0: TAMPALRM is output on RTC_OUT2 If OSEL = 00 and TAMPOE = 0 and COE = 1: CALIB is output on RTC_OUT2 If (OSEL≠ 00 or TAMPOE = 1) and COE = 1: CALIB is output on RTC_OUT2 and TAMPALRM is output on RTC_OUT1.
bits : 31 - 31 (1 bit)
access : read-write


RTC_WPR (WPR)

RTC write protection register
address_offset : 0x24 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_WPR RTC_WPR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KEY

KEY : Write protection key This byte is written by software. Reading this byte always returns 0x00. Refer to for a description of how to unlock RTC register write protection.
bits : 0 - 7 (8 bit)
access : write-only


RTC_CALR (CALR)

RTC calibration register
address_offset : 0x28 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_CALR RTC_CALR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CALM CALW16 CALW8 CALP

CALM : Calibration minus The frequency of the calendar is reduced by masking CALM out of 220 RTCCLK pulses (32 seconds if the input frequency is 32768 Hz). This decreases the frequency of the calendar with a resolution of 0.9537 ppm. To increase the frequency of the calendar, this feature should be used in conjunction with CALP. See .
bits : 0 - 8 (9 bit)
access : read-write

CALW16 : Use a 16-second calibration cycle period When CALW16 is set to 1, the 16-second calibration cycle period is selected. This bit must not be set to 1 if CALW8 = 1. Note: CALM[0] is stuck at 0 when CALW16 = 1. Refer to calibration.
bits : 13 - 13 (1 bit)
access : read-write

CALW8 : Use an 8-second calibration cycle period When CALW8 is set to 1, the 8-second calibration cycle period is selected. Note: CALM[1:0] are stuck at 00 when CALW8 = 1. Refer to digital calibration.
bits : 14 - 14 (1 bit)
access : read-write

CALP : Increase frequency of RTC by 488.5 ppm This feature is intended to be used in conjunction with CALM, which lowers the frequency of the calendar with a fine resolution. if the input frequency is 32768 Hz, the number of RTCCLK pulses added during a 32-second window is calculated as follows: (512 × CALP) - CALM. Refer to .
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No RTCCLK pulses are added.

0x1 : B_0x1

One RTCCLK pulse is effectively inserted every 211 pulses (frequency increased by 488.5 ppm).

End of enumeration elements list.


RTC_SHIFTR (SHIFTR)

RTC shift control register
address_offset : 0x2C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_SHIFTR RTC_SHIFTR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SUBFS ADD1S

SUBFS : Subtract a fraction of a second These bits are write only and is always read as zero. Writing to this bit has no effect when a shift operation is pending (when SHPF = 1, in RTC_ICSR). The value which is written to SUBFS is added to the synchronous prescaler counter. Since this counter counts down, this operation effectively subtracts from (delays) the clock by: Delay (seconds) = SUBFS / (PREDIV_S + 1) A fraction of a second can effectively be added to the clock (advancing the clock) when the ADD1S function is used in conjunction with SUBFS, effectively advancing the clock by: Advance (seconds) = (1 - (SUBFS / (PREDIV_S + 1))). Note: Writing to SUBFS causes RSF to be cleared. Software can then wait until RSF = 1 to be sure that the shadow registers have been updated with the shifted time.
bits : 0 - 14 (15 bit)
access : write-only

ADD1S : Add one second This bit is write only and is always read as zero. Writing to this bit has no effect when a shift operation is pending (when SHPF = 1, in RTC_ICSR). This function is intended to be used with SUBFS (see description below) in order to effectively add a fraction of a second to the clock in an atomic operation.
bits : 31 - 31 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No effect

0x1 : B_0x1

Add one second to the clock/calendar

End of enumeration elements list.


RTC_TSTR (TSTR)

RTC timestamp time register
address_offset : 0x30 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_TSTR RTC_TSTR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SU ST MNU MNT HU HT PM

SU : Second units in BCD format.
bits : 0 - 3 (4 bit)
access : read-only

ST : Second tens in BCD format.
bits : 4 - 6 (3 bit)
access : read-only

MNU : Minute units in BCD format.
bits : 8 - 11 (4 bit)
access : read-only

MNT : Minute tens in BCD format.
bits : 12 - 14 (3 bit)
access : read-only

HU : Hour units in BCD format.
bits : 16 - 19 (4 bit)
access : read-only

HT : Hour tens in BCD format.
bits : 20 - 21 (2 bit)
access : read-only

PM : AM/PM notation
bits : 22 - 22 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

AM or 24-hour format

0x1 : B_0x1

PM

End of enumeration elements list.


RTC_TSDR (TSDR)

RTC timestamp date register
address_offset : 0x34 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_TSDR RTC_TSDR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DU DT MU MT WDU

DU : Date units in BCD format
bits : 0 - 3 (4 bit)
access : read-only

DT : Date tens in BCD format
bits : 4 - 5 (2 bit)
access : read-only

MU : Month units in BCD format
bits : 8 - 11 (4 bit)
access : read-only

MT : Month tens in BCD format
bits : 12 - 12 (1 bit)
access : read-only

WDU : Week day units
bits : 13 - 15 (3 bit)
access : read-only


RTC_TSSSR (TSSSR)

RTC timestamp sub second register
address_offset : 0x38 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_TSSSR RTC_TSSSR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS

SS : Sub second value SS[15:0] is the value of the synchronous prescaler counter when the timestamp event occurred.
bits : 0 - 15 (16 bit)
access : read-only


RTC_DR (DR)

RTC date register
address_offset : 0x4 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_DR RTC_DR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DU DT MU MT WDU YU YT

DU : Date units in BCD format
bits : 0 - 3 (4 bit)
access : read-write

DT : Date tens in BCD format
bits : 4 - 5 (2 bit)
access : read-write

MU : Month units in BCD format
bits : 8 - 11 (4 bit)
access : read-write

MT : Month tens in BCD format
bits : 12 - 12 (1 bit)
access : read-write

WDU : Week day units ...
bits : 13 - 15 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

forbidden

0x1 : B_0x1

Monday

0x7 : B_0x7

Sunday

End of enumeration elements list.

YU : Year units in BCD format
bits : 16 - 19 (4 bit)
access : read-write

YT : Year tens in BCD format
bits : 20 - 23 (4 bit)
access : read-write


RTC_ALRMAR (ALRMAR)

RTC alarm A register
address_offset : 0x40 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_ALRMAR RTC_ALRMAR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SU ST MSK1 MNU MNT MSK2 HU HT PM MSK3 DU DT WDSEL MSK4

SU : Second units in BCD format.
bits : 0 - 3 (4 bit)
access : read-write

ST : Second tens in BCD format.
bits : 4 - 6 (3 bit)
access : read-write

MSK1 : Alarm A seconds mask
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A set if the seconds match

0x1 : B_0x1

Seconds don't care in alarm A comparison

End of enumeration elements list.

MNU : Minute units in BCD format
bits : 8 - 11 (4 bit)
access : read-write

MNT : Minute tens in BCD format
bits : 12 - 14 (3 bit)
access : read-write

MSK2 : Alarm A minutes mask
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A set if the minutes match

0x1 : B_0x1

Minutes don't care in alarm A comparison

End of enumeration elements list.

HU : Hour units in BCD format
bits : 16 - 19 (4 bit)
access : read-write

HT : Hour tens in BCD format
bits : 20 - 21 (2 bit)
access : read-write

PM : AM/PM notation
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

AM or 24-hour format

0x1 : B_0x1

PM

End of enumeration elements list.

MSK3 : Alarm A hours mask
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A set if the hours match

0x1 : B_0x1

Hours don't care in alarm A comparison

End of enumeration elements list.

DU : Date units or day in BCD format
bits : 24 - 27 (4 bit)
access : read-write

DT : Date tens in BCD format
bits : 28 - 29 (2 bit)
access : read-write

WDSEL : Week day selection
bits : 30 - 30 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

DU[3:0] represents the date units

0x1 : B_0x1

DU[3:0] represents the week day. DT[1:0] is don't care.

End of enumeration elements list.

MSK4 : Alarm A date mask
bits : 31 - 31 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm A set if the date/day match

0x1 : B_0x1

Date/day don't care in alarm A comparison

End of enumeration elements list.


RTC_ALRMASSR (ALRMASSR)

RTC alarm A sub second register
address_offset : 0x44 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_ALRMASSR RTC_ALRMASSR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS MASKSS

SS : Sub seconds value This value is compared with the contents of the synchronous prescaler counter to determine if alarm A is to be activated. Only bits 0 up MASKSS-1 are compared.
bits : 0 - 14 (15 bit)
access : read-write

MASKSS : Mask the most-significant bits starting at this bit 2: SS[14:2] are don't care in alarm A comparison. Only SS[1:0] are compared. 3: SS[14:3] are don't care in alarm A comparison. Only SS[2:0] are compared. ... 12: SS[14:12] are don't care in alarm A comparison. SS[11:0] are compared. 13: SS[14:13] are don't care in alarm A comparison. SS[12:0] are compared. 14: SS[14] is don't care in alarm A comparison. SS[13:0] are compared. 15: All 15 SS bits are compared and must match to activate alarm. The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation. Note: The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation.
bits : 24 - 27 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No comparison on sub seconds for alarm A. The alarm is set when the seconds unit is incremented (assuming that the rest of the fields match).

0x1 : B_0x1

SS[14:1] are don't care in alarm A comparison. Only SS[0] is compared.

End of enumeration elements list.


RTC_ALRMBR (ALRMBR)

RTC alarm B register
address_offset : 0x48 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_ALRMBR RTC_ALRMBR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SU ST MSK1 MNU MNT MSK2 HU HT PM MSK3 DU DT WDSEL MSK4

SU : Second units in BCD format
bits : 0 - 3 (4 bit)
access : read-write

ST : Second tens in BCD format
bits : 4 - 6 (3 bit)
access : read-write

MSK1 : Alarm B seconds mask
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B set if the seconds match

0x1 : B_0x1

Seconds don't care in alarm B comparison

End of enumeration elements list.

MNU : Minute units in BCD format
bits : 8 - 11 (4 bit)
access : read-write

MNT : Minute tens in BCD format
bits : 12 - 14 (3 bit)
access : read-write

MSK2 : Alarm B minutes mask
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B set if the minutes match

0x1 : B_0x1

Minutes don't care in alarm B comparison

End of enumeration elements list.

HU : Hour units in BCD format
bits : 16 - 19 (4 bit)
access : read-write

HT : Hour tens in BCD format
bits : 20 - 21 (2 bit)
access : read-write

PM : AM/PM notation
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

AM or 24-hour format

0x1 : B_0x1

PM

End of enumeration elements list.

MSK3 : Alarm B hours mask
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B set if the hours match

0x1 : B_0x1

Hours don't care in alarm B comparison

End of enumeration elements list.

DU : Date units or day in BCD format
bits : 24 - 27 (4 bit)
access : read-write

DT : Date tens in BCD format
bits : 28 - 29 (2 bit)
access : read-write

WDSEL : Week day selection
bits : 30 - 30 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

DU[3:0] represents the date units

0x1 : B_0x1

DU[3:0] represents the week day. DT[1:0] is don't care.

End of enumeration elements list.

MSK4 : Alarm B date mask
bits : 31 - 31 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Alarm B set if the date and day match

0x1 : B_0x1

Date and day don't care in alarm B comparison

End of enumeration elements list.


RTC_ALRMBSSR (ALRMBSSR)

RTC alarm B sub second register
address_offset : 0x4C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_ALRMBSSR RTC_ALRMBSSR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS MASKSS

SS : Sub seconds value This value is compared with the contents of the synchronous prescaler counter to determine if alarm B is to be activated. Only bits 0 up to MASKSS-1 are compared.
bits : 0 - 14 (15 bit)
access : read-write

MASKSS : Mask the most-significant bits starting at this bit ... The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation.
bits : 24 - 27 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No comparison on sub seconds for alarm B. The alarm is set when the seconds unit is incremented (assuming that the rest of the fields match).

0x1 : B_0x1

SS[14:1] are don't care in alarm B comparison. Only SS[0] is compared.

0x2 : B_0x2

SS[14:2] are don't care in alarm B comparison. Only SS[1:0] are compared.

0x3 : B_0x3

SS[14:3] are don't care in alarm B comparison. Only SS[2:0] are compared.

0xC : B_0xC

SS[14:12] are don't care in alarm B comparison. SS[11:0] are compared.

0xD : B_0xD

SS[14:13] are don't care in alarm B comparison. SS[12:0] are compared.

0xE : B_0xE

SS[14] is don't care in alarm B comparison. SS[13:0] are compared.

0xF : B_0xF

All 15 SS bits are compared and must match to activate alarm.

End of enumeration elements list.


RTC_SR (SR)

RTC status register
address_offset : 0x50 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_SR RTC_SR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ALRAF ALRBF WUTF TSF TSOVF ITSF

ALRAF : Alarm A flag This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the alarm A register (RTC_ALRMAR).
bits : 0 - 0 (1 bit)
access : read-only

ALRBF : Alarm B flag This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the alarm B register (RTC_ALRMBR).
bits : 1 - 1 (1 bit)
access : read-only

WUTF : Wakeup timer flag This flag is set by hardware when the wakeup auto-reload counter reaches 0. This flag must be cleared by software at least 1.5 RTCCLK periods before WUTF is set to 1 again.
bits : 2 - 2 (1 bit)
access : read-only

TSF : Timestamp flag This flag is set by hardware when a timestamp event occurs. If ITSF flag is set, TSF must be cleared together with ITSF.
bits : 3 - 3 (1 bit)
access : read-only

TSOVF : Timestamp overflow flag This flag is set by hardware when a timestamp event occurs while TSF is already set. It is recommended to check and then clear TSOVF only after clearing the TSF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TSF bit is cleared.
bits : 4 - 4 (1 bit)
access : read-only

ITSF : Internal timestamp flag This flag is set by hardware when a timestamp on the internal event occurs.
bits : 5 - 5 (1 bit)
access : read-only


RTC_MISR (MISR)

RTC masked interrupt status register
address_offset : 0x54 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_MISR RTC_MISR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ALRAMF ALRBMF WUTMF TSMF TSOVMF ITSMF

ALRAMF : Alarm A masked flag This flag is set by hardware when the alarm A interrupt occurs.
bits : 0 - 0 (1 bit)
access : read-only

ALRBMF : Alarm B masked flag This flag is set by hardware when the alarm B interrupt occurs.
bits : 1 - 1 (1 bit)
access : read-only

WUTMF : Wakeup timer masked flag This flag is set by hardware when the wakeup timer interrupt occurs. This flag must be cleared by software at least 1.5 RTCCLK periods before WUTF is set to 1 again.
bits : 2 - 2 (1 bit)
access : read-only

TSMF : Timestamp masked flag This flag is set by hardware when a timestamp interrupt occurs. If ITSF flag is set, TSF must be cleared together with ITSF.
bits : 3 - 3 (1 bit)
access : read-only

TSOVMF : Timestamp overflow masked flag This flag is set by hardware when a timestamp interrupt occurs while TSMF is already set. It is recommended to check and then clear TSOVF only after clearing the TSF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TSF bit is cleared.
bits : 4 - 4 (1 bit)
access : read-only

ITSMF : Internal timestamp masked flag This flag is set by hardware when a timestamp on the internal event occurs and timestampinterrupt is raised.
bits : 5 - 5 (1 bit)
access : read-only


RTC_SCR (SCR)

RTC status clear register
address_offset : 0x5C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_SCR RTC_SCR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CALRAF CALRBF CWUTF CTSF CTSOVF CITSF

CALRAF : Clear alarm A flag Writing 1 in this bit clears the ALRBF bit in the RTC_SR register.
bits : 0 - 0 (1 bit)
access : write-only

CALRBF : Clear alarm B flag Writing 1 in this bit clears the ALRBF bit in the RTC_SR register.
bits : 1 - 1 (1 bit)
access : write-only

CWUTF : Clear wakeup timer flag Writing 1 in this bit clears the WUTF bit in the RTC_SR register.
bits : 2 - 2 (1 bit)
access : write-only

CTSF : Clear timestamp flag Writing 1 in this bit clears the TSOVF bit in the RTC_SR register. If ITSF flag is set, TSF must be cleared together with ITSF by setting CRSF and CITSF.
bits : 3 - 3 (1 bit)
access : write-only

CTSOVF : Clear timestamp overflow flag Writing 1 in this bit clears the TSOVF bit in the RTC_SR register. It is recommended to check and then clear TSOVF only after clearing the TSF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TSF bit is cleared.
bits : 4 - 4 (1 bit)
access : write-only

CITSF : Clear internal timestamp flag Writing 1 in this bit clears the ITSF bit in the RTC_SR register.
bits : 5 - 5 (1 bit)
access : write-only


RTC_CFGR (CFGR)

RTC configuration register
address_offset : 0x60 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_CFGR RTC_CFGR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OUT2_RMP

OUT2_RMP : RTC_OUT2 mapping
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

RTC_OUT2 is mapped on PB2

0x1 : B_0x1

RTC_OUT2 is mapped on PI8

End of enumeration elements list.


RTC_SSR (SSR)

RTC sub second register
address_offset : 0x8 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_SSR RTC_SSR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS

SS : Sub second value SS[15:0] is the value in the synchronous prescaler counter. The fraction of a second is given by the formula below: Second fraction = (PREDIV_S - SS) / (PREDIV_S + 1) Note: SS can be larger than PREDIV_S only after a shift operation. In that case, the correct time/date is one second less than as indicated by RTC_TR/RTC_DR.
bits : 0 - 15 (16 bit)
access : read-only


RTC_ICSR (ICSR)

RTC initialization control and status register
address_offset : 0xC Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RTC_ICSR RTC_ICSR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ALRAWF ALRBWF WUTWF SHPF INITS RSF INITF INIT RECALPF

ALRAWF : Alarm A write flag This bit is set by hardware when alarm A values can be changed, after the ALRAE bit has been set to 0 in RTC_CR. It is cleared by hardware in initialization mode.
bits : 0 - 0 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

Alarm A update not allowed

0x1 : B_0x1

Alarm A update allowed

End of enumeration elements list.

ALRBWF : Alarm B write flag This bit is set by hardware when alarm B values can be changed, after the ALRBE bit has been set to 0 in RTC_CR. It is cleared by hardware in initialization mode.
bits : 1 - 1 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

Alarm B update not allowed

0x1 : B_0x1

Alarm B update allowed

End of enumeration elements list.

WUTWF : Wakeup timer write flag This bit is set by hardware when WUT value can be changed, after the WUTE bit has been set to 0 in RTC_CR. It is cleared by hardware in initialization mode.
bits : 2 - 2 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

Wakeup timer configuration update not allowed except in initialization mode

0x1 : B_0x1

Wakeup timer configuration update allowed

End of enumeration elements list.

SHPF : Shift operation pending This flag is set by hardware as soon as a shift operation is initiated by a write to the RTC_SHIFTR register. It is cleared by hardware when the corresponding shift operation has been executed. Writing to the SHPF bit has no effect.
bits : 3 - 3 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

No shift operation is pending

0x1 : B_0x1

A shift operation is pending

End of enumeration elements list.

INITS : Initialization status flag This bit is set by hardware when the calendar year field is different from 0 (Backup domain reset state).
bits : 4 - 4 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

Calendar has not been initialized

0x1 : B_0x1

Calendar has been initialized

End of enumeration elements list.

RSF : Registers synchronization flag This bit is set by hardware each time the calendar registers are copied into the shadow registers (RTC_SSRx, RTC_TRx and RTC_DRx). This bit is cleared by hardware in initialization mode, while a shift operation is pending (SHPF = 1), or when in bypass shadow register mode (BYPSHAD = 1). This bit can also be cleared by software. It is cleared either by software or by hardware in initialization mode.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Calendar shadow registers not yet synchronized

0x1 : B_0x1

Calendar shadow registers synchronized

End of enumeration elements list.

INITF : Initialization flag When this bit is set to 1, the RTC is in initialization state, and the time, date and prescaler registers can be updated.
bits : 6 - 6 (1 bit)
access : read-only

Enumeration:

0x0 : B_0x0

Calendar registers update is not allowed

0x1 : B_0x1

Calendar registers update is allowed

End of enumeration elements list.

INIT : Initialization mode
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Free running mode

0x1 : B_0x1

Initialization mode used to program time and date register (RTC_TR and RTC_DR), and prescaler register (RTC_PRER). Counters are stopped and start counting from the new value when INIT is reset.

End of enumeration elements list.

RECALPF : Recalibration pending Flag The RECALPF status flag is automatically set to 1 when software writes to the RTC_CALR register, indicating that the RTC_CALR register is blocked. When the new calibration settings are taken into account, this bit returns to 0. Refer to .
bits : 16 - 16 (1 bit)
access : read-only



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.