cancel
Showing results for 
Search instead for 
Did you mean: 

DBP bit couldn't be set to 1

sheng yang
Senior

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
sheng yang
Senior

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.

View solution in original post

1 REPLY 1
sheng yang
Senior

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.