stm32f3: add HRTIM definitions
Add definitions for the High Resolution Timer peripheral (currently only present on the F334).
This commit is contained in:
parent
b2079f10af
commit
5a80eb4bee
2788
include/libopencm3/stm32/common/hrtim_common_all.h
Normal file
2788
include/libopencm3/stm32/common/hrtim_common_all.h
Normal file
File diff suppressed because it is too large
Load Diff
37
include/libopencm3/stm32/f3/hrtim.h
Normal file
37
include/libopencm3/stm32/f3/hrtim.h
Normal file
@ -0,0 +1,37 @@
|
||||
/** @defgroup hrtim_defines HRTIM Defines
|
||||
*
|
||||
* @brief <b>Defined Constants and Types for the STM32F3xx High Resolution Timer</b>
|
||||
*
|
||||
* @ingroup STM32F3xx_defines
|
||||
*
|
||||
* @version 1.0.0
|
||||
*
|
||||
* @date 25 February 2017
|
||||
*
|
||||
* LGPL License Terms @ref lgpl_license
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_HRTIM_H
|
||||
#define LIBOPENCM3_HRTIM_H
|
||||
|
||||
#include <libopencm3/stm32/common/hrtim_common_all.h>
|
||||
|
||||
#endif
|
||||
|
@ -67,13 +67,13 @@
|
||||
"comp123",
|
||||
"comp456",
|
||||
"comp7",
|
||||
"reserved_6",
|
||||
"reserved_7",
|
||||
"reserved_8",
|
||||
"reserved_9",
|
||||
"reserved_10",
|
||||
"reserved_11",
|
||||
"reserved_12",
|
||||
"hrtim_master",
|
||||
"hrtim_tima",
|
||||
"hrtim_timb",
|
||||
"hrtim_timc",
|
||||
"hrtim_timd",
|
||||
"hrtim_time",
|
||||
"hrtim_flt",
|
||||
"usb_hp",
|
||||
"usb_lp",
|
||||
"usb_wkup",
|
||||
@ -85,4 +85,4 @@
|
||||
"partname_humanreadable": "STM32 F3 series",
|
||||
"partname_doxygen": "STM32F3",
|
||||
"includeguard": "LIBOPENCM3_STM32_F3_NVIC_H"
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,7 @@
|
||||
|
||||
|
||||
/* APB2 */
|
||||
#define HRTIM_BASE (PERIPH_BASE_APB2 + 0x7400)
|
||||
#define TIM17_BASE (PERIPH_BASE_APB2 + 0x4800)
|
||||
#define TIM16_BASE (PERIPH_BASE_APB2 + 0x4400)
|
||||
#define TIM15_BASE (PERIPH_BASE_APB2 + 0x4000)
|
||||
|
27
include/libopencm3/stm32/hrtim.h
Normal file
27
include/libopencm3/stm32/hrtim.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* This provides unification of code over STM32 subfamilies */
|
||||
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/stm32/memorymap.h>
|
||||
|
||||
#if defined(STM32F3)
|
||||
# include <libopencm3/stm32/f3/hrtim.h>
|
||||
#else
|
||||
# error "HRTIM only defined for STM32F3"
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user