libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
sysctl.h
Go to the documentation of this file.
1
/** @defgroup sysctl_defines SYSCTL Defines
2
*
3
* @brief <b>Defined Constants and Types for the SWM050 SYSCTL Registers</b>
4
*
5
* @ingroup SWM050_defines
6
*
7
* LGPL License Terms @ref lgpl_license
8
*/
9
/*
10
* This file is part of the libopencm3 project.
11
*
12
* Copyright (C) 2019 Caleb Szalacinski <contact@skiboy.net>
13
*
14
* This library is free software: you can redistribute it and/or modify
15
* it under the terms of the GNU Lesser General Public License as published by
16
* the Free Software Foundation, either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* This library is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU Lesser General Public License for more details.
23
*
24
* You should have received a copy of the GNU Lesser General Public License
25
* along with this library. If not, see <http://www.gnu.org/licenses/>.
26
*/
27
28
/**@{*/
29
#ifndef LIBOPENCM3_SYSCTL_H
30
#define LIBOPENCM3_SYSCTL_H
31
#include <
libopencm3/cm3/common.h
>
32
#include <
libopencm3/swm050/memorymap.h
>
33
34
/** @defgroup sysctl_bit_defs SYSCTL register bit definitions
35
@{*/
36
#define SYSCTL_SYS_CFG_2_SLEEP (1 << 4)
37
#define SYSCTL_SYS_CFG_1_TIMERSE1 (1 << 17)
38
#define SYSCTL_SYS_CFG_1_TIMERSE0 (1 << 6)
39
#define SYSCTL_SYS_CFG_1_WDT (1 << 4)
40
/**@}*/
41
42
/** @defgroup sysctl_register SYSCTL Registers
43
* @note System configuration registers
44
* @{*/
45
/** Clock dividers for TIMERSE and SCLK */
46
#define SYSCTL_SYS_CFG_0 MMIO32(SYSCTL_BASE + 0x0)
47
/** TIMERSE0, TIMERSE1, and WDT enable */
48
#define SYSCTL_SYS_CFG_1 MMIO32(SYSCTL_BASE + 0x4)
49
/** SCLK multiplier (18Mhz and 36Mhz) */
50
#define SYSCTL_SYS_DBLF MMIO32(SYSCTL_BASE + 0x8)
51
/** MOS Disconnect (Synwit says that this subregister is unused), Sleep Mode,
52
and Internal Oscillator Disconnect. Oscillator Disconnect should probably
53
not be used on the SWM050, because it has no external oscillator support */
54
#define SYSCTL_SYS_CFG_2 MMIO32(SYSCTL_BASE + 0xC)
55
/*@}*/
56
57
#endif
58
/**@}*/
common.h
memorymap.h
include
libopencm3
swm050
sysctl.h
Generated on Tue Mar 7 2023 16:13:12 for libopencm3 by
1.9.4