Skip to content

Commit 9ccd602

Browse files
committed
Fix Reset RTC Domain
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 9bb2a17 commit 9ccd602

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

cores/arduino/stm32/low_power.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ void LowPower_init(){
6464
/* Allow access to Backup domain */
6565
HAL_PWR_EnableBkUpAccess();
6666

67-
/* Reset RTC Domain */
68-
__HAL_RCC_BACKUPRESET_FORCE();
69-
__HAL_RCC_BACKUPRESET_RELEASE();
70-
7167
#ifdef __HAL_RCC_WAKEUPSTOP_CLK_CONFIG
7268
/* Ensure that HSI is wake-up system clock */
7369
__HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI);

cores/arduino/stm32/rtc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,8 @@ void RTC_init(hourFormat_t format, sourceClock_t source)
322322
HAL_PWR_EnableBkUpAccess();
323323
#endif
324324
/* Reset RTC Domain */
325-
if(source != LSE_CLOCK) {
326-
__HAL_RCC_BACKUPRESET_FORCE();
327-
__HAL_RCC_BACKUPRESET_RELEASE();
328-
}
325+
__HAL_RCC_BACKUPRESET_FORCE();
326+
__HAL_RCC_BACKUPRESET_RELEASE();
329327

330328
/* Init RTC clock */
331329
RTC_initClock(source);

0 commit comments

Comments
 (0)