Skip to main content
sheng yang
Senior
December 12, 2025
Solved

DBP bit couldn't be set to 1

  • December 12, 2025
  • 1 reply
  • 269 views

I want to use stm32f103rct6 inner RTC, I write some code as below to active RTC, But I found I couldn't set DBP bit of PWR_CR reg to 1,  

 __HAL_RCC_PWR_CLK_ENABLE();
 __HAL_RCC_BKP_CLK_ENABLE();
 LL_PWR_EnableBkUpAccess();

when I debug the reg as below

(gdb) x/2x 0x40007000
0x40007000: 0x00000000 0x00000000

 

Best answer by sheng yang

I made a mistake , it was becase I use LSE as RTC clock. But it was not exist, I changed to LSI , then it's ok.

1 reply

sheng yang
sheng yangAuthorBest answer
Senior
December 12, 2025

I made a mistake , it was becase I use LSE as RTC clock. But it was not exist, I changed to LSI , then it's ok.