Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
cfg_clk_default.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2014-2016 Freie Universität Berlin
3
* SPDX-FileCopyrightText: 2015 Zolertia SL
4
* SPDX-FileCopyrightText: 2020 Inria
5
* SPDX-License-Identifier: LGPL-2.1-only
6
*/
7
8
#pragma once
9
23
#include <stdint.h>
24
25
#include "cpu.h"
26
#include "periph_cpu.h"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
37
/*
38
* 0: use internal 32KHz RCOSC
39
* 1: use external 32KHz XOSC
40
*/
41
#ifndef SYS_CTRL_OSC32K_USE_XTAL
42
#define SYS_CTRL_OSC32K_USE_XTAL (1)
43
#endif
44
/*
45
* 0: use internal 16MHz RCOSC
46
* 1: use external 32MHz XOSC, required for RF operation
47
*/
48
#ifndef SYS_CTRL_OSC_USE_XTAL
49
#define SYS_CTRL_OSC_USE_XTAL (1)
50
#endif
51
52
#if SYS_CTRL_OSC_USE_XTAL
53
#define CLOCK_OSC (XOSC32M_FREQ)
54
#else
55
#define CLOCK_OSC (RCOSC16M_FREQ)
56
#endif
57
58
#if SYS_CTRL_OSC32K_USE_XTAL
59
#define CLOCK_OSC32K (XOSC32K_FREQ)
/* XCOSC frequency */
60
#else
61
#define CLOCK_OSC32K (RCOSC32K_FREQ)
/* XCOSC frequency */
62
#endif
63
64
/* System clock frequency 32MHz */
65
#ifndef CLOCK_CORECLOCK
66
#define CLOCK_CORECLOCK (CLOCK_OSC)
67
#endif
68
/* I/O clock rate setting 16MHz */
69
#ifndef CLOCK_IO
70
#define CLOCK_IO (CLOCK_OSC / 2)
71
#endif
74
#ifdef __cplusplus
75
}
76
#endif
77
Generated on Thu Jul 24 2025 16:03:56 by
1.9.1