[riot-notifications] [RIOT-OS/RIOT] boards/stm32l4/wb: add Kconfig for clock configuration (#14968)

Leandro Lanzieri notifications at github.com
Tue Nov 3 18:25:23 CET 2020


@leandrolanzieri commented on this pull request.



> +default CLOCK_PLL_SRC_MSI if !BOARD_HAS_HSE
+default CLOCK_PLL_SRC_HSE if BOARD_HAS_HSE

I think this can be simplified to
```suggestion
default CLOCK_PLL_SRC_HSE
```

> +    default 4 if CPU_FAM_G4 && !BOARD_HAS_HSE
     default 6 if CPU_FAM_G4 && BOARD_HAS_HSE

Defaults are evaluated from top to bottom, this should work instead right?
```suggestion
    default 6 if CPU_FAM_G4 && BOARD_HAS_HSE
    default 4 if CPU_FAM_G4
```

>  
 config CLOCK_MSI_1MHZ
-    bool "1.048MHz"
+    bool "1MHz"

```suggestion
    bool
    prompt "1.048MHz" if CPU_FAM_L0 || CPU_FAM_L1
    prompt "1MHz"
```

>  
 config CLOCK_MSI_2MHZ
-    bool "2.097MHz"
+    bool "2MHz"

```suggestion
    bool
    prompt "2.097MHz" if CPU_FAM_L0 || CPU_FAM_L1
    prompt "2MHz"
```

>  
 config CLOCK_MSI_4MHZ
-    bool "4.194MHz"
+    bool "4MHz"

```suggestion
    bool
    prompt "4.194MHz" if CPU_FAM_L0 || CPU_FAM_L1
    prompt "4MHz"
```

> +    default 1000000 if CLOCK_MSI_1MHZ && (CPU_FAM_L4 || CPU_FAM_L5 || CPU_FAM_WB)
+    default 1048000 if CLOCK_MSI_1MHZ && (CPU_FAM_L0 || CPU_FAM_L1)
+    default 2000000 if CLOCK_MSI_2MHZ && (CPU_FAM_L4 || CPU_FAM_L5 || CPU_FAM_WB)
+    default 2097000 if CLOCK_MSI_2MHZ && (CPU_FAM_L0 || CPU_FAM_L1)
+    default 4000000 if CLOCK_MSI_4MHZ && (CPU_FAM_L4 || CPU_FAM_L5 || CPU_FAM_WB)
+    default 4194000 if CLOCK_MSI_4MHZ && (CPU_FAM_L0 || CPU_FAM_L1)

I made a suggestion on the prompts for these options, but alternatively we could split them in different choice options altogether.

-- 
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/14968#pullrequestreview-522710309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/e44fc989/attachment.htm>


More information about the notifications mailing list