cancel
Showing results for 
Search instead for 
Did you mean: 

Initialising RTC

jdcowpland
Associate II
Posted on November 20, 2013 at 17:40

Hey guys, I'm attempting to setup RTC without using any of the STM libraries. I've managed to disable the write access to the RTC registers by entering the keys into the RTC_WPR register. I've set the Init bit in the RTC_ISR register, and am polling to get the INITF bit, but it never goes high. Any ideas what I might be missing. I've set the following bits so far:

RCC_APB1ENR.PWREN = 1;

PWR_CR.DBP = 1;

RCC_BDCR.RTCEN = 1;

RCC_BDCR.LSEON = 1;

RCC_BDCR.RTCSEL0 = 1;

RCC_BDCR.RTCSEL1 = 0;

RTC_WPRbits.KEY = 0xCA;

RTC_WPRbits.KEY = 0x53;

RTC_ISR.INIT_RTC_ISR = 1;

#rtc
0 REPLIES 0