[riot-notifications] [RIOT-OS/RIOT] cpu/stm32l4: configure and initialize MCO (#15064)
Alexandre Abadie
notifications at github.com
Thu Nov 5 13:35:55 CET 2020
@aabadie commented on this pull request.
> + /* Enable the LSE is required for MCO */
+ if (IS_ACTIVE(CLOCK_ENABLE_LSE)) {
+ stmclk_dbp_unlock();
+ RCC->BDCR |= RCC_BDCR_LSEON;
+ while (!(RCC->BDCR & RCC_BDCR_LSERDY)) {}
+ stmclk_dbp_lock();
+ }
+
+ /* Enable the LSI is required for MCO */
+ if (IS_ACTIVE(CLOCK_ENABLE_LSI)) {
+#if defined(CPU_FAM_STM32WB)
+ RCC->CSR |= RCC_CSR_LSI1ON;
+ while (!(RCC->CSR & RCC_CSR_LSI1RDY)) {}
+#else
+ RCC->CSR |= RCC_CSR_LSION;
+ while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
+#endif
+ }
Comments updated, let me know if it's ok for you.
--
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/15064#discussion_r518017730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201105/c6ce98a6/attachment.htm>
More information about the notifications
mailing list