1+ # SPDX -FileCopyrightText: 2026 Technische Universität Hamburg
2+ # SPDX -License-Identifier: LGPL-2.1-only
13
24#pragma once
35
1113 * This configuration is intentionally conservative for early bring-up.
1214 * By default it uses HSI (16 MHz) as SYSCLK and disables PLL usage.
1315 *
14- * @author < Adarsh Nair Mullachery>
16+ * @author Adarsh Nair Mullachery
1517 * @}
1618 */
17- /* cpu/stm32/include/clk/u3/cfg_clock_default.h */
19+
1820#pragma once
1921
2022#include "cfg_clock_common_lx_u5_wx.h"
@@ -31,45 +33,45 @@ extern "C" {
3133
3234/* STM32U3: no main PLL */
3335#ifndef CONFIG_USE_CLOCK_PLL
34- #define CONFIG_USE_CLOCK_PLL 0
36+ # define CONFIG_USE_CLOCK_PLL 0
3537#endif
3638
3739/* Default to HSI for bring-up */
3840#ifndef CONFIG_USE_CLOCK_HSI
39- #define CONFIG_USE_CLOCK_HSI 1
41+ # define CONFIG_USE_CLOCK_HSI 1
4042#endif
4143
4244#ifndef CONFIG_CLOCK_HSI
43- #define CONFIG_CLOCK_HSI MHZ(16)
45+ # define CONFIG_CLOCK_HSI MHZ(16)
4446#endif
4547#ifndef CONFIG_CLOCK_HSE
46- #define CONFIG_CLOCK_HSE MHZ(8)
48+ # define CONFIG_CLOCK_HSE MHZ(8)
4749#endif
4850/* Pick a safe MSIS default if you later enable MSI mode */
4951#ifndef CONFIG_CLOCK_MSI
50- #define CONFIG_CLOCK_MSI MHZ(12)
52+ # define CONFIG_CLOCK_MSI MHZ(12)
5153#endif
5254
5355#if IS_ACTIVE (CONFIG_USE_CLOCK_HSE )
54- #define CLOCK_CORECLOCK CONFIG_CLOCK_HSE
56+ # define CLOCK_CORECLOCK CONFIG_CLOCK_HSE
5557#elif IS_ACTIVE (CONFIG_USE_CLOCK_MSI )
56- #define CLOCK_CORECLOCK CONFIG_CLOCK_MSI
58+ # define CLOCK_CORECLOCK CONFIG_CLOCK_MSI
5759#else
58- #define CLOCK_CORECLOCK CONFIG_CLOCK_HSI
60+ # define CLOCK_CORECLOCK CONFIG_CLOCK_HSI
5961#endif
6062
6163#define CLOCK_CORECLOCK_MAX MHZ(96)
6264#if CLOCK_CORECLOCK > CLOCK_CORECLOCK_MAX
63- #error "SYSCLK cannot exceed 96MHz on STM32U3"
65+ # error "SYSCLK cannot exceed 96MHz on STM32U3"
6466#endif
6567
6668#define CLOCK_AHB CLOCK_CORECLOCK
6769
6870#ifndef CONFIG_CLOCK_APB1_DIV
69- #define CONFIG_CLOCK_APB1_DIV (1)
71+ # define CONFIG_CLOCK_APB1_DIV (1)
7072#endif
7173#ifndef CONFIG_CLOCK_APB2_DIV
72- #define CONFIG_CLOCK_APB2_DIV (1)
74+ # define CONFIG_CLOCK_APB2_DIV (1)
7375#endif
7476
7577#define CLOCK_APB1 (CLOCK_AHB / CONFIG_CLOCK_APB1_DIV)
0 commit comments