Skip to content

Commit ff98229

Browse files
committed
fix(backup): enable RTC clock for TAMP backup registers
Fixes #2152. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 81583c5 commit ff98229

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cores/arduino/stm32/backup.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ static inline void enableBackupDomain(void)
8686
/* Enable BKPSRAM CLK for backup SRAM */
8787
__HAL_RCC_BKPSRAM_CLK_ENABLE();
8888
#endif
89+
#if defined(TAMP_BKP0R) && defined(__HAL_RCC_RTCAPB_CLK_ENABLE)
90+
/* Enable RTC CLK for TAMP backup registers */
91+
__HAL_RCC_RTCAPB_CLK_ENABLE();
92+
#endif
8993
}
9094

9195
static inline void disableBackupDomain(void)
@@ -102,6 +106,10 @@ static inline void disableBackupDomain(void)
102106
/* Disable BKP CLK for backup registers */
103107
__HAL_RCC_BKP_CLK_DISABLE();
104108
#endif
109+
#if defined(TAMP_BKP0R) && defined(__HAL_RCC_RTCAPB_CLK_DISABLE)
110+
/* Disable RTC CLK for TAMP backup registers */
111+
__HAL_RCC_RTCAPB_CLK_DISABLE();
112+
#endif
105113
}
106114

107115
static inline void setBackupRegister(uint32_t index, uint32_t value)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy