[riot-notifications] [RIOT-OS/RIOT] RTC for stm32f1 (#11258)

Former notifications at github.com
Wed Mar 27 10:37:59 CET 2019


Former commented on this pull request.



> +        // Resets the entire Backup domain
+        RCC->BDCR |= RCC_BDCR_BDRST;
+        // Reset not activated
+        RCC->BDCR &= ~RCC_BDCR_BDRST;
+
+        //RTC clock enabled
+        //LSE oscillator clock used as RTC clock10: LSI oscillator clock used as RTC clock
+        RCC->BDCR |= RCC_BDCR_RTCEN | RCC_BDCR_RTCSEL_LSE;
+
+        // Second interrupt is enabled.
+        RTC->CRH |= RTC_CRH_SECIE;
+
+        // Enter configuration mode.
+        RTC->CRL |= RTC_CRL_CNF;
+
+        //If the input clock frequency (fRTCCLK) is 32.768 kHz, write 7FFFh in this register to get a signal period of 1 second.

Yes, 0x7fff will be correct

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11258#discussion_r269472890
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190327/4f594e78/attachment.html>


More information about the notifications mailing list