libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
l0/timer.h
Go to the documentation of this file.
1
/** @defgroup timer_defines Timer Defines
2
3
@brief <b>libopencm3 Defined Constants and Types for the STM32L0xx Timers</b>
4
5
@ingroup STM32L0xx_defines
6
7
@version 1.0.0
8
9
@date 17 May 2015
10
11
@author @htmlonly © @endhtmlonly 2015 Robin Kreis <r.kreis@uni-bremen.de>
12
13
LGPL License Terms @ref lgpl_license
14
*/
15
16
/*
17
* This file is part of the libopencm3 project.
18
*
19
* Copyright (C) 2015 Robin Kreis <r.kreis@uni-bremen.de>
20
*
21
* This library is free software: you can redistribute it and/or modify
22
* it under the terms of the GNU Lesser General Public License as published by
23
* the Free Software Foundation, either version 3 of the License, or
24
* (at your option) any later version.
25
*
26
* This library is distributed in the hope that it will be useful,
27
* but WITHOUT ANY WARRANTY; without even the implied warranty of
28
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
* GNU Lesser General Public License for more details.
30
*
31
* You should have received a copy of the GNU Lesser General Public License
32
* along with this library. If not, see <http://www.gnu.org/licenses/>.
33
*/
34
35
#pragma once
36
#include <
libopencm3/stm32/common/timer_common_all.h
>
37
38
/**@{*/
39
40
/** Timer 2/21/22 option register (TIMx_OR) */
41
42
#define TIM_OR(tim_base) MMIO32((tim_base) + 0x50)
43
#define TIM2_OR TIM_OR(TIM2)
44
#define TIM21_OR TIM_OR(TIM21)
45
#define TIM22_OR TIM_OR(TIM22)
46
47
#define TIM2_OR_ETR_RMP_SHIFT 0
48
#define TIM2_OR_ETR_RMP (7 << TIM2_OR_ETR_RMP_SHIFT)
49
#define TIM2_OR_ETR_RMP_GPIO (0 << TIM2_OR_ETR_RMP_SHIFT)
50
#define TIM2_OR_ETR_RMP_HSI48 (4 << TIM2_OR_ETR_RMP_SHIFT)
51
#define TIM2_OR_ETR_RMP_LSE (5 << TIM2_OR_ETR_RMP_SHIFT)
52
#define TIM2_OR_ETR_RMP_COMP2_OUT (6 << TIM2_OR_ETR_RMP_SHIFT)
53
#define TIM2_OR_ETR_RMP_COMP1_OUT (7 << TIM2_OR_ETR_RMP_SHIFT)
54
55
#define TIM2_OR_TI4_RMP_SHIFT 3
56
#define TIM2_OR_TI4_RMP (3 << TIM2_OR_TI4_RMP_SHIFT)
57
#define TIM2_OR_TI4_RMP_GPIO (0 << TIM2_OR_TI4_RMP_GPIO)
58
#define TIM2_OR_TI4_RMP_COMP2_OUT (1 << TIM2_OR_TI4_RMP_GPIO)
59
#define TIM2_OR_TI4_RMP_COMP1_OUT (2 << TIM2_OR_TI4_RMP_GPIO)
60
61
#define TIM21_OR_ETR_RMP_SHIFT 0
62
#define TIM21_OR_ETR_RMP (3 << TIM21_OR_ETR_RMP_SHIFT)
63
#define TIM21_OR_ETR_RMP_GPIO (0 << TIM21_OR_ETR_RMP_SHIFT)
64
#define TIM21_OR_ETR_RMP_COMP2_OUT (1 << TIM21_OR_ETR_RMP_SHIFT)
65
#define TIM21_OR_ETR_RMP_COMP1_OUT (2 << TIM21_OR_ETR_RMP_SHIFT)
66
#define TIM21_OR_ETR_RMP_LSE (3 << TIM21_OR_ETR_RMP_SHIFT)
67
68
#define TIM21_OR_TI1_RMP_SHIFT 2
69
#define TIM21_OR_TI1_RMP (7 << TIM21_OR_TI1_RMP_SHIFT)
70
#define TIM21_OR_TI1_RMP_GPIO (0 << TIM21_OR_TI1_RMP_SHIFT)
71
#define TIM21_OR_TI1_RMP_RTC_WAKEUP (1 << TIM21_OR_TI1_RMP_SHIFT)
72
#define TIM21_OR_TI1_RMP_HSE_RTC (2 << TIM21_OR_TI1_RMP_SHIFT)
73
#define TIM21_OR_TI1_RMP_MSI (3 << TIM21_OR_TI1_RMP_SHIFT)
74
#define TIM21_OR_TI1_RMP_LSE (4 << TIM21_OR_TI1_RMP_SHIFT)
75
#define TIM21_OR_TI1_RMP_LSI (5 << TIM21_OR_TI1_RMP_SHIFT)
76
#define TIM21_OR_TI1_RMP_COMP1_OUT (6 << TIM21_OR_TI1_RMP_SHIFT)
77
#define TIM21_OR_TI1_RMP_MCO (7 << TIM21_OR_TI1_RMP_SHIFT)
78
79
#define TIM21_OR_TI2_RMP_SHIFT 5
80
#define TIM21_OR_TI2_RMP (1 << TIM21_OR_TI2_RMP_SHIFT)
81
#define TIM21_OR_TI2_RMP_GPIO (0 << TIM21_OR_TI2_RMP_SHIFT)
82
#define TIM21_OR_TI2_RMP_COMP2_OUT (1 << TIM21_OR_TI2_RMP_SHIFT)
83
84
#define TIM22_OR_ETR_RMP_SHIFT 0
85
#define TIM22_OR_ETR_RMP (3 << TIM22_OR_ETR_RMP_SHIFT)
86
#define TIM22_OR_ETR_GPIO (0 << TIM22_OR_ETR_RMP_SHIFT)
87
#define TIM22_OR_ETR_COMP2_OUT (1 << TIM22_OR_ETR_RMP_SHIFT)
88
#define TIM22_OR_ETR_COMP1_OUT (2 << TIM22_OR_ETR_RMP_SHIFT)
89
#define TIM22_OR_ETR_LSE (3 << TIM22_OR_ETR_RMP_SHIFT)
90
91
#define TIM22_OR_TI1_RMP_SHIFT 2
92
#define TIM22_OR_TI1_RMP (3 << TIM22_OR_TI1_RMP_SHIFT)
93
#define TIM22_OR_TI1_RMP_GPIO (0 << TIM22_OR_TI1_RMP_SHIFT)
94
#define TIM22_OR_TI1_RMP_COMP2_OUT (1 << TIM22_OR_TI1_RMP_SHIFT)
95
#define TIM22_OR_TI1_RMP_COMP1_OUT (2 << TIM22_OR_TI1_RMP_SHIFT)
96
97
/**@}*/
timer_common_all.h
include
libopencm3
stm32
l0
timer.h
Generated on Tue Mar 7 2023 16:12:00 for libopencm3 by
1.9.4