[riot-notifications] [RIOT-OS/RIOT] cpu/stm32f0f1f3: add MCO configuration and initialization (#15078)

Alexandre Abadie notifications at github.com
Thu Nov 5 12:30:08 CET 2020


@aabadie commented on this pull request.



> +#define CLOCK_MCO_SRC                           (RCC_CFGR_MCOSEL_HSE)
+#elif IS_ACTIVE(CONFIG_CLOCK_MCO_USE_PLLCLK)
+#define CLOCK_MCO_SRC                           (RCC_CFGR_MCOSEL_PLL_DIV2)
+#else
+#error "Invalid MCO clock source selection"
+#endif
+
+/* Configure the MCO prescaler: valid values are 1, 2, 4, 8, 16, 32, 64, 128 */
+#ifndef CONFIG_CLOCK_MCO_PRE
+#define CONFIG_CLOCK_MCO_PRE                    (1)
+#endif
+
+/* MCO prescaler is only available on STM32F0 and STM32F3 */
+#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3)
+#if CONFIG_CLOCK_MCO_PRE == 1
+#define CLOCK_MCO_PRE                           (RCC_CFGR_MCOPRE_DIV1)

See RM0316, figure 13, page 126.

-- 
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/15078#discussion_r517981308
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201105/bb65af69/attachment.htm>


More information about the notifications mailing list