mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
AnnaBridge
Date:
Wed Jun 21 17:31:38 2017 +0100
Revision:
145:64910690c574
Parent:
128:9bcdf88f62b0
Release 145 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 86:04dd9b1680ae 1 /**
bogdanm 86:04dd9b1680ae 2 ******************************************************************************
bogdanm 86:04dd9b1680ae 3 * @file stm32f4xx_hal_tim_ex.h
bogdanm 86:04dd9b1680ae 4 * @author MCD Application Team
AnnaBridge 145:64910690c574 5 * @version V1.7.1
AnnaBridge 145:64910690c574 6 * @date 14-April-2017
bogdanm 86:04dd9b1680ae 7 * @brief Header file of TIM HAL Extension module.
bogdanm 86:04dd9b1680ae 8 ******************************************************************************
bogdanm 86:04dd9b1680ae 9 * @attention
bogdanm 86:04dd9b1680ae 10 *
AnnaBridge 145:64910690c574 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
bogdanm 86:04dd9b1680ae 12 *
bogdanm 86:04dd9b1680ae 13 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 86:04dd9b1680ae 14 * are permitted provided that the following conditions are met:
bogdanm 86:04dd9b1680ae 15 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 86:04dd9b1680ae 16 * this list of conditions and the following disclaimer.
bogdanm 86:04dd9b1680ae 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 86:04dd9b1680ae 18 * this list of conditions and the following disclaimer in the documentation
bogdanm 86:04dd9b1680ae 19 * and/or other materials provided with the distribution.
bogdanm 86:04dd9b1680ae 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 86:04dd9b1680ae 21 * may be used to endorse or promote products derived from this software
bogdanm 86:04dd9b1680ae 22 * without specific prior written permission.
bogdanm 86:04dd9b1680ae 23 *
bogdanm 86:04dd9b1680ae 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 86:04dd9b1680ae 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 86:04dd9b1680ae 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 86:04dd9b1680ae 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 86:04dd9b1680ae 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 86:04dd9b1680ae 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 86:04dd9b1680ae 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 86:04dd9b1680ae 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 86:04dd9b1680ae 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 86:04dd9b1680ae 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 86:04dd9b1680ae 34 *
bogdanm 86:04dd9b1680ae 35 ******************************************************************************
bogdanm 86:04dd9b1680ae 36 */
bogdanm 86:04dd9b1680ae 37
bogdanm 86:04dd9b1680ae 38 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 86:04dd9b1680ae 39 #ifndef __STM32F4xx_HAL_TIM_EX_H
bogdanm 86:04dd9b1680ae 40 #define __STM32F4xx_HAL_TIM_EX_H
bogdanm 86:04dd9b1680ae 41
bogdanm 86:04dd9b1680ae 42 #ifdef __cplusplus
bogdanm 86:04dd9b1680ae 43 extern "C" {
bogdanm 86:04dd9b1680ae 44 #endif
bogdanm 86:04dd9b1680ae 45
bogdanm 86:04dd9b1680ae 46 /* Includes ------------------------------------------------------------------*/
bogdanm 86:04dd9b1680ae 47 #include "stm32f4xx_hal_def.h"
bogdanm 86:04dd9b1680ae 48
Kojto 99:dbbf35b96557 49 /** @addtogroup STM32F4xx_HAL_Driver
bogdanm 86:04dd9b1680ae 50 * @{
bogdanm 86:04dd9b1680ae 51 */
bogdanm 86:04dd9b1680ae 52
bogdanm 86:04dd9b1680ae 53 /** @addtogroup TIMEx
bogdanm 86:04dd9b1680ae 54 * @{
bogdanm 86:04dd9b1680ae 55 */
bogdanm 86:04dd9b1680ae 56
bogdanm 86:04dd9b1680ae 57 /* Exported types ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 58 /** @defgroup TIMEx_Exported_Types TIM Exported Types
Kojto 99:dbbf35b96557 59 * @{
Kojto 99:dbbf35b96557 60 */
Kojto 99:dbbf35b96557 61
bogdanm 86:04dd9b1680ae 62 /**
bogdanm 86:04dd9b1680ae 63 * @brief TIM Hall sensor Configuration Structure definition
bogdanm 86:04dd9b1680ae 64 */
bogdanm 86:04dd9b1680ae 65
bogdanm 86:04dd9b1680ae 66 typedef struct
bogdanm 86:04dd9b1680ae 67 {
Kojto 122:f9eeca106725 68
bogdanm 86:04dd9b1680ae 69 uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
bogdanm 86:04dd9b1680ae 70 This parameter can be a value of @ref TIM_Input_Capture_Polarity */
Kojto 122:f9eeca106725 71
bogdanm 86:04dd9b1680ae 72 uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler.
bogdanm 86:04dd9b1680ae 73 This parameter can be a value of @ref TIM_Input_Capture_Prescaler */
Kojto 122:f9eeca106725 74
bogdanm 86:04dd9b1680ae 75 uint32_t IC1Filter; /*!< Specifies the input capture filter.
Kojto 122:f9eeca106725 76 This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
Kojto 122:f9eeca106725 77
bogdanm 86:04dd9b1680ae 78 uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
Kojto 122:f9eeca106725 79 This parameter can be a number between Min_Data = 0x0000U and Max_Data = 0xFFFFU */
bogdanm 86:04dd9b1680ae 80 } TIM_HallSensor_InitTypeDef;
bogdanm 86:04dd9b1680ae 81
bogdanm 86:04dd9b1680ae 82 /**
bogdanm 86:04dd9b1680ae 83 * @brief TIM Master configuration Structure definition
bogdanm 86:04dd9b1680ae 84 */
bogdanm 86:04dd9b1680ae 85 typedef struct {
bogdanm 86:04dd9b1680ae 86 uint32_t MasterOutputTrigger; /*!< Trigger output (TRGO) selection.
Kojto 122:f9eeca106725 87 This parameter can be a value of @ref TIM_Master_Mode_Selection */
Kojto 122:f9eeca106725 88
bogdanm 86:04dd9b1680ae 89 uint32_t MasterSlaveMode; /*!< Master/slave mode selection.
bogdanm 86:04dd9b1680ae 90 This parameter can be a value of @ref TIM_Master_Slave_Mode */
bogdanm 86:04dd9b1680ae 91 }TIM_MasterConfigTypeDef;
bogdanm 86:04dd9b1680ae 92
bogdanm 86:04dd9b1680ae 93 /**
bogdanm 86:04dd9b1680ae 94 * @brief TIM Break and Dead time configuration Structure definition
bogdanm 86:04dd9b1680ae 95 */
bogdanm 86:04dd9b1680ae 96 typedef struct
bogdanm 86:04dd9b1680ae 97 {
Kojto 99:dbbf35b96557 98 uint32_t OffStateRunMode; /*!< TIM off state in run mode.
bogdanm 86:04dd9b1680ae 99 This parameter can be a value of @ref TIM_OSSR_Off_State_Selection_for_Run_mode_state */
Kojto 99:dbbf35b96557 100 uint32_t OffStateIDLEMode; /*!< TIM off state in IDLE mode.
bogdanm 86:04dd9b1680ae 101 This parameter can be a value of @ref TIM_OSSI_Off_State_Selection_for_Idle_mode_state */
Kojto 99:dbbf35b96557 102 uint32_t LockLevel; /*!< TIM Lock level.
bogdanm 86:04dd9b1680ae 103 This parameter can be a value of @ref TIM_Lock_level */
Kojto 99:dbbf35b96557 104 uint32_t DeadTime; /*!< TIM dead Time.
bogdanm 86:04dd9b1680ae 105 This parameter can be a number between Min_Data = 0x00 and Max_Data = 0xFF */
Kojto 99:dbbf35b96557 106 uint32_t BreakState; /*!< TIM Break State.
bogdanm 86:04dd9b1680ae 107 This parameter can be a value of @ref TIM_Break_Input_enable_disable */
Kojto 99:dbbf35b96557 108 uint32_t BreakPolarity; /*!< TIM Break input polarity.
bogdanm 86:04dd9b1680ae 109 This parameter can be a value of @ref TIM_Break_Polarity */
Kojto 99:dbbf35b96557 110 uint32_t AutomaticOutput; /*!< TIM Automatic Output Enable state.
bogdanm 86:04dd9b1680ae 111 This parameter can be a value of @ref TIM_AOE_Bit_Set_Reset */
bogdanm 86:04dd9b1680ae 112 }TIM_BreakDeadTimeConfigTypeDef;
Kojto 99:dbbf35b96557 113 /**
Kojto 99:dbbf35b96557 114 * @}
Kojto 99:dbbf35b96557 115 */
Kojto 99:dbbf35b96557 116
bogdanm 86:04dd9b1680ae 117 /* Exported constants --------------------------------------------------------*/
Kojto 99:dbbf35b96557 118 /** @defgroup TIMEx_Exported_Constants TIM Exported Constants
bogdanm 86:04dd9b1680ae 119 * @{
bogdanm 86:04dd9b1680ae 120 */
bogdanm 86:04dd9b1680ae 121
Kojto 99:dbbf35b96557 122 /** @defgroup TIMEx_Remap TIM Remap
bogdanm 86:04dd9b1680ae 123 * @{
bogdanm 86:04dd9b1680ae 124 */
AnnaBridge 145:64910690c574 125 #define TIM_TIM2_TIM8_TRGO 0x00000000U
AnnaBridge 145:64910690c574 126 #define TIM_TIM2_ETH_PTP 0x00000400U
AnnaBridge 145:64910690c574 127 #define TIM_TIM2_USBFS_SOF 0x00000800U
AnnaBridge 145:64910690c574 128 #define TIM_TIM2_USBHS_SOF 0x00000C00U
AnnaBridge 145:64910690c574 129 #define TIM_TIM5_GPIO 0x00000000U
AnnaBridge 145:64910690c574 130 #define TIM_TIM5_LSI 0x00000040U
AnnaBridge 145:64910690c574 131 #define TIM_TIM5_LSE 0x00000080U
AnnaBridge 145:64910690c574 132 #define TIM_TIM5_RTC 0x000000C0U
AnnaBridge 145:64910690c574 133 #define TIM_TIM11_GPIO 0x00000000U
AnnaBridge 145:64910690c574 134 #define TIM_TIM11_HSE 0x00000002U
AnnaBridge 145:64910690c574 135
AnnaBridge 145:64910690c574 136 #if defined(STM32F413xx) || defined(STM32F423xx)
AnnaBridge 145:64910690c574 137 #define TIM_TIM9_TIM3_TRGO 0x10000000U
AnnaBridge 145:64910690c574 138 #define TIM_TIM9_LPTIM 0x10000010U
AnnaBridge 145:64910690c574 139 #define TIM_TIM5_TIM3_TRGO 0x10000000U
AnnaBridge 145:64910690c574 140 #define TIM_TIM5_LPTIM 0x10000008U
AnnaBridge 145:64910690c574 141 #define TIM_TIM1_TIM3_TRGO 0x10000000U
AnnaBridge 145:64910690c574 142 #define TIM_TIM1_LPTIM 0x10000004U
AnnaBridge 145:64910690c574 143 #endif /* STM32F413xx | STM32F423xx */
bogdanm 86:04dd9b1680ae 144
Kojto 99:dbbf35b96557 145 #if defined (STM32F446xx)
AnnaBridge 145:64910690c574 146 #define TIM_TIM11_SPDIFRX 0x00000001U
Kojto 99:dbbf35b96557 147 #endif /* STM32F446xx */
Kojto 99:dbbf35b96557 148 /**
Kojto 99:dbbf35b96557 149 * @}
Kojto 110:165afa46840b 150 */
Kojto 110:165afa46840b 151
AnnaBridge 145:64910690c574 152 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F413xx) || defined(STM32F423xx)
Kojto 110:165afa46840b 153 /** @defgroup TIMEx_SystemBreakInput TIM System Break Input
Kojto 110:165afa46840b 154 * @{
Kojto 110:165afa46840b 155 */
AnnaBridge 145:64910690c574 156 #define TIM_SYSTEMBREAKINPUT_HARDFAULT 0x00000001U /* Core Lockup lock output(Hardfault) is connected to Break Input of TIM1 and TIM8 */
AnnaBridge 145:64910690c574 157 #define TIM_SYSTEMBREAKINPUT_PVD 0x00000004U /* PVD Interrupt is connected to Break Input of TIM1 and TIM8 */
AnnaBridge 145:64910690c574 158 #define TIM_SYSTEMBREAKINPUT_HARDFAULT_PVD 0x00000005U /* Core Lockup lock output(Hardfault) and PVD Interrupt are connected to Break Input of TIM1 and TIM8 */
Kojto 110:165afa46840b 159 /**
Kojto 110:165afa46840b 160 * @}
Kojto 110:165afa46840b 161 */
AnnaBridge 145:64910690c574 162 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx || STM32F413xx || STM32F423xx */
Kojto 110:165afa46840b 163
bogdanm 86:04dd9b1680ae 164 /**
bogdanm 86:04dd9b1680ae 165 * @}
bogdanm 86:04dd9b1680ae 166 */
Kojto 99:dbbf35b96557 167 /* Exported macro ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 168 /* Exported functions --------------------------------------------------------*/
Kojto 99:dbbf35b96557 169 /** @addtogroup TIMEx_Exported_Functions
Kojto 99:dbbf35b96557 170 * @{
Kojto 99:dbbf35b96557 171 */
bogdanm 86:04dd9b1680ae 172
Kojto 99:dbbf35b96557 173 /** @addtogroup TIMEx_Exported_Functions_Group1
Kojto 99:dbbf35b96557 174 * @{
Kojto 99:dbbf35b96557 175 */
bogdanm 86:04dd9b1680ae 176 /* Timer Hall Sensor functions **********************************************/
bogdanm 86:04dd9b1680ae 177 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef* htim, TIM_HallSensor_InitTypeDef* sConfig);
bogdanm 86:04dd9b1680ae 178 HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 179
bogdanm 86:04dd9b1680ae 180 void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 181 void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 182
bogdanm 86:04dd9b1680ae 183 /* Blocking mode: Polling */
bogdanm 86:04dd9b1680ae 184 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 185 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 186 /* Non-Blocking mode: Interrupt */
bogdanm 86:04dd9b1680ae 187 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 188 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 189 /* Non-Blocking mode: DMA */
bogdanm 86:04dd9b1680ae 190 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef* htim, uint32_t *pData, uint16_t Length);
bogdanm 86:04dd9b1680ae 191 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef* htim);
Kojto 99:dbbf35b96557 192 /**
Kojto 99:dbbf35b96557 193 * @}
Kojto 99:dbbf35b96557 194 */
bogdanm 86:04dd9b1680ae 195
Kojto 99:dbbf35b96557 196 /** @addtogroup TIMEx_Exported_Functions_Group2
Kojto 99:dbbf35b96557 197 * @{
Kojto 99:dbbf35b96557 198 */
bogdanm 86:04dd9b1680ae 199 /* Timer Complementary Output Compare functions *****************************/
bogdanm 86:04dd9b1680ae 200 /* Blocking mode: Polling */
bogdanm 86:04dd9b1680ae 201 HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 202 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 203
bogdanm 86:04dd9b1680ae 204 /* Non-Blocking mode: Interrupt */
bogdanm 86:04dd9b1680ae 205 HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 206 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 207
bogdanm 86:04dd9b1680ae 208 /* Non-Blocking mode: DMA */
bogdanm 86:04dd9b1680ae 209 HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
bogdanm 86:04dd9b1680ae 210 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 99:dbbf35b96557 211 /**
Kojto 99:dbbf35b96557 212 * @}
Kojto 99:dbbf35b96557 213 */
bogdanm 86:04dd9b1680ae 214
Kojto 99:dbbf35b96557 215 /** @addtogroup TIMEx_Exported_Functions_Group3
Kojto 99:dbbf35b96557 216 * @{
Kojto 99:dbbf35b96557 217 */
bogdanm 86:04dd9b1680ae 218 /* Timer Complementary PWM functions ****************************************/
bogdanm 86:04dd9b1680ae 219 /* Blocking mode: Polling */
bogdanm 86:04dd9b1680ae 220 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 221 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 222
bogdanm 86:04dd9b1680ae 223 /* Non-Blocking mode: Interrupt */
bogdanm 86:04dd9b1680ae 224 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 225 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
bogdanm 86:04dd9b1680ae 226 /* Non-Blocking mode: DMA */
bogdanm 86:04dd9b1680ae 227 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
bogdanm 86:04dd9b1680ae 228 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 99:dbbf35b96557 229 /**
Kojto 99:dbbf35b96557 230 * @}
Kojto 99:dbbf35b96557 231 */
bogdanm 86:04dd9b1680ae 232
Kojto 99:dbbf35b96557 233 /** @addtogroup TIMEx_Exported_Functions_Group4
Kojto 99:dbbf35b96557 234 * @{
Kojto 99:dbbf35b96557 235 */
bogdanm 86:04dd9b1680ae 236 /* Timer Complementary One Pulse functions **********************************/
bogdanm 86:04dd9b1680ae 237 /* Blocking mode: Polling */
bogdanm 86:04dd9b1680ae 238 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
bogdanm 86:04dd9b1680ae 239 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
bogdanm 86:04dd9b1680ae 240
bogdanm 86:04dd9b1680ae 241 /* Non-Blocking mode: Interrupt */
bogdanm 86:04dd9b1680ae 242 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
bogdanm 86:04dd9b1680ae 243 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
Kojto 99:dbbf35b96557 244 /**
Kojto 99:dbbf35b96557 245 * @}
Kojto 99:dbbf35b96557 246 */
bogdanm 86:04dd9b1680ae 247
Kojto 99:dbbf35b96557 248 /** @addtogroup TIMEx_Exported_Functions_Group5
Kojto 99:dbbf35b96557 249 * @{
Kojto 99:dbbf35b96557 250 */
Kojto 99:dbbf35b96557 251 /* Extension Control functions ************************************************/
bogdanm 86:04dd9b1680ae 252 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
bogdanm 86:04dd9b1680ae 253 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_IT(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
bogdanm 86:04dd9b1680ae 254 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_DMA(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
bogdanm 86:04dd9b1680ae 255 HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef* htim, TIM_MasterConfigTypeDef * sMasterConfig);
bogdanm 86:04dd9b1680ae 256 HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef* htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
bogdanm 86:04dd9b1680ae 257 HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef* htim, uint32_t Remap);
Kojto 99:dbbf35b96557 258 /**
Kojto 99:dbbf35b96557 259 * @}
Kojto 99:dbbf35b96557 260 */
bogdanm 86:04dd9b1680ae 261
Kojto 99:dbbf35b96557 262 /** @addtogroup TIMEx_Exported_Functions_Group6
Kojto 99:dbbf35b96557 263 * @{
Kojto 99:dbbf35b96557 264 */
bogdanm 86:04dd9b1680ae 265 /* Extension Callback *********************************************************/
bogdanm 86:04dd9b1680ae 266 void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef* htim);
bogdanm 86:04dd9b1680ae 267 void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef* htim);
Kojto 99:dbbf35b96557 268 void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
Kojto 99:dbbf35b96557 269 /**
Kojto 99:dbbf35b96557 270 * @}
Kojto 99:dbbf35b96557 271 */
bogdanm 86:04dd9b1680ae 272
Kojto 99:dbbf35b96557 273 /** @addtogroup TIMEx_Exported_Functions_Group7
Kojto 99:dbbf35b96557 274 * @{
Kojto 99:dbbf35b96557 275 */
bogdanm 86:04dd9b1680ae 276 /* Extension Peripheral State functions **************************************/
bogdanm 86:04dd9b1680ae 277 HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef* htim);
Kojto 99:dbbf35b96557 278 /**
Kojto 99:dbbf35b96557 279 * @}
Kojto 99:dbbf35b96557 280 */
Kojto 99:dbbf35b96557 281
Kojto 99:dbbf35b96557 282 /**
Kojto 99:dbbf35b96557 283 * @}
Kojto 99:dbbf35b96557 284 */
Kojto 99:dbbf35b96557 285
Kojto 99:dbbf35b96557 286 /* Private types -------------------------------------------------------------*/
Kojto 99:dbbf35b96557 287 /* Private variables ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 288 /* Private constants ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 289 /* Private macros ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 290 /** @defgroup TIMEx_Private_Macros TIM Private Macros
Kojto 99:dbbf35b96557 291 * @{
Kojto 99:dbbf35b96557 292 */
Kojto 99:dbbf35b96557 293 #if defined (STM32F446xx)
Kojto 99:dbbf35b96557 294 #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\
Kojto 99:dbbf35b96557 295 ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\
Kojto 99:dbbf35b96557 296 ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\
Kojto 99:dbbf35b96557 297 ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\
Kojto 99:dbbf35b96557 298 ((TIM_REMAP) == TIM_TIM5_GPIO)||\
Kojto 99:dbbf35b96557 299 ((TIM_REMAP) == TIM_TIM5_LSI)||\
Kojto 99:dbbf35b96557 300 ((TIM_REMAP) == TIM_TIM5_LSE)||\
Kojto 99:dbbf35b96557 301 ((TIM_REMAP) == TIM_TIM5_RTC)||\
Kojto 99:dbbf35b96557 302 ((TIM_REMAP) == TIM_TIM11_GPIO)||\
Kojto 99:dbbf35b96557 303 ((TIM_REMAP) == TIM_TIM11_SPDIFRX)||\
Kojto 99:dbbf35b96557 304 ((TIM_REMAP) == TIM_TIM11_HSE))
AnnaBridge 145:64910690c574 305 #elif defined(STM32F413xx) || defined(STM32F423xx)
AnnaBridge 145:64910690c574 306 #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\
AnnaBridge 145:64910690c574 307 ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\
AnnaBridge 145:64910690c574 308 ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\
AnnaBridge 145:64910690c574 309 ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\
AnnaBridge 145:64910690c574 310 ((TIM_REMAP) == TIM_TIM5_GPIO)||\
AnnaBridge 145:64910690c574 311 ((TIM_REMAP) == TIM_TIM5_LSI)||\
AnnaBridge 145:64910690c574 312 ((TIM_REMAP) == TIM_TIM5_LSE)||\
AnnaBridge 145:64910690c574 313 ((TIM_REMAP) == TIM_TIM5_RTC)||\
AnnaBridge 145:64910690c574 314 ((TIM_REMAP) == TIM_TIM11_GPIO)||\
AnnaBridge 145:64910690c574 315 ((TIM_REMAP) == TIM_TIM11_HSE)||\
AnnaBridge 145:64910690c574 316 ((TIM_REMAP) == TIM_TIM9_TIM3_TRGO)||\
AnnaBridge 145:64910690c574 317 ((TIM_REMAP) == TIM_TIM9_LPTIM)||\
AnnaBridge 145:64910690c574 318 ((TIM_REMAP) == TIM_TIM5_TIM3_TRGO)||\
AnnaBridge 145:64910690c574 319 ((TIM_REMAP) == TIM_TIM5_LPTIM)||\
AnnaBridge 145:64910690c574 320 ((TIM_REMAP) == TIM_TIM1_TIM3_TRGO)||\
AnnaBridge 145:64910690c574 321 ((TIM_REMAP) == TIM_TIM1_LPTIM))
Kojto 99:dbbf35b96557 322 #else
Kojto 99:dbbf35b96557 323 #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\
Kojto 99:dbbf35b96557 324 ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\
Kojto 99:dbbf35b96557 325 ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\
Kojto 99:dbbf35b96557 326 ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\
Kojto 99:dbbf35b96557 327 ((TIM_REMAP) == TIM_TIM5_GPIO)||\
Kojto 99:dbbf35b96557 328 ((TIM_REMAP) == TIM_TIM5_LSI)||\
Kojto 99:dbbf35b96557 329 ((TIM_REMAP) == TIM_TIM5_LSE)||\
Kojto 99:dbbf35b96557 330 ((TIM_REMAP) == TIM_TIM5_RTC)||\
Kojto 99:dbbf35b96557 331 ((TIM_REMAP) == TIM_TIM11_GPIO)||\
Kojto 99:dbbf35b96557 332 ((TIM_REMAP) == TIM_TIM11_HSE))
Kojto 122:f9eeca106725 333 #endif /* STM32F446xx */
Kojto 99:dbbf35b96557 334
AnnaBridge 145:64910690c574 335 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F413xx) || defined(STM32F423xx)
Kojto 110:165afa46840b 336 #define IS_TIM_SYSTEMBREAKINPUT(BREAKINPUT) (((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_HARDFAULT)||\
Kojto 110:165afa46840b 337 ((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_PVD)||\
Kojto 110:165afa46840b 338 ((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_HARDFAULT_PVD))
Kojto 110:165afa46840b 339
AnnaBridge 145:64910690c574 340 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx || STM32F413xx || STM32F423xx */
Kojto 99:dbbf35b96557 341
Kojto 122:f9eeca106725 342 #define IS_TIM_DEADTIME(DEADTIME) ((DEADTIME) <= 0xFFU)
Kojto 99:dbbf35b96557 343 /**
Kojto 99:dbbf35b96557 344 * @}
Kojto 99:dbbf35b96557 345 */
Kojto 99:dbbf35b96557 346
Kojto 99:dbbf35b96557 347 /* Private functions ---------------------------------------------------------*/
Kojto 99:dbbf35b96557 348 /** @defgroup TIMEx_Private_Functions TIM Private Functions
Kojto 99:dbbf35b96557 349 * @{
Kojto 99:dbbf35b96557 350 */
Kojto 99:dbbf35b96557 351
Kojto 99:dbbf35b96557 352 /**
Kojto 99:dbbf35b96557 353 * @}
Kojto 99:dbbf35b96557 354 */
bogdanm 86:04dd9b1680ae 355
bogdanm 86:04dd9b1680ae 356 /**
bogdanm 86:04dd9b1680ae 357 * @}
bogdanm 86:04dd9b1680ae 358 */
bogdanm 86:04dd9b1680ae 359
bogdanm 86:04dd9b1680ae 360 /**
bogdanm 86:04dd9b1680ae 361 * @}
Kojto 99:dbbf35b96557 362 */
Kojto 99:dbbf35b96557 363
bogdanm 86:04dd9b1680ae 364 #ifdef __cplusplus
bogdanm 86:04dd9b1680ae 365 }
bogdanm 86:04dd9b1680ae 366 #endif
bogdanm 86:04dd9b1680ae 367
bogdanm 86:04dd9b1680ae 368 #endif /* __STM32F4xx_HAL_TIM_EX_H */
bogdanm 86:04dd9b1680ae 369
bogdanm 86:04dd9b1680ae 370 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/