Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
RTC: fix clock source being misconfigured
  • Loading branch information
facchinm authored and pennam committed Jul 23, 2025
commit 6ab0fb871d8ef3c967f3229f541e7ce5f91cd50e
4 changes: 4 additions & 0 deletions libraries/RTC/src/RTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ bool openRtc() {
if(!isRtcRunning()) {
R_RTC_ClockSourceSet(&rtc_ctrl);
}
if (R_RTC->RCR4 != (uint8_t) rtc_ctrl.p_cfg->clock_source) {
R_RTC->RCR4 = (uint8_t) rtc_ctrl.p_cfg->clock_source;
delay(200);
}
return true;
}
else {
Expand Down
Loading