Skip to Content
Block descriptionsRTCRTC Alarm in Get Mode

RTC Alarm Get Block Description

The RTC Alarm block operating in Get mode enables reading the currently configured alarm settings from the Real-Time Clock (RTC). To configure or modify an alarm, use the RTC Alarm Set Block. The block responsible for handling the generated interrupt signal is detailed on the RTC Alarm IRQ subpage.



RTC Alarm Get block

Table of Contents

Inputs

This block has no inputs.

Outputs

Output NameTypeDescription
Statusuint8The operational status of the RTC alarm read routing:
1 – alarm values read successfully
0 – failed to execute alarm read query
Houruint8The configured hour parameter extracted from the active RTC alarm.
Minuint8The configured minute parameter extracted from the active RTC alarm.
Secuint8The configured second parameter extracted from the active RTC alarm.
Maskuint32The main time and date mask bitfield configuration. Maps directly to the masking bits within the hardware RTC_ALRMAR (or RTC_ALRMBR) registers. Setting a specific bit to 1 forces the hardware comparator to ignore that time unit when validating the alarm trigger.
Bitfield Combinations:
0x00000080 (bit MSK1) – masks seconds validation.
0x00008000 (bit MSK2) – masks minutes validation.
0x00800000 (bit MSK3) – masks hours validation.
0x80000000 (bit MSK4) – masks date/day validation (month or week day variant).
SubSecond Maskuint32The subseconds fractional bitfield mask configuration. Maps directly to the MASKSS[3:0] bits within the hardware RTC_ALRMASSR (or RTC_ALRMBSSR) registers. Dictates the range of least significant bits in the fractional down-counter ignored during evaluation.
Values:
0x00000000 – masking inactive; all fractional subsecond register bits are matched.
0x01000000 to 0x0E000000 – sequential bit mask scaling spanning ranges from position [0] up to [14:0].
0x0F000000 – complete mask coverage; subseconds matching constraints are ignored entirely.
Date WeekDay Seluint32Day type operational mode evaluation filter selector. Maps directly to the WDSEL bit within the hardware RTC_ALRMAR (or RTC_ALRMBR) registers. Controls how the underlying field value matches temporal parameters.
Values:
0x00000000WDSEL bit cleared to 0 (interprets value directly as a calendar day of the month).
0x40000000WDSEL bit asserted to 1 (interprets value directly as a dedicated day of the week).
Date Week Dayuint32The raw day register target value matched for the active alarm event. Maps to the tens/units bits DT[1:0] / DU[3:0] (for calendar month day mode) or the raw lower units bits DU[2:0] (for week day mode) inside the hardware RTC_ALRMAR (or RTC_ALRMBR) registers.
Values:
For DATE mode: formatted BCD values spanning from 0x01 to 0x31 (mapped at register index [29:24]).
For WEEKDAY mode: formatted BCD values spanning from 0x01 (Monday) to 0x07 (Sunday) (mapped at register index [26:24]).

Block Parameters

ParameterDescription
Get or Set AlarmSelects the active operational mode for the RTC Alarm block interface:
Set Alarm – writes a custom configuration profile down to the RTC hardware.
Get Alarm – reads the current baseline configuration back from the RTC hardware.
Type of alarm IRQSpecifies the target hardware interrupt routing channel category:
RTC_ALARM_A – main Alarm A pipeline channel used to schedule events or trigger hardware wakeup wakeups.
RTC_ALARM_B – auxiliary Alarm B pipeline channel running asynchronously and fully independent of Alarm A.
RTC_WAKEUP – high-efficiency cyclic Wake Up timer channel.
RTC formatDetermines the raw encoding schema parsed across data paths:
RTC_FORMAT_BIN – conventional standard binary standard integer parsing format.
RTC_FORMAT_BCD – Binary-Coded Decimal notation schema; individual digits are isolated into discrete 4-bit nibbles.
Sample timeSpecifies the software cyclic refresh execution update interval for the block.


Parameters for RTC Alarm block in Get mode

CubeMX Configuration for a Given MCU Model

The baseline hardware peripheral setup required for the RTC is detailed in the dedicated CubeMX Configuration for a Given MCU Model subpage.

See Also

Last updated on