Problem with stm32f103rb built in rtc

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
adityadeysarkar
Posts: 2
Joined: 10 Jun 2014 08:20

Problem with stm32f103rb built in rtc

#1 Post by adityadeysarkar » 11 Jun 2014 08:32

RTC_CNTL and RTC_CNTH registers are not updationg with new values.
Below is my code.....
void SetRTC()
{
while (RTC_CRL.b5 == 0); // wait untill RTOFF is 1
RTC_CRL.B4 =1; //set cnf register

RTC_CNTL = 0xa498; // set time
RTC_CNTH = 0x1111; //set date

RTC_CRL.b4 = 0; // Configmode off

while (RTC_CRL.b5 == 0); // wait untill RTOFF is 1
}
program stops executing on the last line........
Any1 pls help me with this

Post Reply

Return to “mikroBasic PRO for ARM General”