cfg_clock_default.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Kees Bakker, SODAQ
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include <stdint.h>
19 
20 #include "cpu.h"
21 #include "periph_cpu.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
58 #define CLOCK_USE_PLL (1)
59 
60 #if CLOCK_USE_PLL
61 /* edit these values to adjust the PLL output frequency */
62 #define CLOCK_PLL_MUL (47U) /* must be >= 31 & <= 95 */
63 #define CLOCK_PLL_DIV (1U) /* adjust to your needs */
64 /* generate the actual used core clock frequency */
65 #define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
66 #else
67 /* edit this value to your needs */
68 #define CLOCK_DIV (1U)
69 /* generate the actual core clock frequency */
70 #define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
71 #endif
74 #ifdef __cplusplus
75 }
76 #endif
77