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.

Table of Contents
Inputs
| Input Name | Type | Description |
|---|---|---|
| Hour | uint8 | Conditional input The target hour value. Visibility depends on the selected Set parameter configuration. |
| Min | uint8 | Conditional input The target minute value. Visibility depends on the selected Set parameter configuration. |
| Sec | uint8 | Conditional input The target second value. Visibility depends on the selected Set parameter configuration. |
| MSec | uint32 | Conditional input The target millisecond value. Visibility depends on the selected Set parameter configuration. |
| Day | uint8 | Conditional input The target calendar day of the month. Visibility depends on the selected Set parameter configuration. |
| Month | uint8 | Conditional input The target calendar month index. Visibility depends on the selected Set parameter configuration. |
| Year | uint8 | Conditional input The last two digits representing the target calendar year (values from 0 to 99). Visibility depends on the selected Set parameter configuration. |
| WeekDay | uint8 | Conditional input The target day of the week indicator. Visibility depends on the selected Set parameter configuration. |
Outputs
This block has no outputs.
Block Parameters
| Parameter | Description |
|---|---|
| Set parameter | Selects 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 format | Determines 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 time | Specifies the software cyclic refresh execution update interval for the 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