@@ -1110,17 +1110,17 @@ BUILD_ASSERT(DT_INST_CLOCKS_HAS_IDX(0, 1), "RTC source clock not defined in the
1110
1110
static const struct rtc_stm32_config rtc_config = {
1111
1111
#if DT_INST_CLOCKS_CELL_BY_IDX (0 , 1 , bus ) == STM32_SRC_LSI
1112
1112
/* prescaler values for LSI @ 32 KHz */
1113
- .async_prescaler = 0x7F ,
1114
- .sync_prescaler = 0x00F9 ,
1113
+ .async_prescaler = DT_INST_PROP_OR ( 0 , async_prescaler , 0x7F ) ,
1114
+ .sync_prescaler = DT_INST_PROP_OR ( 0 , sync_prescaler , 0x00F9 ) ,
1115
1115
#elif DT_INST_CLOCKS_CELL_BY_IDX (0 , 1 , bus ) == STM32_SRC_LSE
1116
1116
/* prescaler values for LSE @ 32768 Hz */
1117
- .async_prescaler = 0x7F ,
1118
- .sync_prescaler = 0x00FF ,
1117
+ .async_prescaler = DT_INST_PROP_OR ( 0 , async_prescaler , 0x7F ) ,
1118
+ .sync_prescaler = DT_INST_PROP_OR ( 0 , sync_prescaler , 0x00FF ) ,
1119
1119
#elif DT_INST_CLOCKS_CELL_BY_IDX (0 , 1 , bus ) == STM32_SRC_HSE
1120
1120
/* prescaler values for HSE */
1121
- .async_prescaler = RTC_HSE_ASYNC_PRESCALER - 1 ,
1122
- .sync_prescaler = RTC_HSE_SYNC_PRESCALER - 1 ,
1123
- .hse_prescaler = RTC_HSE_PRESCALER ,
1121
+ .async_prescaler = DT_INST_PROP_OR ( 0 , async_prescaler , RTC_HSE_ASYNC_PRESCALER - 1 ) ,
1122
+ .sync_prescaler = DT_INST_PROP_OR ( 0 , sync_prescaler , RTC_HSE_SYNC_PRESCALER - 1 ) ,
1123
+ .hse_prescaler = DT_INST_PROP_OR ( 0 , hse_prescaler , RTC_HSE_PRESCALER ) ,
1124
1124
#else
1125
1125
#error Invalid RTC SRC
1126
1126
#endif
0 commit comments