[riot-notifications] [RIOT-OS/RIOT] cpu/qn908x: Initial minimal support for NXP QN908x CPUs. (#13855)

benpicco notifications at github.com
Mon Nov 30 12:07:32 CET 2020


@benpicco commented on this pull request.



> +void clocks_init(void)
+{
+    /* Set up clock selectors - Attach clocks to the peripheries */
+
+    /* Switch XTAL_CLK to 32M */
+    CLOCK_AttachClk(k32M_to_XTAL_CLK);
+    /* Switch 32K_CLK to XTAL32K */
+    CLOCK_AttachClk(kXTAL32K_to_32K_CLK);
+    /* Switch SYS_CLK to XTAL */
+    CLOCK_AttachClk(kXTAL_to_SYS_CLK);
+    /* Switch WDT_CLK to APB */
+    CLOCK_AttachClk(kAPB_to_WDT_CLK);
+
+    /* Set up dividers */
+
+    /* Set OSC32M_DIV divider to value 2 */
+    CLOCK_SetClkDiv(kCLOCK_DivOsc32mClk, 1U);
+    /* Set XTAL_DIV divider to value 2 */
+    CLOCK_SetClkDiv(kCLOCK_DivXtalClk, 1U);
+    /* Set AHB_DIV divider to value 2 */
+    CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U);
+    /* Set FRG_MULT1 to value 0, Set FRG_DIV1 to value 255 */
+    CLOCK_SetClkDiv(kCLOCK_DivFrg1, 0U);
+    /* Set FRG_MULT0 to value 0, Set FRG_DIV0 to value 255 */
+    CLOCK_SetClkDiv(kCLOCK_DivFrg0, 0U);
+    /* Set APB_DIV divider to value 1 */
+    CLOCK_SetClkDiv(kCLOCK_DivApbClk, 0U);
+}

Yes the Kconfig transition is not yet complete, not all modules can be selected in Kconfig yet, so it's not enabled by default.

I *think* you don't need to model the board oscillator config in Kconfig since it's soldered in place.

-- 
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/13855#discussion_r532516097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/a35e82d6/attachment.htm>


More information about the notifications mailing list