Skip to Content
Block descriptionsRTCRTC Set Time and Date

RTC Set Time and Date Block Description

The RTC Set Time and Date block enables writing custom time and calendar date configuration parameters down to the Real-Time Clock (RTC) hardware peripheral.



RTC Set Time and Date block

Table of Contents

Inputs

Input NameTypeDescription
Houruint8Conditional input
The target hour value. Visibility depends on the selected Set parameter configuration.
Minuint8Conditional input
The target minute value. Visibility depends on the selected Set parameter configuration.
Secuint8Conditional input
The target second value. Visibility depends on the selected Set parameter configuration.
MSecuint32Conditional input
The target millisecond value. Visibility depends on the selected Set parameter configuration.
Dayuint8Conditional input
The target calendar day of the month. Visibility depends on the selected Set parameter configuration.
Monthuint8Conditional input
The target calendar month index. Visibility depends on the selected Set parameter configuration.
Yearuint8Conditional input
The last two digits representing the target calendar year (values from 0 to 99). Visibility depends on the selected Set parameter configuration.
WeekDayuint8Conditional input
The target day of the week indicator. Visibility depends on the selected Set parameter configuration.

Outputs

This block has no outputs.

Block Parameters

ParameterDescription
Set parameterSelects which temporal dataset is written down to the hardware peripheral, altering block input visibility dynamically:
Time – overwrites only the time registers within the RTC.
Date – overwrites only the calendar date registers within the RTC.
Time and Date – overwrites both the time and calendar date registers within the RTC.
RTC formatDetermines the raw encoding schema parsed across data paths:
RTC_FORMAT_BIN – conventional standard binary 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 Set 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