cfg_clock_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Kees Bakker, SODAQ
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include <stdint.h>
22 
23 #include "cpu.h"
24 #include "periph_cpu.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
61 #define CLOCK_USE_PLL (1)
62 
63 #if CLOCK_USE_PLL
64 /* edit these values to adjust the PLL output frequency */
65 #define CLOCK_PLL_MUL (47U) /* must be >= 31 & <= 95 */
66 #define CLOCK_PLL_DIV (1U) /* adjust to your needs */
67 /* generate the actual used core clock frequency */
68 #define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
69 #else
70 /* edit this value to your needs */
71 #define CLOCK_DIV (1U)
72 /* generate the actual core clock frequency */
73 #define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
74 #endif
77 #ifdef __cplusplus
78 }
79 #endif
80