@@ -437,18 +437,21 @@ void __attribute__((weak)) rtc_callback(rtc_callback_args_t *p_args) {
437437 }
438438}
439439
440- rtc_instance_ctrl_t rtc_ctrl;
440+ rtc_instance_ctrl_t rtc_ctrl = {
441+ .open = 0 ,
442+ };
443+
444+ #ifndef RTC_CLOCK_SOURCE
445+ #define RTC_CLOCK_SOURCE RTC_CLOCK_SOURCE_LOCO
446+ #endif
447+
441448const rtc_error_adjustment_cfg_t rtc_err_cfg = {
442449 .adjustment_mode = RTC_ERROR_ADJUSTMENT_MODE_AUTOMATIC,
443450 .adjustment_period = RTC_ERROR_ADJUSTMENT_PERIOD_10_SECOND,
444451 .adjustment_type = RTC_ERROR_ADJUSTMENT_NONE,
445452 .adjustment_value = 0 , };
446453rtc_cfg_t rtc_cfg = {
447- // TODO: change me to RTC_CLOCK_SOURCE_SUBCLK when capacitors are mounted
448- // https://arduino.atlassian.net/browse/HWH33-204
449- // Fixes counting time in VBAT mode on H33
450- // Leave as is for Santiago
451- .clock_source = RTC_CLOCK_SOURCE_LOCO,
454+ .clock_source = RTC_CLOCK_SOURCE,
452455 .freq_compare_value_loco = 255 ,
453456 .p_err_cfg = &rtc_err_cfg,
454457 .alarm_ipl = (12 ),
@@ -458,8 +461,7 @@ rtc_cfg_t rtc_cfg = {
458461 .carry_ipl = (12 ),
459462 .carry_irq = FSP_INVALID_VECTOR,
460463 .p_callback = rtc_callback,
461- .p_context = NULL ,
462-
464+ .p_context = NULL ,
463465};
464466
465467#ifdef __cplusplus
0 commit comments