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 
19 #ifndef CFG_CLOCK_DEFAULT_H
20 #define CFG_CLOCK_DEFAULT_H
21 
22 #include <stdint.h>
23 
24 #include "cpu.h"
25 #include "periph_cpu.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
62 #define CLOCK_USE_PLL (1)
63 
64 #if CLOCK_USE_PLL
65 /* edit these values to adjust the PLL output frequency */
66 #define CLOCK_PLL_MUL (47U) /* must be >= 31 & <= 95 */
67 #define CLOCK_PLL_DIV (1U) /* adjust to your needs */
68 /* generate the actual used core clock frequency */
69 #define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
70 #else
71 /* edit this value to your needs */
72 #define CLOCK_DIV (1U)
73 /* generate the actual core clock frequency */
74 #define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
75 #endif
76 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* CFG_CLOCK_DEFAULT_H */
83