Skip to Content
Block descriptionsRTCRTC Get Time and Date

RTC Get Time and Date Block Description

The RTC Get Time and Date block enables reading the current tracking time and calendar date parameters back from the Real-Time Clock (RTC) hardware peripheral.



RTC Get Time and Date block

Table of Contents

Inputs

This block has no inputs.

Outputs

Output NameTypeDescription
Statusuint8The operational status of the RTC time and date read routine:
1 – time and date values read successfully
0 – failed to execute peripheral read query
Houruint8The current hour register value.
Minuint8The current minute register value.
Secuint8The current second register value.
MSecuint32The calculated fractional millisecond subsecond value.
Dayuint8The current calendar day of the month.
Monthuint8The current calendar month index.
Yearuint8The last two digits representing the current calendar year (ranging from 0 to 99).
WeekDayuint8The corresponding day of the week indicator.

Block Parameters

ParameterDescription
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 Get Time and Date block

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