mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Tue Mar 20 16:56:18 2018 +0000
Revision:
182:a56a73fd2a6f
Parent:
161:2cc1468da177
mbed-dev library. Release version 160

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 161:2cc1468da177 1 /**
<> 161:2cc1468da177 2 ******************************************************************************
<> 161:2cc1468da177 3 * @file stm32f7xx_ll_tim.h
<> 161:2cc1468da177 4 * @author MCD Application Team
<> 161:2cc1468da177 5 * @brief Header file of TIM LL module.
<> 161:2cc1468da177 6 ******************************************************************************
<> 161:2cc1468da177 7 * @attention
<> 161:2cc1468da177 8 *
<> 161:2cc1468da177 9 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 161:2cc1468da177 10 *
<> 161:2cc1468da177 11 * Redistribution and use in source and binary forms, with or without modification,
<> 161:2cc1468da177 12 * are permitted provided that the following conditions are met:
<> 161:2cc1468da177 13 * 1. Redistributions of source code must retain the above copyright notice,
<> 161:2cc1468da177 14 * this list of conditions and the following disclaimer.
<> 161:2cc1468da177 15 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 161:2cc1468da177 16 * this list of conditions and the following disclaimer in the documentation
<> 161:2cc1468da177 17 * and/or other materials provided with the distribution.
<> 161:2cc1468da177 18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 161:2cc1468da177 19 * may be used to endorse or promote products derived from this software
<> 161:2cc1468da177 20 * without specific prior written permission.
<> 161:2cc1468da177 21 *
<> 161:2cc1468da177 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 161:2cc1468da177 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 161:2cc1468da177 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 161:2cc1468da177 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 161:2cc1468da177 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 161:2cc1468da177 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 161:2cc1468da177 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 161:2cc1468da177 29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 161:2cc1468da177 30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 161:2cc1468da177 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 161:2cc1468da177 32 *
<> 161:2cc1468da177 33 ******************************************************************************
<> 161:2cc1468da177 34 */
<> 161:2cc1468da177 35
<> 161:2cc1468da177 36 /* Define to prevent recursive inclusion -------------------------------------*/
<> 161:2cc1468da177 37 #ifndef __STM32F7xx_LL_TIM_H
<> 161:2cc1468da177 38 #define __STM32F7xx_LL_TIM_H
<> 161:2cc1468da177 39
<> 161:2cc1468da177 40 #ifdef __cplusplus
<> 161:2cc1468da177 41 extern "C" {
<> 161:2cc1468da177 42 #endif
<> 161:2cc1468da177 43
<> 161:2cc1468da177 44 /* Includes ------------------------------------------------------------------*/
<> 161:2cc1468da177 45 #include "stm32f7xx.h"
<> 161:2cc1468da177 46
<> 161:2cc1468da177 47 /** @addtogroup STM32F7xx_LL_Driver
<> 161:2cc1468da177 48 * @{
<> 161:2cc1468da177 49 */
<> 161:2cc1468da177 50
<> 161:2cc1468da177 51 #if defined (TIM1) || defined (TIM8) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM9) || defined (TIM10) || defined (TIM11) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM6) || defined (TIM7)
<> 161:2cc1468da177 52
<> 161:2cc1468da177 53 /** @defgroup TIM_LL TIM
<> 161:2cc1468da177 54 * @{
<> 161:2cc1468da177 55 */
<> 161:2cc1468da177 56
<> 161:2cc1468da177 57 /* Private types -------------------------------------------------------------*/
<> 161:2cc1468da177 58 /* Private variables ---------------------------------------------------------*/
<> 161:2cc1468da177 59 /** @defgroup TIM_LL_Private_Variables TIM Private Variables
<> 161:2cc1468da177 60 * @{
<> 161:2cc1468da177 61 */
<> 161:2cc1468da177 62 static const uint8_t OFFSET_TAB_CCMRx[] =
<> 161:2cc1468da177 63 {
<> 161:2cc1468da177 64 0x00U, /* 0: TIMx_CH1 */
<> 161:2cc1468da177 65 0x00U, /* 1: TIMx_CH1N */
<> 161:2cc1468da177 66 0x00U, /* 2: TIMx_CH2 */
<> 161:2cc1468da177 67 0x00U, /* 3: TIMx_CH2N */
<> 161:2cc1468da177 68 0x04U, /* 4: TIMx_CH3 */
<> 161:2cc1468da177 69 0x04U, /* 5: TIMx_CH3N */
<> 161:2cc1468da177 70 0x04U, /* 6: TIMx_CH4 */
<> 161:2cc1468da177 71 0x3CU, /* 7: TIMx_CH5 */
<> 161:2cc1468da177 72 0x3CU /* 8: TIMx_CH6 */
<> 161:2cc1468da177 73 };
<> 161:2cc1468da177 74
<> 161:2cc1468da177 75 static const uint8_t SHIFT_TAB_OCxx[] =
<> 161:2cc1468da177 76 {
<> 161:2cc1468da177 77 0U, /* 0: OC1M, OC1FE, OC1PE */
<> 161:2cc1468da177 78 0U, /* 1: - NA */
<> 161:2cc1468da177 79 8U, /* 2: OC2M, OC2FE, OC2PE */
<> 161:2cc1468da177 80 0U, /* 3: - NA */
<> 161:2cc1468da177 81 0U, /* 4: OC3M, OC3FE, OC3PE */
<> 161:2cc1468da177 82 0U, /* 5: - NA */
<> 161:2cc1468da177 83 8U, /* 6: OC4M, OC4FE, OC4PE */
<> 161:2cc1468da177 84 0U, /* 7: OC5M, OC5FE, OC5PE */
<> 161:2cc1468da177 85 8U /* 8: OC6M, OC6FE, OC6PE */
<> 161:2cc1468da177 86 };
<> 161:2cc1468da177 87
<> 161:2cc1468da177 88 static const uint8_t SHIFT_TAB_ICxx[] =
<> 161:2cc1468da177 89 {
<> 161:2cc1468da177 90 0U, /* 0: CC1S, IC1PSC, IC1F */
<> 161:2cc1468da177 91 0U, /* 1: - NA */
<> 161:2cc1468da177 92 8U, /* 2: CC2S, IC2PSC, IC2F */
<> 161:2cc1468da177 93 0U, /* 3: - NA */
<> 161:2cc1468da177 94 0U, /* 4: CC3S, IC3PSC, IC3F */
<> 161:2cc1468da177 95 0U, /* 5: - NA */
<> 161:2cc1468da177 96 8U, /* 6: CC4S, IC4PSC, IC4F */
<> 161:2cc1468da177 97 0U, /* 7: - NA */
<> 161:2cc1468da177 98 0U /* 8: - NA */
<> 161:2cc1468da177 99 };
<> 161:2cc1468da177 100
<> 161:2cc1468da177 101 static const uint8_t SHIFT_TAB_CCxP[] =
<> 161:2cc1468da177 102 {
<> 161:2cc1468da177 103 0U, /* 0: CC1P */
<> 161:2cc1468da177 104 2U, /* 1: CC1NP */
<> 161:2cc1468da177 105 4U, /* 2: CC2P */
<> 161:2cc1468da177 106 6U, /* 3: CC2NP */
<> 161:2cc1468da177 107 8U, /* 4: CC3P */
<> 161:2cc1468da177 108 10U, /* 5: CC3NP */
<> 161:2cc1468da177 109 12U, /* 6: CC4P */
<> 161:2cc1468da177 110 16U, /* 7: CC5P */
<> 161:2cc1468da177 111 20U /* 8: CC6P */
<> 161:2cc1468da177 112 };
<> 161:2cc1468da177 113
<> 161:2cc1468da177 114 static const uint8_t SHIFT_TAB_OISx[] =
<> 161:2cc1468da177 115 {
<> 161:2cc1468da177 116 0U, /* 0: OIS1 */
<> 161:2cc1468da177 117 1U, /* 1: OIS1N */
<> 161:2cc1468da177 118 2U, /* 2: OIS2 */
<> 161:2cc1468da177 119 3U, /* 3: OIS2N */
<> 161:2cc1468da177 120 4U, /* 4: OIS3 */
<> 161:2cc1468da177 121 5U, /* 5: OIS3N */
<> 161:2cc1468da177 122 6U, /* 6: OIS4 */
<> 161:2cc1468da177 123 8U, /* 7: OIS5 */
<> 161:2cc1468da177 124 10U /* 8: OIS6 */
<> 161:2cc1468da177 125 };
<> 161:2cc1468da177 126 /**
<> 161:2cc1468da177 127 * @}
<> 161:2cc1468da177 128 */
<> 161:2cc1468da177 129
<> 161:2cc1468da177 130
<> 161:2cc1468da177 131 /* Private constants ---------------------------------------------------------*/
<> 161:2cc1468da177 132 /** @defgroup TIM_LL_Private_Constants TIM Private Constants
<> 161:2cc1468da177 133 * @{
<> 161:2cc1468da177 134 */
<> 161:2cc1468da177 135
<> 161:2cc1468da177 136 #if defined(TIM_BREAK_INPUT_SUPPORT)
<> 161:2cc1468da177 137 /* Defines used for the bit position in the register and perform offsets */
<> 161:2cc1468da177 138 #define TIM_POSITION_BRK_SOURCE POSITION_VAL(Source)
<> 161:2cc1468da177 139
<> 161:2cc1468da177 140 /* Generic bit definitions for TIMx_AF1 register */
<> 161:2cc1468da177 141 #define TIMx_AF1_BKINE TIM1_AF1_BKINE /*!< BRK BKINE input enable */
<> 161:2cc1468da177 142 #if defined(DFSDM1_Channel0)
<> 161:2cc1468da177 143 #define TIMx_AF1_BKDFBKE TIM1_AF1_BKDFBKE /*!< BRK DFSDM1_BREAK[0] enable */
<> 161:2cc1468da177 144 #endif /* DFSDM1_Channel0 */
<> 161:2cc1468da177 145 #define TIMx_AF1_BKINP TIM1_AF1_BKINP /*!< BRK BKIN input polarity */
<> 161:2cc1468da177 146 /* Generic bit definitions for TIMx_AF2 register */
<> 161:2cc1468da177 147 #define TIMx_AF2_BK2INE TIM1_AF2_BK2INE /*!< BRK B2KINE input enable */
<> 161:2cc1468da177 148 #if defined(DFSDM1_Channel0)
<> 161:2cc1468da177 149 #define TIMx_AF2_BK2DFBKE TIM1_AF2_BK2DFBKE /*!< BRK DFSDM_BREAK[0] enable */
<> 161:2cc1468da177 150 #endif /* DFSDM1_Channel0 */
<> 161:2cc1468da177 151 #define TIMx_AF2_BK2INP TIM1_AF2_BK2INP /*!< BRK BK2IN input polarity */
<> 161:2cc1468da177 152 #endif /* TIM_BREAK_INPUT_SUPPORT */
<> 161:2cc1468da177 153
<> 161:2cc1468da177 154 /* Remap mask definitions */
<> 161:2cc1468da177 155 #define TIMx_OR_RMP_SHIFT 16U
<> 161:2cc1468da177 156 #define TIMx_OR_RMP_MASK 0x0000FFFFU
<> 161:2cc1468da177 157 #define TIM2_OR_RMP_MASK (TIM2_OR_ITR1_RMP << TIMx_OR_RMP_SHIFT)
<> 161:2cc1468da177 158 #define TIM5_OR_RMP_MASK (TIM5_OR_TI4_RMP << TIMx_OR_RMP_SHIFT)
<> 161:2cc1468da177 159 #define TIM11_OR_RMP_MASK (TIM11_OR_TI1_RMP << TIMx_OR_RMP_SHIFT)
<> 161:2cc1468da177 160
<> 161:2cc1468da177 161 /* Mask used to set the TDG[x:0] of the DTG bits of the TIMx_BDTR register */
<> 161:2cc1468da177 162 #define DT_DELAY_1 ((uint8_t)0x7FU)
<> 161:2cc1468da177 163 #define DT_DELAY_2 ((uint8_t)0x3FU)
<> 161:2cc1468da177 164 #define DT_DELAY_3 ((uint8_t)0x1FU)
<> 161:2cc1468da177 165 #define DT_DELAY_4 ((uint8_t)0x1FU)
<> 161:2cc1468da177 166
<> 161:2cc1468da177 167 /* Mask used to set the DTG[7:5] bits of the DTG bits of the TIMx_BDTR register */
<> 161:2cc1468da177 168 #define DT_RANGE_1 ((uint8_t)0x00U)
<> 161:2cc1468da177 169 #define DT_RANGE_2 ((uint8_t)0x80U)
<> 161:2cc1468da177 170 #define DT_RANGE_3 ((uint8_t)0xC0U)
<> 161:2cc1468da177 171 #define DT_RANGE_4 ((uint8_t)0xE0U)
<> 161:2cc1468da177 172
<> 161:2cc1468da177 173
<> 161:2cc1468da177 174 /**
<> 161:2cc1468da177 175 * @}
<> 161:2cc1468da177 176 */
<> 161:2cc1468da177 177
<> 161:2cc1468da177 178 /* Private macros ------------------------------------------------------------*/
<> 161:2cc1468da177 179 /** @defgroup TIM_LL_Private_Macros TIM Private Macros
<> 161:2cc1468da177 180 * @{
<> 161:2cc1468da177 181 */
<> 161:2cc1468da177 182 /** @brief Convert channel id into channel index.
<> 161:2cc1468da177 183 * @param __CHANNEL__ This parameter can be one of the following values:
<> 161:2cc1468da177 184 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 185 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 186 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 187 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 188 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 189 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 190 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 191 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 192 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 193 * @retval none
<> 161:2cc1468da177 194 */
<> 161:2cc1468da177 195 #define TIM_GET_CHANNEL_INDEX( __CHANNEL__) \
<> 161:2cc1468da177 196 (((__CHANNEL__) == LL_TIM_CHANNEL_CH1) ? 0U :\
<> 161:2cc1468da177 197 ((__CHANNEL__) == LL_TIM_CHANNEL_CH1N) ? 1U :\
<> 161:2cc1468da177 198 ((__CHANNEL__) == LL_TIM_CHANNEL_CH2) ? 2U :\
<> 161:2cc1468da177 199 ((__CHANNEL__) == LL_TIM_CHANNEL_CH2N) ? 3U :\
<> 161:2cc1468da177 200 ((__CHANNEL__) == LL_TIM_CHANNEL_CH3) ? 4U :\
<> 161:2cc1468da177 201 ((__CHANNEL__) == LL_TIM_CHANNEL_CH3N) ? 5U :\
<> 161:2cc1468da177 202 ((__CHANNEL__) == LL_TIM_CHANNEL_CH4) ? 6U :\
<> 161:2cc1468da177 203 ((__CHANNEL__) == LL_TIM_CHANNEL_CH5) ? 7U : 8U)
<> 161:2cc1468da177 204
<> 161:2cc1468da177 205 /** @brief Calculate the deadtime sampling period(in ps).
<> 161:2cc1468da177 206 * @param __TIMCLK__ timer input clock frequency (in Hz).
<> 161:2cc1468da177 207 * @param __CKD__ This parameter can be one of the following values:
<> 161:2cc1468da177 208 * @arg @ref LL_TIM_CLOCKDIVISION_DIV1
<> 161:2cc1468da177 209 * @arg @ref LL_TIM_CLOCKDIVISION_DIV2
<> 161:2cc1468da177 210 * @arg @ref LL_TIM_CLOCKDIVISION_DIV4
<> 161:2cc1468da177 211 * @retval none
<> 161:2cc1468da177 212 */
<> 161:2cc1468da177 213 #define TIM_CALC_DTS(__TIMCLK__, __CKD__) \
<> 161:2cc1468da177 214 (((__CKD__) == LL_TIM_CLOCKDIVISION_DIV1) ? ((uint64_t)1000000000000U/(__TIMCLK__)) : \
<> 161:2cc1468da177 215 ((__CKD__) == LL_TIM_CLOCKDIVISION_DIV2) ? ((uint64_t)1000000000000U/((__TIMCLK__) >> 1U)) : \
<> 161:2cc1468da177 216 ((uint64_t)1000000000000U/((__TIMCLK__) >> 2U)))
<> 161:2cc1468da177 217 /**
<> 161:2cc1468da177 218 * @}
<> 161:2cc1468da177 219 */
<> 161:2cc1468da177 220
<> 161:2cc1468da177 221
<> 161:2cc1468da177 222 /* Exported types ------------------------------------------------------------*/
<> 161:2cc1468da177 223 #if defined(USE_FULL_LL_DRIVER)
<> 161:2cc1468da177 224 /** @defgroup TIM_LL_ES_INIT TIM Exported Init structure
<> 161:2cc1468da177 225 * @{
<> 161:2cc1468da177 226 */
<> 161:2cc1468da177 227
<> 161:2cc1468da177 228 /**
<> 161:2cc1468da177 229 * @brief TIM Time Base configuration structure definition.
<> 161:2cc1468da177 230 */
<> 161:2cc1468da177 231 typedef struct
<> 161:2cc1468da177 232 {
<> 161:2cc1468da177 233 uint16_t Prescaler; /*!< Specifies the prescaler value used to divide the TIM clock.
<> 161:2cc1468da177 234 This parameter can be a number between Min_Data=0x0000 and Max_Data=0xFFFF.
<> 161:2cc1468da177 235
<> 161:2cc1468da177 236 This feature can be modified afterwards using unitary function @ref LL_TIM_SetPrescaler().*/
<> 161:2cc1468da177 237
<> 161:2cc1468da177 238 uint32_t CounterMode; /*!< Specifies the counter mode.
<> 161:2cc1468da177 239 This parameter can be a value of @ref TIM_LL_EC_COUNTERMODE.
<> 161:2cc1468da177 240
<> 161:2cc1468da177 241 This feature can be modified afterwards using unitary function @ref LL_TIM_SetCounterMode().*/
<> 161:2cc1468da177 242
<> 161:2cc1468da177 243 uint32_t Autoreload; /*!< Specifies the auto reload value to be loaded into the active
<> 161:2cc1468da177 244 Auto-Reload Register at the next update event.
<> 161:2cc1468da177 245 This parameter must be a number between Min_Data=0x0000 and Max_Data=0xFFFF.
<> 161:2cc1468da177 246 Some timer instances may support 32 bits counters. In that case this parameter must be a number between 0x0000 and 0xFFFFFFFF.
<> 161:2cc1468da177 247
<> 161:2cc1468da177 248 This feature can be modified afterwards using unitary function @ref LL_TIM_SetAutoReload().*/
<> 161:2cc1468da177 249
<> 161:2cc1468da177 250 uint32_t ClockDivision; /*!< Specifies the clock division.
<> 161:2cc1468da177 251 This parameter can be a value of @ref TIM_LL_EC_CLOCKDIVISION.
<> 161:2cc1468da177 252
<> 161:2cc1468da177 253 This feature can be modified afterwards using unitary function @ref LL_TIM_SetClockDivision().*/
<> 161:2cc1468da177 254
<> 161:2cc1468da177 255 uint8_t RepetitionCounter; /*!< Specifies the repetition counter value. Each time the RCR downcounter
<> 161:2cc1468da177 256 reaches zero, an update event is generated and counting restarts
<> 161:2cc1468da177 257 from the RCR value (N).
<> 161:2cc1468da177 258 This means in PWM mode that (N+1) corresponds to:
<> 161:2cc1468da177 259 - the number of PWM periods in edge-aligned mode
<> 161:2cc1468da177 260 - the number of half PWM period in center-aligned mode
<> 161:2cc1468da177 261 This parameter must be a number between 0x00 and 0xFF.
<> 161:2cc1468da177 262
<> 161:2cc1468da177 263 This feature can be modified afterwards using unitary function @ref LL_TIM_SetRepetitionCounter().*/
<> 161:2cc1468da177 264 } LL_TIM_InitTypeDef;
<> 161:2cc1468da177 265
<> 161:2cc1468da177 266 /**
<> 161:2cc1468da177 267 * @brief TIM Output Compare configuration structure definition.
<> 161:2cc1468da177 268 */
<> 161:2cc1468da177 269 typedef struct
<> 161:2cc1468da177 270 {
<> 161:2cc1468da177 271 uint32_t OCMode; /*!< Specifies the output mode.
<> 161:2cc1468da177 272 This parameter can be a value of @ref TIM_LL_EC_OCMODE.
<> 161:2cc1468da177 273
<> 161:2cc1468da177 274 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetMode().*/
<> 161:2cc1468da177 275
<> 161:2cc1468da177 276 uint32_t OCState; /*!< Specifies the TIM Output Compare state.
<> 161:2cc1468da177 277 This parameter can be a value of @ref TIM_LL_EC_OCSTATE.
<> 161:2cc1468da177 278
<> 161:2cc1468da177 279 This feature can be modified afterwards using unitary functions @ref LL_TIM_CC_EnableChannel() or @ref LL_TIM_CC_DisableChannel().*/
<> 161:2cc1468da177 280
<> 161:2cc1468da177 281 uint32_t OCNState; /*!< Specifies the TIM complementary Output Compare state.
<> 161:2cc1468da177 282 This parameter can be a value of @ref TIM_LL_EC_OCSTATE.
<> 161:2cc1468da177 283
<> 161:2cc1468da177 284 This feature can be modified afterwards using unitary functions @ref LL_TIM_CC_EnableChannel() or @ref LL_TIM_CC_DisableChannel().*/
<> 161:2cc1468da177 285
<> 161:2cc1468da177 286 uint32_t CompareValue; /*!< Specifies the Compare value to be loaded into the Capture Compare Register.
<> 161:2cc1468da177 287 This parameter can be a number between Min_Data=0x0000 and Max_Data=0xFFFF.
<> 161:2cc1468da177 288
<> 161:2cc1468da177 289 This feature can be modified afterwards using unitary function LL_TIM_OC_SetCompareCHx (x=1..6).*/
<> 161:2cc1468da177 290
<> 161:2cc1468da177 291 uint32_t OCPolarity; /*!< Specifies the output polarity.
<> 161:2cc1468da177 292 This parameter can be a value of @ref TIM_LL_EC_OCPOLARITY.
<> 161:2cc1468da177 293
<> 161:2cc1468da177 294 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetPolarity().*/
<> 161:2cc1468da177 295
<> 161:2cc1468da177 296 uint32_t OCNPolarity; /*!< Specifies the complementary output polarity.
<> 161:2cc1468da177 297 This parameter can be a value of @ref TIM_LL_EC_OCPOLARITY.
<> 161:2cc1468da177 298
<> 161:2cc1468da177 299 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetPolarity().*/
<> 161:2cc1468da177 300
<> 161:2cc1468da177 301
<> 161:2cc1468da177 302 uint32_t OCIdleState; /*!< Specifies the TIM Output Compare pin state during Idle state.
<> 161:2cc1468da177 303 This parameter can be a value of @ref TIM_LL_EC_OCIDLESTATE.
<> 161:2cc1468da177 304
<> 161:2cc1468da177 305 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetIdleState().*/
<> 161:2cc1468da177 306
<> 161:2cc1468da177 307 uint32_t OCNIdleState; /*!< Specifies the TIM Output Compare pin state during Idle state.
<> 161:2cc1468da177 308 This parameter can be a value of @ref TIM_LL_EC_OCIDLESTATE.
<> 161:2cc1468da177 309
<> 161:2cc1468da177 310 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetIdleState().*/
<> 161:2cc1468da177 311 } LL_TIM_OC_InitTypeDef;
<> 161:2cc1468da177 312
<> 161:2cc1468da177 313 /**
<> 161:2cc1468da177 314 * @brief TIM Input Capture configuration structure definition.
<> 161:2cc1468da177 315 */
<> 161:2cc1468da177 316
<> 161:2cc1468da177 317 typedef struct
<> 161:2cc1468da177 318 {
<> 161:2cc1468da177 319
<> 161:2cc1468da177 320 uint32_t ICPolarity; /*!< Specifies the active edge of the input signal.
<> 161:2cc1468da177 321 This parameter can be a value of @ref TIM_LL_EC_IC_POLARITY.
<> 161:2cc1468da177 322
<> 161:2cc1468da177 323 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPolarity().*/
<> 161:2cc1468da177 324
<> 161:2cc1468da177 325 uint32_t ICActiveInput; /*!< Specifies the input.
<> 161:2cc1468da177 326 This parameter can be a value of @ref TIM_LL_EC_ACTIVEINPUT.
<> 161:2cc1468da177 327
<> 161:2cc1468da177 328 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetActiveInput().*/
<> 161:2cc1468da177 329
<> 161:2cc1468da177 330 uint32_t ICPrescaler; /*!< Specifies the Input Capture Prescaler.
<> 161:2cc1468da177 331 This parameter can be a value of @ref TIM_LL_EC_ICPSC.
<> 161:2cc1468da177 332
<> 161:2cc1468da177 333 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPrescaler().*/
<> 161:2cc1468da177 334
<> 161:2cc1468da177 335 uint32_t ICFilter; /*!< Specifies the input capture filter.
<> 161:2cc1468da177 336 This parameter can be a value of @ref TIM_LL_EC_IC_FILTER.
<> 161:2cc1468da177 337
<> 161:2cc1468da177 338 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetFilter().*/
<> 161:2cc1468da177 339 } LL_TIM_IC_InitTypeDef;
<> 161:2cc1468da177 340
<> 161:2cc1468da177 341
<> 161:2cc1468da177 342 /**
<> 161:2cc1468da177 343 * @brief TIM Encoder interface configuration structure definition.
<> 161:2cc1468da177 344 */
<> 161:2cc1468da177 345 typedef struct
<> 161:2cc1468da177 346 {
<> 161:2cc1468da177 347 uint32_t EncoderMode; /*!< Specifies the encoder resolution (x2 or x4).
<> 161:2cc1468da177 348 This parameter can be a value of @ref TIM_LL_EC_ENCODERMODE.
<> 161:2cc1468da177 349
<> 161:2cc1468da177 350 This feature can be modified afterwards using unitary function @ref LL_TIM_SetEncoderMode().*/
<> 161:2cc1468da177 351
<> 161:2cc1468da177 352 uint32_t IC1Polarity; /*!< Specifies the active edge of TI1 input.
<> 161:2cc1468da177 353 This parameter can be a value of @ref TIM_LL_EC_IC_POLARITY.
<> 161:2cc1468da177 354
<> 161:2cc1468da177 355 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPolarity().*/
<> 161:2cc1468da177 356
<> 161:2cc1468da177 357 uint32_t IC1ActiveInput; /*!< Specifies the TI1 input source
<> 161:2cc1468da177 358 This parameter can be a value of @ref TIM_LL_EC_ACTIVEINPUT.
<> 161:2cc1468da177 359
<> 161:2cc1468da177 360 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetActiveInput().*/
<> 161:2cc1468da177 361
<> 161:2cc1468da177 362 uint32_t IC1Prescaler; /*!< Specifies the TI1 input prescaler value.
<> 161:2cc1468da177 363 This parameter can be a value of @ref TIM_LL_EC_ICPSC.
<> 161:2cc1468da177 364
<> 161:2cc1468da177 365 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPrescaler().*/
<> 161:2cc1468da177 366
<> 161:2cc1468da177 367 uint32_t IC1Filter; /*!< Specifies the TI1 input filter.
<> 161:2cc1468da177 368 This parameter can be a value of @ref TIM_LL_EC_IC_FILTER.
<> 161:2cc1468da177 369
<> 161:2cc1468da177 370 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetFilter().*/
<> 161:2cc1468da177 371
<> 161:2cc1468da177 372 uint32_t IC2Polarity; /*!< Specifies the active edge of TI2 input.
<> 161:2cc1468da177 373 This parameter can be a value of @ref TIM_LL_EC_IC_POLARITY.
<> 161:2cc1468da177 374
<> 161:2cc1468da177 375 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPolarity().*/
<> 161:2cc1468da177 376
<> 161:2cc1468da177 377 uint32_t IC2ActiveInput; /*!< Specifies the TI2 input source
<> 161:2cc1468da177 378 This parameter can be a value of @ref TIM_LL_EC_ACTIVEINPUT.
<> 161:2cc1468da177 379
<> 161:2cc1468da177 380 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetActiveInput().*/
<> 161:2cc1468da177 381
<> 161:2cc1468da177 382 uint32_t IC2Prescaler; /*!< Specifies the TI2 input prescaler value.
<> 161:2cc1468da177 383 This parameter can be a value of @ref TIM_LL_EC_ICPSC.
<> 161:2cc1468da177 384
<> 161:2cc1468da177 385 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPrescaler().*/
<> 161:2cc1468da177 386
<> 161:2cc1468da177 387 uint32_t IC2Filter; /*!< Specifies the TI2 input filter.
<> 161:2cc1468da177 388 This parameter can be a value of @ref TIM_LL_EC_IC_FILTER.
<> 161:2cc1468da177 389
<> 161:2cc1468da177 390 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetFilter().*/
<> 161:2cc1468da177 391
<> 161:2cc1468da177 392 } LL_TIM_ENCODER_InitTypeDef;
<> 161:2cc1468da177 393
<> 161:2cc1468da177 394 /**
<> 161:2cc1468da177 395 * @brief TIM Hall sensor interface configuration structure definition.
<> 161:2cc1468da177 396 */
<> 161:2cc1468da177 397 typedef struct
<> 161:2cc1468da177 398 {
<> 161:2cc1468da177 399
<> 161:2cc1468da177 400 uint32_t IC1Polarity; /*!< Specifies the active edge of TI1 input.
<> 161:2cc1468da177 401 This parameter can be a value of @ref TIM_LL_EC_IC_POLARITY.
<> 161:2cc1468da177 402
<> 161:2cc1468da177 403 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPolarity().*/
<> 161:2cc1468da177 404
<> 161:2cc1468da177 405 uint32_t IC1Prescaler; /*!< Specifies the TI1 input prescaler value.
<> 161:2cc1468da177 406 Prescaler must be set to get a maximum counter period longer than the
<> 161:2cc1468da177 407 time interval between 2 consecutive changes on the Hall inputs.
<> 161:2cc1468da177 408 This parameter can be a value of @ref TIM_LL_EC_ICPSC.
<> 161:2cc1468da177 409
<> 161:2cc1468da177 410 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetPrescaler().*/
<> 161:2cc1468da177 411
<> 161:2cc1468da177 412 uint32_t IC1Filter; /*!< Specifies the TI1 input filter.
<> 161:2cc1468da177 413 This parameter can be a value of @ref TIM_LL_EC_IC_FILTER.
<> 161:2cc1468da177 414
<> 161:2cc1468da177 415 This feature can be modified afterwards using unitary function @ref LL_TIM_IC_SetFilter().*/
<> 161:2cc1468da177 416
<> 161:2cc1468da177 417 uint32_t CommutationDelay; /*!< Specifies the compare value to be loaded into the Capture Compare Register.
<> 161:2cc1468da177 418 A positive pulse (TRGO event) is generated with a programmable delay every time
<> 161:2cc1468da177 419 a change occurs on the Hall inputs.
<> 161:2cc1468da177 420 This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
<> 161:2cc1468da177 421
<> 161:2cc1468da177 422 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetCompareCH2().*/
<> 161:2cc1468da177 423 } LL_TIM_HALLSENSOR_InitTypeDef;
<> 161:2cc1468da177 424
<> 161:2cc1468da177 425 /**
<> 161:2cc1468da177 426 * @brief BDTR (Break and Dead Time) structure definition
<> 161:2cc1468da177 427 */
<> 161:2cc1468da177 428 typedef struct
<> 161:2cc1468da177 429 {
<> 161:2cc1468da177 430 uint32_t OSSRState; /*!< Specifies the Off-State selection used in Run mode.
<> 161:2cc1468da177 431 This parameter can be a value of @ref TIM_LL_EC_OSSR
<> 161:2cc1468da177 432
<> 161:2cc1468da177 433 This feature can be modified afterwards using unitary function @ref LL_TIM_SetOffStates()
<> 161:2cc1468da177 434
<> 161:2cc1468da177 435 @note This bit-field cannot be modified as long as LOCK level 2 has been programmed. */
<> 161:2cc1468da177 436
<> 161:2cc1468da177 437 uint32_t OSSIState; /*!< Specifies the Off-State used in Idle state.
<> 161:2cc1468da177 438 This parameter can be a value of @ref TIM_LL_EC_OSSI
<> 161:2cc1468da177 439
<> 161:2cc1468da177 440 This feature can be modified afterwards using unitary function @ref LL_TIM_SetOffStates()
<> 161:2cc1468da177 441
<> 161:2cc1468da177 442 @note This bit-field cannot be modified as long as LOCK level 2 has been programmed. */
<> 161:2cc1468da177 443
<> 161:2cc1468da177 444 uint32_t LockLevel; /*!< Specifies the LOCK level parameters.
<> 161:2cc1468da177 445 This parameter can be a value of @ref TIM_LL_EC_LOCKLEVEL
<> 161:2cc1468da177 446
<> 161:2cc1468da177 447 @note The LOCK bits can be written only once after the reset. Once the TIMx_BDTR register
<> 161:2cc1468da177 448 has been written, their content is frozen until the next reset.*/
<> 161:2cc1468da177 449
<> 161:2cc1468da177 450 uint8_t DeadTime; /*!< Specifies the delay time between the switching-off and the
<> 161:2cc1468da177 451 switching-on of the outputs.
<> 161:2cc1468da177 452 This parameter can be a number between Min_Data = 0x00 and Max_Data = 0xFF.
<> 161:2cc1468da177 453
<> 161:2cc1468da177 454 This feature can be modified afterwards using unitary function @ref LL_TIM_OC_SetDeadTime()
<> 161:2cc1468da177 455
<> 161:2cc1468da177 456 @note This bit-field can not be modified as long as LOCK level 1, 2 or 3 has been programmed. */
<> 161:2cc1468da177 457
<> 161:2cc1468da177 458 uint16_t BreakState; /*!< Specifies whether the TIM Break input is enabled or not.
<> 161:2cc1468da177 459 This parameter can be a value of @ref TIM_LL_EC_BREAK_ENABLE
<> 161:2cc1468da177 460
<> 161:2cc1468da177 461 This feature can be modified afterwards using unitary functions @ref LL_TIM_EnableBRK() or @ref LL_TIM_DisableBRK()
<> 161:2cc1468da177 462
<> 161:2cc1468da177 463 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 464
<> 161:2cc1468da177 465 uint32_t BreakPolarity; /*!< Specifies the TIM Break Input pin polarity.
<> 161:2cc1468da177 466 This parameter can be a value of @ref TIM_LL_EC_BREAK_POLARITY
<> 161:2cc1468da177 467
<> 161:2cc1468da177 468 This feature can be modified afterwards using unitary function @ref LL_TIM_ConfigBRK()
<> 161:2cc1468da177 469
<> 161:2cc1468da177 470 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 471
<> 161:2cc1468da177 472 uint32_t BreakFilter; /*!< Specifies the TIM Break Filter.
<> 161:2cc1468da177 473 This parameter can be a value of @ref TIM_LL_EC_BREAK_FILTER
<> 161:2cc1468da177 474
<> 161:2cc1468da177 475 This feature can be modified afterwards using unitary function @ref LL_TIM_ConfigBRK()
<> 161:2cc1468da177 476
<> 161:2cc1468da177 477 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 478
<> 161:2cc1468da177 479 uint32_t Break2State; /*!< Specifies whether the TIM Break2 input is enabled or not.
<> 161:2cc1468da177 480 This parameter can be a value of @ref TIM_LL_EC_BREAK2_ENABLE
<> 161:2cc1468da177 481
<> 161:2cc1468da177 482 This feature can be modified afterwards using unitary functions @ref LL_TIM_EnableBRK2() or @ref LL_TIM_DisableBRK2()
<> 161:2cc1468da177 483
<> 161:2cc1468da177 484 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 485
<> 161:2cc1468da177 486 uint32_t Break2Polarity; /*!< Specifies the TIM Break2 Input pin polarity.
<> 161:2cc1468da177 487 This parameter can be a value of @ref TIM_LL_EC_BREAK2_POLARITY
<> 161:2cc1468da177 488
<> 161:2cc1468da177 489 This feature can be modified afterwards using unitary function @ref LL_TIM_ConfigBRK2()
<> 161:2cc1468da177 490
<> 161:2cc1468da177 491 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 492
<> 161:2cc1468da177 493 uint32_t Break2Filter; /*!< Specifies the TIM Break2 Filter.
<> 161:2cc1468da177 494 This parameter can be a value of @ref TIM_LL_EC_BREAK2_FILTER
<> 161:2cc1468da177 495
<> 161:2cc1468da177 496 This feature can be modified afterwards using unitary function @ref LL_TIM_ConfigBRK2()
<> 161:2cc1468da177 497
<> 161:2cc1468da177 498 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 499
<> 161:2cc1468da177 500 uint32_t AutomaticOutput; /*!< Specifies whether the TIM Automatic Output feature is enabled or not.
<> 161:2cc1468da177 501 This parameter can be a value of @ref TIM_LL_EC_AUTOMATICOUTPUT_ENABLE
<> 161:2cc1468da177 502
<> 161:2cc1468da177 503 This feature can be modified afterwards using unitary functions @ref LL_TIM_EnableAutomaticOutput() or @ref LL_TIM_DisableAutomaticOutput()
<> 161:2cc1468da177 504
<> 161:2cc1468da177 505 @note This bit-field can not be modified as long as LOCK level 1 has been programmed. */
<> 161:2cc1468da177 506 } LL_TIM_BDTR_InitTypeDef;
<> 161:2cc1468da177 507
<> 161:2cc1468da177 508 /**
<> 161:2cc1468da177 509 * @}
<> 161:2cc1468da177 510 */
<> 161:2cc1468da177 511 #endif /* USE_FULL_LL_DRIVER */
<> 161:2cc1468da177 512
<> 161:2cc1468da177 513 /* Exported constants --------------------------------------------------------*/
<> 161:2cc1468da177 514 /** @defgroup TIM_LL_Exported_Constants TIM Exported Constants
<> 161:2cc1468da177 515 * @{
<> 161:2cc1468da177 516 */
<> 161:2cc1468da177 517
<> 161:2cc1468da177 518 /** @defgroup TIM_LL_EC_GET_FLAG Get Flags Defines
<> 161:2cc1468da177 519 * @brief Flags defines which can be used with LL_TIM_ReadReg function.
<> 161:2cc1468da177 520 * @{
<> 161:2cc1468da177 521 */
<> 161:2cc1468da177 522 #define LL_TIM_SR_UIF TIM_SR_UIF /*!< Update interrupt flag */
<> 161:2cc1468da177 523 #define LL_TIM_SR_CC1IF TIM_SR_CC1IF /*!< Capture/compare 1 interrupt flag */
<> 161:2cc1468da177 524 #define LL_TIM_SR_CC2IF TIM_SR_CC2IF /*!< Capture/compare 2 interrupt flag */
<> 161:2cc1468da177 525 #define LL_TIM_SR_CC3IF TIM_SR_CC3IF /*!< Capture/compare 3 interrupt flag */
<> 161:2cc1468da177 526 #define LL_TIM_SR_CC4IF TIM_SR_CC4IF /*!< Capture/compare 4 interrupt flag */
<> 161:2cc1468da177 527 #define LL_TIM_SR_CC5IF TIM_SR_CC5IF /*!< Capture/compare 5 interrupt flag */
<> 161:2cc1468da177 528 #define LL_TIM_SR_CC6IF TIM_SR_CC6IF /*!< Capture/compare 6 interrupt flag */
<> 161:2cc1468da177 529 #define LL_TIM_SR_COMIF TIM_SR_COMIF /*!< COM interrupt flag */
<> 161:2cc1468da177 530 #define LL_TIM_SR_TIF TIM_SR_TIF /*!< Trigger interrupt flag */
<> 161:2cc1468da177 531 #define LL_TIM_SR_BIF TIM_SR_BIF /*!< Break interrupt flag */
<> 161:2cc1468da177 532 #define LL_TIM_SR_B2IF TIM_SR_B2IF /*!< Second break interrupt flag */
<> 161:2cc1468da177 533 #define LL_TIM_SR_CC1OF TIM_SR_CC1OF /*!< Capture/Compare 1 overcapture flag */
<> 161:2cc1468da177 534 #define LL_TIM_SR_CC2OF TIM_SR_CC2OF /*!< Capture/Compare 2 overcapture flag */
<> 161:2cc1468da177 535 #define LL_TIM_SR_CC3OF TIM_SR_CC3OF /*!< Capture/Compare 3 overcapture flag */
<> 161:2cc1468da177 536 #define LL_TIM_SR_CC4OF TIM_SR_CC4OF /*!< Capture/Compare 4 overcapture flag */
<> 161:2cc1468da177 537 #define LL_TIM_SR_SBIF TIM_SR_SBIF /*!< System Break interrupt flag */
<> 161:2cc1468da177 538 /**
<> 161:2cc1468da177 539 * @}
<> 161:2cc1468da177 540 */
<> 161:2cc1468da177 541
<> 161:2cc1468da177 542 #if defined(USE_FULL_LL_DRIVER)
<> 161:2cc1468da177 543 /** @defgroup TIM_LL_EC_BREAK_ENABLE Break Enable
<> 161:2cc1468da177 544 * @{
<> 161:2cc1468da177 545 */
<> 161:2cc1468da177 546 #define LL_TIM_BREAK_DISABLE 0x00000000U /*!< Break function disabled */
<> 161:2cc1468da177 547 #define LL_TIM_BREAK_ENABLE TIM_BDTR_BKE /*!< Break function enabled */
<> 161:2cc1468da177 548 /**
<> 161:2cc1468da177 549 * @}
<> 161:2cc1468da177 550 */
<> 161:2cc1468da177 551
<> 161:2cc1468da177 552 /** @defgroup TIM_LL_EC_BREAK2_ENABLE Break2 Enable
<> 161:2cc1468da177 553 * @{
<> 161:2cc1468da177 554 */
<> 161:2cc1468da177 555 #define LL_TIM_BREAK2_DISABLE 0x00000000U /*!< Break2 function disabled */
<> 161:2cc1468da177 556 #define LL_TIM_BREAK2_ENABLE TIM_BDTR_BK2E /*!< Break2 function enabled */
<> 161:2cc1468da177 557 /**
<> 161:2cc1468da177 558 * @}
<> 161:2cc1468da177 559 */
<> 161:2cc1468da177 560
<> 161:2cc1468da177 561 /** @defgroup TIM_LL_EC_AUTOMATICOUTPUT_ENABLE Automatic output enable
<> 161:2cc1468da177 562 * @{
<> 161:2cc1468da177 563 */
<> 161:2cc1468da177 564 #define LL_TIM_AUTOMATICOUTPUT_DISABLE 0x00000000U /*!< MOE can be set only by software */
<> 161:2cc1468da177 565 #define LL_TIM_AUTOMATICOUTPUT_ENABLE TIM_BDTR_AOE /*!< MOE can be set by software or automatically at the next update event */
<> 161:2cc1468da177 566 /**
<> 161:2cc1468da177 567 * @}
<> 161:2cc1468da177 568 */
<> 161:2cc1468da177 569 #endif /* USE_FULL_LL_DRIVER */
<> 161:2cc1468da177 570
<> 161:2cc1468da177 571 /** @defgroup TIM_LL_EC_IT IT Defines
<> 161:2cc1468da177 572 * @brief IT defines which can be used with LL_TIM_ReadReg and LL_TIM_WriteReg functions.
<> 161:2cc1468da177 573 * @{
<> 161:2cc1468da177 574 */
<> 161:2cc1468da177 575 #define LL_TIM_DIER_UIE TIM_DIER_UIE /*!< Update interrupt enable */
<> 161:2cc1468da177 576 #define LL_TIM_DIER_CC1IE TIM_DIER_CC1IE /*!< Capture/compare 1 interrupt enable */
<> 161:2cc1468da177 577 #define LL_TIM_DIER_CC2IE TIM_DIER_CC2IE /*!< Capture/compare 2 interrupt enable */
<> 161:2cc1468da177 578 #define LL_TIM_DIER_CC3IE TIM_DIER_CC3IE /*!< Capture/compare 3 interrupt enable */
<> 161:2cc1468da177 579 #define LL_TIM_DIER_CC4IE TIM_DIER_CC4IE /*!< Capture/compare 4 interrupt enable */
<> 161:2cc1468da177 580 #define LL_TIM_DIER_COMIE TIM_DIER_COMIE /*!< COM interrupt enable */
<> 161:2cc1468da177 581 #define LL_TIM_DIER_TIE TIM_DIER_TIE /*!< Trigger interrupt enable */
<> 161:2cc1468da177 582 #define LL_TIM_DIER_BIE TIM_DIER_BIE /*!< Break interrupt enable */
<> 161:2cc1468da177 583 /**
<> 161:2cc1468da177 584 * @}
<> 161:2cc1468da177 585 */
<> 161:2cc1468da177 586
<> 161:2cc1468da177 587 /** @defgroup TIM_LL_EC_UPDATESOURCE Update Source
<> 161:2cc1468da177 588 * @{
<> 161:2cc1468da177 589 */
<> 161:2cc1468da177 590 #define LL_TIM_UPDATESOURCE_REGULAR 0x00000000U /*!< Counter overflow/underflow, Setting the UG bit or Update generation through the slave mode controller generates an update request */
<> 161:2cc1468da177 591 #define LL_TIM_UPDATESOURCE_COUNTER TIM_CR1_URS /*!< Only counter overflow/underflow generates an update request */
<> 161:2cc1468da177 592 /**
<> 161:2cc1468da177 593 * @}
<> 161:2cc1468da177 594 */
<> 161:2cc1468da177 595
<> 161:2cc1468da177 596 /** @defgroup TIM_LL_EC_ONEPULSEMODE One Pulse Mode
<> 161:2cc1468da177 597 * @{
<> 161:2cc1468da177 598 */
<> 161:2cc1468da177 599 #define LL_TIM_ONEPULSEMODE_SINGLE TIM_CR1_OPM /*!< Counter is not stopped at update event */
<> 161:2cc1468da177 600 #define LL_TIM_ONEPULSEMODE_REPETITIVE 0x00000000U /*!< Counter stops counting at the next update event */
<> 161:2cc1468da177 601 /**
<> 161:2cc1468da177 602 * @}
<> 161:2cc1468da177 603 */
<> 161:2cc1468da177 604
<> 161:2cc1468da177 605 /** @defgroup TIM_LL_EC_COUNTERMODE Counter Mode
<> 161:2cc1468da177 606 * @{
<> 161:2cc1468da177 607 */
<> 161:2cc1468da177 608 #define LL_TIM_COUNTERMODE_UP 0x00000000U /*!<Counter used as upcounter */
<> 161:2cc1468da177 609 #define LL_TIM_COUNTERMODE_DOWN TIM_CR1_DIR /*!< Counter used as downcounter */
<> 161:2cc1468da177 610 #define LL_TIM_COUNTERMODE_CENTER_UP TIM_CR1_CMS_0 /*!< The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting down. */
<> 161:2cc1468da177 611 #define LL_TIM_COUNTERMODE_CENTER_DOWN TIM_CR1_CMS_1 /*!<The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting up */
<> 161:2cc1468da177 612 #define LL_TIM_COUNTERMODE_CENTER_UP_DOWN TIM_CR1_CMS /*!< The counter counts up and down alternatively. Output compare interrupt flags of output channels are set only when the counter is counting up or down. */
<> 161:2cc1468da177 613 /**
<> 161:2cc1468da177 614 * @}
<> 161:2cc1468da177 615 */
<> 161:2cc1468da177 616
<> 161:2cc1468da177 617 /** @defgroup TIM_LL_EC_CLOCKDIVISION Clock Division
<> 161:2cc1468da177 618 * @{
<> 161:2cc1468da177 619 */
<> 161:2cc1468da177 620 #define LL_TIM_CLOCKDIVISION_DIV1 0x00000000U /*!< tDTS=tCK_INT */
<> 161:2cc1468da177 621 #define LL_TIM_CLOCKDIVISION_DIV2 TIM_CR1_CKD_0 /*!< tDTS=2*tCK_INT */
<> 161:2cc1468da177 622 #define LL_TIM_CLOCKDIVISION_DIV4 TIM_CR1_CKD_1 /*!< tDTS=4*tCK_INT */
<> 161:2cc1468da177 623 /**
<> 161:2cc1468da177 624 * @}
<> 161:2cc1468da177 625 */
<> 161:2cc1468da177 626
<> 161:2cc1468da177 627 /** @defgroup TIM_LL_EC_COUNTERDIRECTION Counter Direction
<> 161:2cc1468da177 628 * @{
<> 161:2cc1468da177 629 */
<> 161:2cc1468da177 630 #define LL_TIM_COUNTERDIRECTION_UP 0x00000000U /*!< Timer counter counts up */
<> 161:2cc1468da177 631 #define LL_TIM_COUNTERDIRECTION_DOWN TIM_CR1_DIR /*!< Timer counter counts down */
<> 161:2cc1468da177 632 /**
<> 161:2cc1468da177 633 * @}
<> 161:2cc1468da177 634 */
<> 161:2cc1468da177 635
<> 161:2cc1468da177 636 /** @defgroup TIM_LL_EC_CCUPDATESOURCE Capture Compare Update Source
<> 161:2cc1468da177 637 * @{
<> 161:2cc1468da177 638 */
<> 161:2cc1468da177 639 #define LL_TIM_CCUPDATESOURCE_COMG_ONLY 0x00000000U /*!< Capture/compare control bits are updated by setting the COMG bit only */
<> 161:2cc1468da177 640 #define LL_TIM_CCUPDATESOURCE_COMG_AND_TRGI TIM_CR2_CCUS /*!< Capture/compare control bits are updated by setting the COMG bit or when a rising edge occurs on trigger input (TRGI) */
<> 161:2cc1468da177 641 /**
<> 161:2cc1468da177 642 * @}
<> 161:2cc1468da177 643 */
<> 161:2cc1468da177 644
<> 161:2cc1468da177 645 /** @defgroup TIM_LL_EC_CCDMAREQUEST Capture Compare DMA Request
<> 161:2cc1468da177 646 * @{
<> 161:2cc1468da177 647 */
<> 161:2cc1468da177 648 #define LL_TIM_CCDMAREQUEST_CC 0x00000000U /*!< CCx DMA request sent when CCx event occurs */
<> 161:2cc1468da177 649 #define LL_TIM_CCDMAREQUEST_UPDATE TIM_CR2_CCDS /*!< CCx DMA requests sent when update event occurs */
<> 161:2cc1468da177 650 /**
<> 161:2cc1468da177 651 * @}
<> 161:2cc1468da177 652 */
<> 161:2cc1468da177 653
<> 161:2cc1468da177 654 /** @defgroup TIM_LL_EC_LOCKLEVEL Lock Level
<> 161:2cc1468da177 655 * @{
<> 161:2cc1468da177 656 */
<> 161:2cc1468da177 657 #define LL_TIM_LOCKLEVEL_OFF 0x00000000U /*!< LOCK OFF - No bit is write protected */
<> 161:2cc1468da177 658 #define LL_TIM_LOCKLEVEL_1 TIM_BDTR_LOCK_0 /*!< LOCK Level 1 */
<> 161:2cc1468da177 659 #define LL_TIM_LOCKLEVEL_2 TIM_BDTR_LOCK_1 /*!< LOCK Level 2 */
<> 161:2cc1468da177 660 #define LL_TIM_LOCKLEVEL_3 TIM_BDTR_LOCK /*!< LOCK Level 3 */
<> 161:2cc1468da177 661 /**
<> 161:2cc1468da177 662 * @}
<> 161:2cc1468da177 663 */
<> 161:2cc1468da177 664
<> 161:2cc1468da177 665 /** @defgroup TIM_LL_EC_CHANNEL Channel
<> 161:2cc1468da177 666 * @{
<> 161:2cc1468da177 667 */
<> 161:2cc1468da177 668 #define LL_TIM_CHANNEL_CH1 TIM_CCER_CC1E /*!< Timer input/output channel 1 */
<> 161:2cc1468da177 669 #define LL_TIM_CHANNEL_CH1N TIM_CCER_CC1NE /*!< Timer complementary output channel 1 */
<> 161:2cc1468da177 670 #define LL_TIM_CHANNEL_CH2 TIM_CCER_CC2E /*!< Timer input/output channel 2 */
<> 161:2cc1468da177 671 #define LL_TIM_CHANNEL_CH2N TIM_CCER_CC2NE /*!< Timer complementary output channel 2 */
<> 161:2cc1468da177 672 #define LL_TIM_CHANNEL_CH3 TIM_CCER_CC3E /*!< Timer input/output channel 3 */
<> 161:2cc1468da177 673 #define LL_TIM_CHANNEL_CH3N TIM_CCER_CC3NE /*!< Timer complementary output channel 3 */
<> 161:2cc1468da177 674 #define LL_TIM_CHANNEL_CH4 TIM_CCER_CC4E /*!< Timer input/output channel 4 */
<> 161:2cc1468da177 675 #define LL_TIM_CHANNEL_CH5 TIM_CCER_CC5E /*!< Timer output channel 5 */
<> 161:2cc1468da177 676 #define LL_TIM_CHANNEL_CH6 TIM_CCER_CC6E /*!< Timer output channel 6 */
<> 161:2cc1468da177 677 /**
<> 161:2cc1468da177 678 * @}
<> 161:2cc1468da177 679 */
<> 161:2cc1468da177 680
<> 161:2cc1468da177 681 #if defined(USE_FULL_LL_DRIVER)
<> 161:2cc1468da177 682 /** @defgroup TIM_LL_EC_OCSTATE Output Configuration State
<> 161:2cc1468da177 683 * @{
<> 161:2cc1468da177 684 */
<> 161:2cc1468da177 685 #define LL_TIM_OCSTATE_DISABLE 0x00000000U /*!< OCx is not active */
<> 161:2cc1468da177 686 #define LL_TIM_OCSTATE_ENABLE TIM_CCER_CC1E /*!< OCx signal is output on the corresponding output pin */
<> 161:2cc1468da177 687 /**
<> 161:2cc1468da177 688 * @}
<> 161:2cc1468da177 689 */
<> 161:2cc1468da177 690 #endif /* USE_FULL_LL_DRIVER */
<> 161:2cc1468da177 691
<> 161:2cc1468da177 692 /** @defgroup TIM_LL_EC_OCMODE Output Configuration Mode
<> 161:2cc1468da177 693 * @{
<> 161:2cc1468da177 694 */
<> 161:2cc1468da177 695 #define LL_TIM_OCMODE_FROZEN 0x00000000U /*!<The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the output channel level */
<> 161:2cc1468da177 696 #define LL_TIM_OCMODE_ACTIVE TIM_CCMR1_OC1M_0 /*!<OCyREF is forced high on compare match*/
<> 161:2cc1468da177 697 #define LL_TIM_OCMODE_INACTIVE TIM_CCMR1_OC1M_1 /*!<OCyREF is forced low on compare match*/
<> 161:2cc1468da177 698 #define LL_TIM_OCMODE_TOGGLE (TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<OCyREF toggles on compare match*/
<> 161:2cc1468da177 699 #define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2 /*!<OCyREF is forced low*/
<> 161:2cc1468da177 700 #define LL_TIM_OCMODE_FORCED_ACTIVE (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0) /*!<OCyREF is forced high*/
<> 161:2cc1468da177 701 #define LL_TIM_OCMODE_PWM1 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1) /*!<In upcounting, channel y is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel y is inactive as long as TIMx_CNT>TIMx_CCRy else active.*/
<> 161:2cc1468da177 702 #define LL_TIM_OCMODE_PWM2 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<In upcounting, channel y is inactive as long as TIMx_CNT<TIMx_CCRy else active. In downcounting, channel y is active as long as TIMx_CNT>TIMx_CCRy else inactive*/
<> 161:2cc1468da177 703 #define LL_TIM_OCMODE_RETRIG_OPM1 TIM_CCMR1_OC1M_3 /*!<Retrigerrable OPM mode 1*/
<> 161:2cc1468da177 704 #define LL_TIM_OCMODE_RETRIG_OPM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0) /*!<Retrigerrable OPM mode 2*/
<> 161:2cc1468da177 705 #define LL_TIM_OCMODE_COMBINED_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_2) /*!<Combined PWM mode 1*/
<> 161:2cc1468da177 706 #define LL_TIM_OCMODE_COMBINED_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0 | TIM_CCMR1_OC1M_2) /*!<Combined PWM mode 2*/
<> 161:2cc1468da177 707 #define LL_TIM_OCMODE_ASSYMETRIC_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_2) /*!<Asymmetric PWM mode 1*/
<> 161:2cc1468da177 708 #define LL_TIM_OCMODE_ASSYMETRIC_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M) /*!<Asymmetric PWM mode 2*/
<> 161:2cc1468da177 709 /**
<> 161:2cc1468da177 710 * @}
<> 161:2cc1468da177 711 */
<> 161:2cc1468da177 712
<> 161:2cc1468da177 713 /** @defgroup TIM_LL_EC_OCPOLARITY Output Configuration Polarity
<> 161:2cc1468da177 714 * @{
<> 161:2cc1468da177 715 */
<> 161:2cc1468da177 716 #define LL_TIM_OCPOLARITY_HIGH 0x00000000U /*!< OCxactive high*/
<> 161:2cc1468da177 717 #define LL_TIM_OCPOLARITY_LOW TIM_CCER_CC1P /*!< OCxactive low*/
<> 161:2cc1468da177 718 /**
<> 161:2cc1468da177 719 * @}
<> 161:2cc1468da177 720 */
<> 161:2cc1468da177 721
<> 161:2cc1468da177 722 /** @defgroup TIM_LL_EC_OCIDLESTATE Output Configuration Idle State
<> 161:2cc1468da177 723 * @{
<> 161:2cc1468da177 724 */
<> 161:2cc1468da177 725 #define LL_TIM_OCIDLESTATE_LOW 0x00000000U /*!<OCx=0 (after a dead-time if OC is implemented) when MOE=0*/
<> 161:2cc1468da177 726 #define LL_TIM_OCIDLESTATE_HIGH TIM_CR2_OIS1 /*!<OCx=1 (after a dead-time if OC is implemented) when MOE=0*/
<> 161:2cc1468da177 727 /**
<> 161:2cc1468da177 728 * @}
<> 161:2cc1468da177 729 */
<> 161:2cc1468da177 730
<> 161:2cc1468da177 731 /** @defgroup TIM_LL_EC_GROUPCH5 GROUPCH5
<> 161:2cc1468da177 732 * @{
<> 161:2cc1468da177 733 */
<> 161:2cc1468da177 734 #define LL_TIM_GROUPCH5_NONE 0x00000000U /*!< No effect of OC5REF on OC1REFC, OC2REFC and OC3REFC */
<> 161:2cc1468da177 735 #define LL_TIM_GROUPCH5_OC1REFC TIM_CCR5_GC5C1 /*!< OC1REFC is the logical AND of OC1REFC and OC5REF */
<> 161:2cc1468da177 736 #define LL_TIM_GROUPCH5_OC2REFC TIM_CCR5_GC5C2 /*!< OC2REFC is the logical AND of OC2REFC and OC5REF */
<> 161:2cc1468da177 737 #define LL_TIM_GROUPCH5_OC3REFC TIM_CCR5_GC5C3 /*!< OC3REFC is the logical AND of OC3REFC and OC5REF */
<> 161:2cc1468da177 738 /**
<> 161:2cc1468da177 739 * @}
<> 161:2cc1468da177 740 */
<> 161:2cc1468da177 741
<> 161:2cc1468da177 742 /** @defgroup TIM_LL_EC_ACTIVEINPUT Active Input Selection
<> 161:2cc1468da177 743 * @{
<> 161:2cc1468da177 744 */
<> 161:2cc1468da177 745 #define LL_TIM_ACTIVEINPUT_DIRECTTI (TIM_CCMR1_CC1S_0 << 16U) /*!< ICx is mapped on TIx */
<> 161:2cc1468da177 746 #define LL_TIM_ACTIVEINPUT_INDIRECTTI (TIM_CCMR1_CC1S_1 << 16U) /*!< ICx is mapped on TIy */
<> 161:2cc1468da177 747 #define LL_TIM_ACTIVEINPUT_TRC (TIM_CCMR1_CC1S << 16U) /*!< ICx is mapped on TRC */
<> 161:2cc1468da177 748 /**
<> 161:2cc1468da177 749 * @}
<> 161:2cc1468da177 750 */
<> 161:2cc1468da177 751
<> 161:2cc1468da177 752 /** @defgroup TIM_LL_EC_ICPSC Input Configuration Prescaler
<> 161:2cc1468da177 753 * @{
<> 161:2cc1468da177 754 */
<> 161:2cc1468da177 755 #define LL_TIM_ICPSC_DIV1 0x00000000U /*!< No prescaler, capture is done each time an edge is detected on the capture input */
<> 161:2cc1468da177 756 #define LL_TIM_ICPSC_DIV2 (TIM_CCMR1_IC1PSC_0 << 16U) /*!< Capture is done once every 2 events */
<> 161:2cc1468da177 757 #define LL_TIM_ICPSC_DIV4 (TIM_CCMR1_IC1PSC_1 << 16U) /*!< Capture is done once every 4 events */
<> 161:2cc1468da177 758 #define LL_TIM_ICPSC_DIV8 (TIM_CCMR1_IC1PSC << 16U) /*!< Capture is done once every 8 events */
<> 161:2cc1468da177 759 /**
<> 161:2cc1468da177 760 * @}
<> 161:2cc1468da177 761 */
<> 161:2cc1468da177 762
<> 161:2cc1468da177 763 /** @defgroup TIM_LL_EC_IC_FILTER Input Configuration Filter
<> 161:2cc1468da177 764 * @{
<> 161:2cc1468da177 765 */
<> 161:2cc1468da177 766 #define LL_TIM_IC_FILTER_FDIV1 0x00000000U /*!< No filter, sampling is done at fDTS */
<> 161:2cc1468da177 767 #define LL_TIM_IC_FILTER_FDIV1_N2 (TIM_CCMR1_IC1F_0 << 16U) /*!< fSAMPLING=fCK_INT, N=2 */
<> 161:2cc1468da177 768 #define LL_TIM_IC_FILTER_FDIV1_N4 (TIM_CCMR1_IC1F_1 << 16U) /*!< fSAMPLING=fCK_INT, N=4 */
<> 161:2cc1468da177 769 #define LL_TIM_IC_FILTER_FDIV1_N8 ((TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fCK_INT, N=8 */
<> 161:2cc1468da177 770 #define LL_TIM_IC_FILTER_FDIV2_N6 (TIM_CCMR1_IC1F_2 << 16U) /*!< fSAMPLING=fDTS/2, N=6 */
<> 161:2cc1468da177 771 #define LL_TIM_IC_FILTER_FDIV2_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/2, N=8 */
<> 161:2cc1468da177 772 #define LL_TIM_IC_FILTER_FDIV4_N6 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/4, N=6 */
<> 161:2cc1468da177 773 #define LL_TIM_IC_FILTER_FDIV4_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/4, N=8 */
<> 161:2cc1468da177 774 #define LL_TIM_IC_FILTER_FDIV8_N6 (TIM_CCMR1_IC1F_3 << 16U) /*!< fSAMPLING=fDTS/8, N=6 */
<> 161:2cc1468da177 775 #define LL_TIM_IC_FILTER_FDIV8_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/8, N=8 */
<> 161:2cc1468da177 776 #define LL_TIM_IC_FILTER_FDIV16_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/16, N=5 */
<> 161:2cc1468da177 777 #define LL_TIM_IC_FILTER_FDIV16_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/16, N=6 */
<> 161:2cc1468da177 778 #define LL_TIM_IC_FILTER_FDIV16_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2) << 16U) /*!< fSAMPLING=fDTS/16, N=8 */
<> 161:2cc1468da177 779 #define LL_TIM_IC_FILTER_FDIV32_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/32, N=5 */
<> 161:2cc1468da177 780 #define LL_TIM_IC_FILTER_FDIV32_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/32, N=6 */
<> 161:2cc1468da177 781 #define LL_TIM_IC_FILTER_FDIV32_N8 (TIM_CCMR1_IC1F << 16U) /*!< fSAMPLING=fDTS/32, N=8 */
<> 161:2cc1468da177 782 /**
<> 161:2cc1468da177 783 * @}
<> 161:2cc1468da177 784 */
<> 161:2cc1468da177 785
<> 161:2cc1468da177 786 /** @defgroup TIM_LL_EC_IC_POLARITY Input Configuration Polarity
<> 161:2cc1468da177 787 * @{
<> 161:2cc1468da177 788 */
<> 161:2cc1468da177 789 #define LL_TIM_IC_POLARITY_RISING 0x00000000U /*!< The circuit is sensitive to TIxFP1 rising edge, TIxFP1 is not inverted */
<> 161:2cc1468da177 790 #define LL_TIM_IC_POLARITY_FALLING TIM_CCER_CC1P /*!< The circuit is sensitive to TIxFP1 falling edge, TIxFP1 is inverted */
<> 161:2cc1468da177 791 #define LL_TIM_IC_POLARITY_BOTHEDGE (TIM_CCER_CC1P | TIM_CCER_CC1NP) /*!< The circuit is sensitive to both TIxFP1 rising and falling edges, TIxFP1 is not inverted */
<> 161:2cc1468da177 792 /**
<> 161:2cc1468da177 793 * @}
<> 161:2cc1468da177 794 */
<> 161:2cc1468da177 795
<> 161:2cc1468da177 796 /** @defgroup TIM_LL_EC_CLOCKSOURCE Clock Source
<> 161:2cc1468da177 797 * @{
<> 161:2cc1468da177 798 */
<> 161:2cc1468da177 799 #define LL_TIM_CLOCKSOURCE_INTERNAL 0x00000000U /*!< The timer is clocked by the internal clock provided from the RCC */
<> 161:2cc1468da177 800 #define LL_TIM_CLOCKSOURCE_EXT_MODE1 (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0) /*!< Counter counts at each rising or falling edge on a selected inpu t*/
<> 161:2cc1468da177 801 #define LL_TIM_CLOCKSOURCE_EXT_MODE2 TIM_SMCR_ECE /*!< Counter counts at each rising or falling edge on the external trigger input ETR */
<> 161:2cc1468da177 802 /**
<> 161:2cc1468da177 803 * @}
<> 161:2cc1468da177 804 */
<> 161:2cc1468da177 805
<> 161:2cc1468da177 806 /** @defgroup TIM_LL_EC_ENCODERMODE Encoder Mode
<> 161:2cc1468da177 807 * @{
<> 161:2cc1468da177 808 */
<> 161:2cc1468da177 809 #define LL_TIM_ENCODERMODE_X2_TI1 TIM_SMCR_SMS_0 /*!< Encoder mode 1 - Counter counts up/down on TI2FP2 edge depending on TI1FP1 level */
<> 161:2cc1468da177 810 #define LL_TIM_ENCODERMODE_X2_TI2 TIM_SMCR_SMS_1 /*!< Encoder mode 2 - Counter counts up/down on TI1FP1 edge depending on TI2FP2 level */
<> 161:2cc1468da177 811 #define LL_TIM_ENCODERMODE_X4_TI12 (TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0) /*!< Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input l */
<> 161:2cc1468da177 812 /**
<> 161:2cc1468da177 813 * @}
<> 161:2cc1468da177 814 */
<> 161:2cc1468da177 815
<> 161:2cc1468da177 816 /** @defgroup TIM_LL_EC_TRGO Trigger Output
<> 161:2cc1468da177 817 * @{
<> 161:2cc1468da177 818 */
<> 161:2cc1468da177 819 #define LL_TIM_TRGO_RESET 0x00000000U /*!< UG bit from the TIMx_EGR register is used as trigger output */
<> 161:2cc1468da177 820 #define LL_TIM_TRGO_ENABLE TIM_CR2_MMS_0 /*!< Counter Enable signal (CNT_EN) is used as trigger output */
<> 161:2cc1468da177 821 #define LL_TIM_TRGO_UPDATE TIM_CR2_MMS_1 /*!< Update event is used as trigger output */
<> 161:2cc1468da177 822 #define LL_TIM_TRGO_CC1IF (TIM_CR2_MMS_1 | TIM_CR2_MMS_0) /*!< CC1 capture or a compare match is used as trigger output */
<> 161:2cc1468da177 823 #define LL_TIM_TRGO_OC1REF TIM_CR2_MMS_2 /*!< OC1REF signal is used as trigger output */
<> 161:2cc1468da177 824 #define LL_TIM_TRGO_OC2REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_0) /*!< OC2REF signal is used as trigger output */
<> 161:2cc1468da177 825 #define LL_TIM_TRGO_OC3REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1) /*!< OC3REF signal is used as trigger output */
<> 161:2cc1468da177 826 #define LL_TIM_TRGO_OC4REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1 | TIM_CR2_MMS_0) /*!< OC4REF signal is used as trigger output */
<> 161:2cc1468da177 827 /**
<> 161:2cc1468da177 828 * @}
<> 161:2cc1468da177 829 */
<> 161:2cc1468da177 830
<> 161:2cc1468da177 831 /** @defgroup TIM_LL_EC_TRGO2 Trigger Output 2
<> 161:2cc1468da177 832 * @{
<> 161:2cc1468da177 833 */
<> 161:2cc1468da177 834 #define LL_TIM_TRGO2_RESET 0x00000000U /*!< UG bit from the TIMx_EGR register is used as trigger output 2 */
<> 161:2cc1468da177 835 #define LL_TIM_TRGO2_ENABLE TIM_CR2_MMS2_0 /*!< Counter Enable signal (CNT_EN) is used as trigger output 2 */
<> 161:2cc1468da177 836 #define LL_TIM_TRGO2_UPDATE TIM_CR2_MMS2_1 /*!< Update event is used as trigger output 2 */
<> 161:2cc1468da177 837 #define LL_TIM_TRGO2_CC1F (TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0) /*!< CC1 capture or a compare match is used as trigger output 2 */
<> 161:2cc1468da177 838 #define LL_TIM_TRGO2_OC1 TIM_CR2_MMS2_2 /*!< OC1REF signal is used as trigger output 2 */
<> 161:2cc1468da177 839 #define LL_TIM_TRGO2_OC2 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0) /*!< OC2REF signal is used as trigger output 2 */
<> 161:2cc1468da177 840 #define LL_TIM_TRGO2_OC3 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1) /*!< OC3REF signal is used as trigger output 2 */
<> 161:2cc1468da177 841 #define LL_TIM_TRGO2_OC4 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0) /*!< OC4REF signal is used as trigger output 2 */
<> 161:2cc1468da177 842 #define LL_TIM_TRGO2_OC5 TIM_CR2_MMS2_3 /*!< OC5REF signal is used as trigger output 2 */
<> 161:2cc1468da177 843 #define LL_TIM_TRGO2_OC6 (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_0) /*!< OC6REF signal is used as trigger output 2 */
<> 161:2cc1468da177 844 #define LL_TIM_TRGO2_OC4_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1) /*!< OC4REF rising or falling edges are used as trigger output 2 */
<> 161:2cc1468da177 845 #define LL_TIM_TRGO2_OC6_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0) /*!< OC6REF rising or falling edges are used as trigger output 2 */
<> 161:2cc1468da177 846 #define LL_TIM_TRGO2_OC4_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2) /*!< OC4REF or OC6REF rising edges are used as trigger output 2 */
<> 161:2cc1468da177 847 #define LL_TIM_TRGO2_OC4_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0) /*!< OC4REF rising or OC6REF falling edges are used as trigger output 2 */
<> 161:2cc1468da177 848 #define LL_TIM_TRGO2_OC5_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 |TIM_CR2_MMS2_1) /*!< OC5REF or OC6REF rising edges are used as trigger output 2 */
<> 161:2cc1468da177 849 #define LL_TIM_TRGO2_OC5_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0) /*!< OC5REF rising or OC6REF falling edges are used as trigger output 2 */
<> 161:2cc1468da177 850 /**
<> 161:2cc1468da177 851 * @}
<> 161:2cc1468da177 852 */
<> 161:2cc1468da177 853
<> 161:2cc1468da177 854 /** @defgroup TIM_LL_EC_SLAVEMODE Slave Mode
<> 161:2cc1468da177 855 * @{
<> 161:2cc1468da177 856 */
<> 161:2cc1468da177 857 #define LL_TIM_SLAVEMODE_DISABLED 0x00000000U /*!< Slave mode disabled */
<> 161:2cc1468da177 858 #define LL_TIM_SLAVEMODE_RESET TIM_SMCR_SMS_2 /*!< Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter */
<> 161:2cc1468da177 859 #define LL_TIM_SLAVEMODE_GATED (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_0) /*!< Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high */
<> 161:2cc1468da177 860 #define LL_TIM_SLAVEMODE_TRIGGER (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1) /*!< Trigger Mode - The counter starts at a rising edge of the trigger TRGI */
<> 161:2cc1468da177 861 #define LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER TIM_SMCR_SMS_3 /*!< Combined reset + trigger mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter, generates an update of the registers and starts the counter */
<> 161:2cc1468da177 862 /**
<> 161:2cc1468da177 863 * @}
<> 161:2cc1468da177 864 */
<> 161:2cc1468da177 865
<> 161:2cc1468da177 866 /** @defgroup TIM_LL_EC_TS Trigger Selection
<> 161:2cc1468da177 867 * @{
<> 161:2cc1468da177 868 */
<> 161:2cc1468da177 869 #define LL_TIM_TS_ITR0 0x00000000U /*!< Internal Trigger 0 (ITR0) is used as trigger input */
<> 161:2cc1468da177 870 #define LL_TIM_TS_ITR1 TIM_SMCR_TS_0 /*!< Internal Trigger 1 (ITR1) is used as trigger input */
<> 161:2cc1468da177 871 #define LL_TIM_TS_ITR2 TIM_SMCR_TS_1 /*!< Internal Trigger 2 (ITR2) is used as trigger input */
<> 161:2cc1468da177 872 #define LL_TIM_TS_ITR3 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1) /*!< Internal Trigger 3 (ITR3) is used as trigger input */
<> 161:2cc1468da177 873 #define LL_TIM_TS_TI1F_ED TIM_SMCR_TS_2 /*!< TI1 Edge Detector (TI1F_ED) is used as trigger input */
<> 161:2cc1468da177 874 #define LL_TIM_TS_TI1FP1 (TIM_SMCR_TS_2 | TIM_SMCR_TS_0) /*!< Filtered Timer Input 1 (TI1FP1) is used as trigger input */
<> 161:2cc1468da177 875 #define LL_TIM_TS_TI2FP2 (TIM_SMCR_TS_2 | TIM_SMCR_TS_1) /*!< Filtered Timer Input 2 (TI12P2) is used as trigger input */
<> 161:2cc1468da177 876 #define LL_TIM_TS_ETRF (TIM_SMCR_TS_2 | TIM_SMCR_TS_1 | TIM_SMCR_TS_0) /*!< Filtered external Trigger (ETRF) is used as trigger input */
<> 161:2cc1468da177 877 /**
<> 161:2cc1468da177 878 * @}
<> 161:2cc1468da177 879 */
<> 161:2cc1468da177 880
<> 161:2cc1468da177 881 /** @defgroup TIM_LL_EC_ETR_POLARITY External Trigger Polarity
<> 161:2cc1468da177 882 * @{
<> 161:2cc1468da177 883 */
<> 161:2cc1468da177 884 #define LL_TIM_ETR_POLARITY_NONINVERTED 0x00000000U /*!< ETR is non-inverted, active at high level or rising edge */
<> 161:2cc1468da177 885 #define LL_TIM_ETR_POLARITY_INVERTED TIM_SMCR_ETP /*!< ETR is inverted, active at low level or falling edge */
<> 161:2cc1468da177 886 /**
<> 161:2cc1468da177 887 * @}
<> 161:2cc1468da177 888 */
<> 161:2cc1468da177 889
<> 161:2cc1468da177 890 /** @defgroup TIM_LL_EC_ETR_PRESCALER External Trigger Prescaler
<> 161:2cc1468da177 891 * @{
<> 161:2cc1468da177 892 */
<> 161:2cc1468da177 893 #define LL_TIM_ETR_PRESCALER_DIV1 0x00000000U /*!< ETR prescaler OFF */
<> 161:2cc1468da177 894 #define LL_TIM_ETR_PRESCALER_DIV2 TIM_SMCR_ETPS_0 /*!< ETR frequency is divided by 2 */
<> 161:2cc1468da177 895 #define LL_TIM_ETR_PRESCALER_DIV4 TIM_SMCR_ETPS_1 /*!< ETR frequency is divided by 4 */
<> 161:2cc1468da177 896 #define LL_TIM_ETR_PRESCALER_DIV8 TIM_SMCR_ETPS /*!< ETR frequency is divided by 8 */
<> 161:2cc1468da177 897 /**
<> 161:2cc1468da177 898 * @}
<> 161:2cc1468da177 899 */
<> 161:2cc1468da177 900
<> 161:2cc1468da177 901 /** @defgroup TIM_LL_EC_ETR_FILTER External Trigger Filter
<> 161:2cc1468da177 902 * @{
<> 161:2cc1468da177 903 */
<> 161:2cc1468da177 904 #define LL_TIM_ETR_FILTER_FDIV1 0x00000000U /*!< No filter, sampling is done at fDTS */
<> 161:2cc1468da177 905 #define LL_TIM_ETR_FILTER_FDIV1_N2 TIM_SMCR_ETF_0 /*!< fSAMPLING=fCK_INT, N=2 */
<> 161:2cc1468da177 906 #define LL_TIM_ETR_FILTER_FDIV1_N4 TIM_SMCR_ETF_1 /*!< fSAMPLING=fCK_INT, N=4 */
<> 161:2cc1468da177 907 #define LL_TIM_ETR_FILTER_FDIV1_N8 (TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fCK_INT, N=8 */
<> 161:2cc1468da177 908 #define LL_TIM_ETR_FILTER_FDIV2_N6 TIM_SMCR_ETF_2 /*!< fSAMPLING=fDTS/2, N=6 */
<> 161:2cc1468da177 909 #define LL_TIM_ETR_FILTER_FDIV2_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/2, N=8 */
<> 161:2cc1468da177 910 #define LL_TIM_ETR_FILTER_FDIV4_N6 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/4, N=6 */
<> 161:2cc1468da177 911 #define LL_TIM_ETR_FILTER_FDIV4_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/4, N=8 */
<> 161:2cc1468da177 912 #define LL_TIM_ETR_FILTER_FDIV8_N6 TIM_SMCR_ETF_3 /*!< fSAMPLING=fDTS/8, N=8 */
<> 161:2cc1468da177 913 #define LL_TIM_ETR_FILTER_FDIV8_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/16, N=5 */
<> 161:2cc1468da177 914 #define LL_TIM_ETR_FILTER_FDIV16_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/16, N=6 */
<> 161:2cc1468da177 915 #define LL_TIM_ETR_FILTER_FDIV16_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/16, N=8 */
<> 161:2cc1468da177 916 #define LL_TIM_ETR_FILTER_FDIV16_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2) /*!< fSAMPLING=fDTS/16, N=5 */
<> 161:2cc1468da177 917 #define LL_TIM_ETR_FILTER_FDIV32_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/32, N=5 */
<> 161:2cc1468da177 918 #define LL_TIM_ETR_FILTER_FDIV32_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/32, N=6 */
<> 161:2cc1468da177 919 #define LL_TIM_ETR_FILTER_FDIV32_N8 TIM_SMCR_ETF /*!< fSAMPLING=fDTS/32, N=8 */
<> 161:2cc1468da177 920 /**
<> 161:2cc1468da177 921 * @}
<> 161:2cc1468da177 922 */
<> 161:2cc1468da177 923
<> 161:2cc1468da177 924
<> 161:2cc1468da177 925 /** @defgroup TIM_LL_EC_BREAK_POLARITY break polarity
<> 161:2cc1468da177 926 * @{
<> 161:2cc1468da177 927 */
<> 161:2cc1468da177 928 #define LL_TIM_BREAK_POLARITY_LOW 0x00000000U /*!< Break input BRK is active low */
<> 161:2cc1468da177 929 #define LL_TIM_BREAK_POLARITY_HIGH TIM_BDTR_BKP /*!< Break input BRK is active high */
<> 161:2cc1468da177 930 /**
<> 161:2cc1468da177 931 * @}
<> 161:2cc1468da177 932 */
<> 161:2cc1468da177 933
<> 161:2cc1468da177 934 /** @defgroup TIM_LL_EC_BREAK_FILTER break filter
<> 161:2cc1468da177 935 * @{
<> 161:2cc1468da177 936 */
<> 161:2cc1468da177 937 #define LL_TIM_BREAK_FILTER_FDIV1 0x00000000U /*!< No filter, BRK acts asynchronously */
<> 161:2cc1468da177 938 #define LL_TIM_BREAK_FILTER_FDIV1_N2 0x00010000U /*!< fSAMPLING=fCK_INT, N=2 */
<> 161:2cc1468da177 939 #define LL_TIM_BREAK_FILTER_FDIV1_N4 0x00020000U /*!< fSAMPLING=fCK_INT, N=4 */
<> 161:2cc1468da177 940 #define LL_TIM_BREAK_FILTER_FDIV1_N8 0x00030000U /*!< fSAMPLING=fCK_INT, N=8 */
<> 161:2cc1468da177 941 #define LL_TIM_BREAK_FILTER_FDIV2_N6 0x00040000U /*!< fSAMPLING=fDTS/2, N=6 */
<> 161:2cc1468da177 942 #define LL_TIM_BREAK_FILTER_FDIV2_N8 0x00050000U /*!< fSAMPLING=fDTS/2, N=8 */
<> 161:2cc1468da177 943 #define LL_TIM_BREAK_FILTER_FDIV4_N6 0x00060000U /*!< fSAMPLING=fDTS/4, N=6 */
<> 161:2cc1468da177 944 #define LL_TIM_BREAK_FILTER_FDIV4_N8 0x00070000U /*!< fSAMPLING=fDTS/4, N=8 */
<> 161:2cc1468da177 945 #define LL_TIM_BREAK_FILTER_FDIV8_N6 0x00080000U /*!< fSAMPLING=fDTS/8, N=6 */
<> 161:2cc1468da177 946 #define LL_TIM_BREAK_FILTER_FDIV8_N8 0x00090000U /*!< fSAMPLING=fDTS/8, N=8 */
<> 161:2cc1468da177 947 #define LL_TIM_BREAK_FILTER_FDIV16_N5 0x000A0000U /*!< fSAMPLING=fDTS/16, N=5 */
<> 161:2cc1468da177 948 #define LL_TIM_BREAK_FILTER_FDIV16_N6 0x000B0000U /*!< fSAMPLING=fDTS/16, N=6 */
<> 161:2cc1468da177 949 #define LL_TIM_BREAK_FILTER_FDIV16_N8 0x000C0000U /*!< fSAMPLING=fDTS/16, N=8 */
<> 161:2cc1468da177 950 #define LL_TIM_BREAK_FILTER_FDIV32_N5 0x000D0000U /*!< fSAMPLING=fDTS/32, N=5 */
<> 161:2cc1468da177 951 #define LL_TIM_BREAK_FILTER_FDIV32_N6 0x000E0000U /*!< fSAMPLING=fDTS/32, N=6 */
<> 161:2cc1468da177 952 #define LL_TIM_BREAK_FILTER_FDIV32_N8 0x000F0000U /*!< fSAMPLING=fDTS/32, N=8 */
<> 161:2cc1468da177 953 /**
<> 161:2cc1468da177 954 * @}
<> 161:2cc1468da177 955 */
<> 161:2cc1468da177 956
<> 161:2cc1468da177 957 /** @defgroup TIM_LL_EC_BREAK2_POLARITY BREAK2 POLARITY
<> 161:2cc1468da177 958 * @{
<> 161:2cc1468da177 959 */
<> 161:2cc1468da177 960 #define LL_TIM_BREAK2_POLARITY_LOW 0x00000000U /*!< Break input BRK2 is active low */
<> 161:2cc1468da177 961 #define LL_TIM_BREAK2_POLARITY_HIGH TIM_BDTR_BK2P /*!< Break input BRK2 is active high */
<> 161:2cc1468da177 962 /**
<> 161:2cc1468da177 963 * @}
<> 161:2cc1468da177 964 */
<> 161:2cc1468da177 965
<> 161:2cc1468da177 966 /** @defgroup TIM_LL_EC_BREAK2_FILTER BREAK2 FILTER
<> 161:2cc1468da177 967 * @{
<> 161:2cc1468da177 968 */
<> 161:2cc1468da177 969 #define LL_TIM_BREAK2_FILTER_FDIV1 0x00000000U /*!< No filter, BRK acts asynchronously */
<> 161:2cc1468da177 970 #define LL_TIM_BREAK2_FILTER_FDIV1_N2 0x00100000U /*!< fSAMPLING=fCK_INT, N=2 */
<> 161:2cc1468da177 971 #define LL_TIM_BREAK2_FILTER_FDIV1_N4 0x00200000U /*!< fSAMPLING=fCK_INT, N=4 */
<> 161:2cc1468da177 972 #define LL_TIM_BREAK2_FILTER_FDIV1_N8 0x00300000U /*!< fSAMPLING=fCK_INT, N=8 */
<> 161:2cc1468da177 973 #define LL_TIM_BREAK2_FILTER_FDIV2_N6 0x00400000U /*!< fSAMPLING=fDTS/2, N=6 */
<> 161:2cc1468da177 974 #define LL_TIM_BREAK2_FILTER_FDIV2_N8 0x00500000U /*!< fSAMPLING=fDTS/2, N=8 */
<> 161:2cc1468da177 975 #define LL_TIM_BREAK2_FILTER_FDIV4_N6 0x00600000U /*!< fSAMPLING=fDTS/4, N=6 */
<> 161:2cc1468da177 976 #define LL_TIM_BREAK2_FILTER_FDIV4_N8 0x00700000U /*!< fSAMPLING=fDTS/4, N=8 */
<> 161:2cc1468da177 977 #define LL_TIM_BREAK2_FILTER_FDIV8_N6 0x00800000U /*!< fSAMPLING=fDTS/8, N=6 */
<> 161:2cc1468da177 978 #define LL_TIM_BREAK2_FILTER_FDIV8_N8 0x00900000U /*!< fSAMPLING=fDTS/8, N=8 */
<> 161:2cc1468da177 979 #define LL_TIM_BREAK2_FILTER_FDIV16_N5 0x00A00000U /*!< fSAMPLING=fDTS/16, N=5 */
<> 161:2cc1468da177 980 #define LL_TIM_BREAK2_FILTER_FDIV16_N6 0x00B00000U /*!< fSAMPLING=fDTS/16, N=6 */
<> 161:2cc1468da177 981 #define LL_TIM_BREAK2_FILTER_FDIV16_N8 0x00C00000U /*!< fSAMPLING=fDTS/16, N=8 */
<> 161:2cc1468da177 982 #define LL_TIM_BREAK2_FILTER_FDIV32_N5 0x00D00000U /*!< fSAMPLING=fDTS/32, N=5 */
<> 161:2cc1468da177 983 #define LL_TIM_BREAK2_FILTER_FDIV32_N6 0x00E00000U /*!< fSAMPLING=fDTS/32, N=6 */
<> 161:2cc1468da177 984 #define LL_TIM_BREAK2_FILTER_FDIV32_N8 0x00F00000U /*!< fSAMPLING=fDTS/32, N=8 */
<> 161:2cc1468da177 985 /**
<> 161:2cc1468da177 986 * @}
<> 161:2cc1468da177 987 */
<> 161:2cc1468da177 988
<> 161:2cc1468da177 989 /** @defgroup TIM_LL_EC_OSSI OSSI
<> 161:2cc1468da177 990 * @{
<> 161:2cc1468da177 991 */
<> 161:2cc1468da177 992 #define LL_TIM_OSSI_DISABLE 0x00000000U /*!< When inactive, OCx/OCxN outputs are disabled */
<> 161:2cc1468da177 993 #define LL_TIM_OSSI_ENABLE TIM_BDTR_OSSI /*!< When inactive, OxC/OCxN outputs are first forced with their inactive level then forced to their idle level after the deadtime */
<> 161:2cc1468da177 994 /**
<> 161:2cc1468da177 995 * @}
<> 161:2cc1468da177 996 */
<> 161:2cc1468da177 997
<> 161:2cc1468da177 998 /** @defgroup TIM_LL_EC_OSSR OSSR
<> 161:2cc1468da177 999 * @{
<> 161:2cc1468da177 1000 */
<> 161:2cc1468da177 1001 #define LL_TIM_OSSR_DISABLE 0x00000000U /*!< When inactive, OCx/OCxN outputs are disabled */
<> 161:2cc1468da177 1002 #define LL_TIM_OSSR_ENABLE TIM_BDTR_OSSR /*!< When inactive, OC/OCN outputs are enabled with their inactive level as soon as CCxE=1 or CCxNE=1 */
<> 161:2cc1468da177 1003 /**
<> 161:2cc1468da177 1004 * @}
<> 161:2cc1468da177 1005 */
<> 161:2cc1468da177 1006
<> 161:2cc1468da177 1007 #if defined(TIM_BREAK_INPUT_SUPPORT)
<> 161:2cc1468da177 1008 /** @defgroup TIM_LL_EC_BREAK_INPUT BREAK INPUT
<> 161:2cc1468da177 1009 * @{
<> 161:2cc1468da177 1010 */
<> 161:2cc1468da177 1011 #define LL_TIM_BREAK_INPUT_BKIN 0x00000000U /*!< TIMx_BKIN input */
<> 161:2cc1468da177 1012 #define LL_TIM_BREAK_INPUT_BKIN2 0x00000004U /*!< TIMx_BKIN2 input */
<> 161:2cc1468da177 1013 /**
<> 161:2cc1468da177 1014 * @}
<> 161:2cc1468da177 1015 */
<> 161:2cc1468da177 1016
<> 161:2cc1468da177 1017 /** @defgroup TIM_LL_EC_BKIN_SOURCE BKIN SOURCE
<> 161:2cc1468da177 1018 * @{
<> 161:2cc1468da177 1019 */
<> 161:2cc1468da177 1020 #define LL_TIM_BKIN_SOURCE_BKIN TIM1_AF1_BKINE /*!< BKIN input from AF controller */
<> 161:2cc1468da177 1021 #define LL_TIM_BKIN_SOURCE_DF1BK TIM1_AF1_BKDF1BKE /*!< internal signal: DFSDM1 break output */
<> 161:2cc1468da177 1022 /**
<> 161:2cc1468da177 1023 * @}
<> 161:2cc1468da177 1024 */
<> 161:2cc1468da177 1025
<> 161:2cc1468da177 1026 /** @defgroup TIM_LL_EC_BKIN_POLARITY BKIN POLARITY
<> 161:2cc1468da177 1027 * @{
<> 161:2cc1468da177 1028 */
<> 161:2cc1468da177 1029 #define LL_TIM_BKIN_POLARITY_LOW TIM1_AF1_BKINP /*!< BRK BKIN input is active low */
<> 161:2cc1468da177 1030 #define LL_TIM_BKIN_POLARITY_HIGH 0x00000000U /*!< BRK BKIN input is active high */
<> 161:2cc1468da177 1031 /**
<> 161:2cc1468da177 1032 * @}
<> 161:2cc1468da177 1033 */
<> 161:2cc1468da177 1034 #endif /* TIM_BREAK_INPUT_SUPPORT */
<> 161:2cc1468da177 1035
<> 161:2cc1468da177 1036 /** @defgroup TIM_LL_EC_DMABURST_BASEADDR DMA Burst Base Address
<> 161:2cc1468da177 1037 * @{
<> 161:2cc1468da177 1038 */
<> 161:2cc1468da177 1039 #define LL_TIM_DMABURST_BASEADDR_CR1 0x00000000U /*!< TIMx_CR1 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1040 #define LL_TIM_DMABURST_BASEADDR_CR2 TIM_DCR_DBA_0 /*!< TIMx_CR2 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1041 #define LL_TIM_DMABURST_BASEADDR_SMCR TIM_DCR_DBA_1 /*!< TIMx_SMCR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1042 #define LL_TIM_DMABURST_BASEADDR_DIER (TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_DIER register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1043 #define LL_TIM_DMABURST_BASEADDR_SR TIM_DCR_DBA_2 /*!< TIMx_SR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1044 #define LL_TIM_DMABURST_BASEADDR_EGR (TIM_DCR_DBA_2 | TIM_DCR_DBA_0) /*!< TIMx_EGR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1045 #define LL_TIM_DMABURST_BASEADDR_CCMR1 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1) /*!< TIMx_CCMR1 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1046 #define LL_TIM_DMABURST_BASEADDR_CCMR2 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCMR2 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1047 #define LL_TIM_DMABURST_BASEADDR_CCER TIM_DCR_DBA_3 /*!< TIMx_CCER register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1048 #define LL_TIM_DMABURST_BASEADDR_CNT (TIM_DCR_DBA_3 | TIM_DCR_DBA_0) /*!< TIMx_CNT register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1049 #define LL_TIM_DMABURST_BASEADDR_PSC (TIM_DCR_DBA_3 | TIM_DCR_DBA_1) /*!< TIMx_PSC register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1050 #define LL_TIM_DMABURST_BASEADDR_ARR (TIM_DCR_DBA_3 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_ARR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1051 #define LL_TIM_DMABURST_BASEADDR_RCR (TIM_DCR_DBA_3 | TIM_DCR_DBA_2) /*!< TIMx_RCR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1052 #define LL_TIM_DMABURST_BASEADDR_CCR1 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0) /*!< TIMx_CCR1 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1053 #define LL_TIM_DMABURST_BASEADDR_CCR2 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1) /*!< TIMx_CCR2 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1054 #define LL_TIM_DMABURST_BASEADDR_CCR3 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCR3 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1055 #define LL_TIM_DMABURST_BASEADDR_CCR4 TIM_DCR_DBA_4 /*!< TIMx_CCR4 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1056 #define LL_TIM_DMABURST_BASEADDR_BDTR (TIM_DCR_DBA_4 | TIM_DCR_DBA_0) /*!< TIMx_BDTR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1057 #define LL_TIM_DMABURST_BASEADDR_CCMR3 (TIM_DCR_DBA_4 | TIM_DCR_DBA_1) /*!< TIMx_CCMR3 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1058 #define LL_TIM_DMABURST_BASEADDR_CCR5 (TIM_DCR_DBA_4 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCR5 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1059 #define LL_TIM_DMABURST_BASEADDR_CCR6 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2) /*!< TIMx_CCR6 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1060 #define LL_TIM_DMABURST_BASEADDR_OR (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0) /*!< TIMx_OR register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1061 #define LL_TIM_DMABURST_BASEADDR_AF1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1) /*!< TIMx_AF1 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1062 #define LL_TIM_DMABURST_BASEADDR_AF2 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_AF2 register is the DMA base address for DMA burst */
<> 161:2cc1468da177 1063
<> 161:2cc1468da177 1064 /**
<> 161:2cc1468da177 1065 * @}
<> 161:2cc1468da177 1066 */
<> 161:2cc1468da177 1067
<> 161:2cc1468da177 1068 /** @defgroup TIM_LL_EC_DMABURST_LENGTH DMA Burst Length
<> 161:2cc1468da177 1069 * @{
<> 161:2cc1468da177 1070 */
<> 161:2cc1468da177 1071 #define LL_TIM_DMABURST_LENGTH_1TRANSFER 0x00000000U /*!< Transfer is done to 1 register starting from the DMA burst base address */
<> 161:2cc1468da177 1072 #define LL_TIM_DMABURST_LENGTH_2TRANSFERS TIM_DCR_DBL_0 /*!< Transfer is done to 2 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1073 #define LL_TIM_DMABURST_LENGTH_3TRANSFERS TIM_DCR_DBL_1 /*!< Transfer is done to 3 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1074 #define LL_TIM_DMABURST_LENGTH_4TRANSFERS (TIM_DCR_DBL_1 | TIM_DCR_DBL_0) /*!< Transfer is done to 4 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1075 #define LL_TIM_DMABURST_LENGTH_5TRANSFERS TIM_DCR_DBL_2 /*!< Transfer is done to 5 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1076 #define LL_TIM_DMABURST_LENGTH_6TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_0) /*!< Transfer is done to 6 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1077 #define LL_TIM_DMABURST_LENGTH_7TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1) /*!< Transfer is done to 7 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1078 #define LL_TIM_DMABURST_LENGTH_8TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0) /*!< Transfer is done to 1 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1079 #define LL_TIM_DMABURST_LENGTH_9TRANSFERS TIM_DCR_DBL_3 /*!< Transfer is done to 9 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1080 #define LL_TIM_DMABURST_LENGTH_10TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_0) /*!< Transfer is done to 10 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1081 #define LL_TIM_DMABURST_LENGTH_11TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1) /*!< Transfer is done to 11 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1082 #define LL_TIM_DMABURST_LENGTH_12TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0) /*!< Transfer is done to 12 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1083 #define LL_TIM_DMABURST_LENGTH_13TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2) /*!< Transfer is done to 13 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1084 #define LL_TIM_DMABURST_LENGTH_14TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_0) /*!< Transfer is done to 14 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1085 #define LL_TIM_DMABURST_LENGTH_15TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1) /*!< Transfer is done to 15 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1086 #define LL_TIM_DMABURST_LENGTH_16TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0) /*!< Transfer is done to 16 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1087 #define LL_TIM_DMABURST_LENGTH_17TRANSFERS TIM_DCR_DBL_4 /*!< Transfer is done to 17 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1088 #define LL_TIM_DMABURST_LENGTH_18TRANSFERS (TIM_DCR_DBL_4 | TIM_DCR_DBL_0) /*!< Transfer is done to 18 registers starting from the DMA burst base address */
<> 161:2cc1468da177 1089 /**
<> 161:2cc1468da177 1090 * @}
<> 161:2cc1468da177 1091 */
<> 161:2cc1468da177 1092
<> 161:2cc1468da177 1093
<> 161:2cc1468da177 1094 /** @defgroup TIM_LL_EC_TIM2_ITR1_RMP_TIM8 TIM2 Internal Trigger1 Remap TIM8
<> 161:2cc1468da177 1095 * @{
<> 161:2cc1468da177 1096 */
<> 161:2cc1468da177 1097 #define LL_TIM_TIM2_ITR1_RMP_TIM8_TRGO TIM2_OR_RMP_MASK /*!< TIM2_ITR1 is connected to TIM8_TRGO */
<> 161:2cc1468da177 1098 #define LL_TIM_TIM2_ITR1_RMP_ETH_PTP (TIM2_OR_ITR1_RMP_0 | TIM2_OR_RMP_MASK) /*!< TIM2_ITR1 is connected to ETH_PTP */
<> 161:2cc1468da177 1099 #define LL_TIM_TIM2_ITR1_RMP_OTG_FS_SOF (TIM2_OR_ITR1_RMP_1 | TIM2_OR_RMP_MASK) /*!< TIM2_ITR1 is connected to OTG_FS SOF */
<> 161:2cc1468da177 1100 #define LL_TIM_TIM2_ITR1_RMP_OTG_HS_SOF (TIM2_OR_ITR1_RMP | TIM2_OR_RMP_MASK) /*!< TIM2_ITR1 is connected to OTG_HS SOF */
<> 161:2cc1468da177 1101 /**
<> 161:2cc1468da177 1102 * @}
<> 161:2cc1468da177 1103 */
<> 161:2cc1468da177 1104
<> 161:2cc1468da177 1105 /** @defgroup TIM_LL_EC_TIM5_TI4_RMP TIM5 External Input Ch4 Remap
<> 161:2cc1468da177 1106 * @{
<> 161:2cc1468da177 1107 */
<> 161:2cc1468da177 1108 #define LL_TIM_TIM5_TI4_RMP_GPIO TIM5_OR_RMP_MASK /*!< TIM5 channel 4 is connected to GPIO */
<> 161:2cc1468da177 1109 #define LL_TIM_TIM5_TI4_RMP_LSI (TIM5_OR_TI4_RMP_0 | TIM5_OR_RMP_MASK) /*!< TIM5 channel 4 is connected to LSI internal clock */
<> 161:2cc1468da177 1110 #define LL_TIM_TIM5_TI4_RMP_LSE (TIM5_OR_TI4_RMP_1 | TIM5_OR_RMP_MASK) /*!< TIM5 channel 4 is connected to LSE */
<> 161:2cc1468da177 1111 #define LL_TIM_TIM5_TI4_RMP_RTC (TIM5_OR_TI4_RMP | TIM5_OR_RMP_MASK) /*!< TIM5 channel 4 is connected to RTC wakeup interrupt */
<> 161:2cc1468da177 1112 /**
<> 161:2cc1468da177 1113 * @}
<> 161:2cc1468da177 1114 */
<> 161:2cc1468da177 1115
<> 161:2cc1468da177 1116 /** @defgroup TIM_LL_EC_TIM11_TI1_RMP TIM11 External Input Capture 1 Remap
<> 161:2cc1468da177 1117 * @{
<> 161:2cc1468da177 1118 */
<> 161:2cc1468da177 1119 #define LL_TIM_TIM11_TI1_RMP_GPIO TIM11_OR_RMP_MASK /*!< TIM11 channel 1 is connected to GPIO */
<> 161:2cc1468da177 1120 #define LL_TIM_TIM11_TI1_RMP_SPDIFRX (TIM11_OR_TI1_RMP_0 | TIM11_OR_RMP_MASK) /*!< TIM11 channel 1 is connected to SPDIFRX */
<> 161:2cc1468da177 1121 #define LL_TIM_TIM11_TI1_RMP_HSE (TIM11_OR_TI1_RMP_1 | TIM11_OR_RMP_MASK) /*!< TIM11 channel 1 is connected to HSE */
<> 161:2cc1468da177 1122 #define LL_TIM_TIM11_TI1_RMP_MCO1 (TIM11_OR_TI1_RMP | TIM11_OR_RMP_MASK) /*!< TIM11 channel 1 is connected to MCO1 */
<> 161:2cc1468da177 1123 /**
<> 161:2cc1468da177 1124 * @}
<> 161:2cc1468da177 1125 */
<> 161:2cc1468da177 1126
<> 161:2cc1468da177 1127 /**
<> 161:2cc1468da177 1128 * @}
<> 161:2cc1468da177 1129 */
<> 161:2cc1468da177 1130
<> 161:2cc1468da177 1131
<> 161:2cc1468da177 1132 /**
<> 161:2cc1468da177 1133 * @}
<> 161:2cc1468da177 1134 */
<> 161:2cc1468da177 1135
<> 161:2cc1468da177 1136 /* Exported macro ------------------------------------------------------------*/
<> 161:2cc1468da177 1137 /** @defgroup TIM_LL_Exported_Macros TIM Exported Macros
<> 161:2cc1468da177 1138 * @{
<> 161:2cc1468da177 1139 */
<> 161:2cc1468da177 1140
<> 161:2cc1468da177 1141 /** @defgroup TIM_LL_EM_WRITE_READ Common Write and read registers Macros
<> 161:2cc1468da177 1142 * @{
<> 161:2cc1468da177 1143 */
<> 161:2cc1468da177 1144 /**
<> 161:2cc1468da177 1145 * @brief Write a value in TIM register.
<> 161:2cc1468da177 1146 * @param __INSTANCE__ TIM Instance
<> 161:2cc1468da177 1147 * @param __REG__ Register to be written
<> 161:2cc1468da177 1148 * @param __VALUE__ Value to be written in the register
<> 161:2cc1468da177 1149 * @retval None
<> 161:2cc1468da177 1150 */
<> 161:2cc1468da177 1151 #define LL_TIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
<> 161:2cc1468da177 1152
<> 161:2cc1468da177 1153 /**
<> 161:2cc1468da177 1154 * @brief Read a value in TIM register.
<> 161:2cc1468da177 1155 * @param __INSTANCE__ TIM Instance
<> 161:2cc1468da177 1156 * @param __REG__ Register to be read
<> 161:2cc1468da177 1157 * @retval Register value
<> 161:2cc1468da177 1158 */
<> 161:2cc1468da177 1159 #define LL_TIM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
<> 161:2cc1468da177 1160 /**
<> 161:2cc1468da177 1161 * @}
<> 161:2cc1468da177 1162 */
<> 161:2cc1468da177 1163
<> 161:2cc1468da177 1164 /** @defgroup TIM_LL_EM_Exported_Macros Exported_Macros
<> 161:2cc1468da177 1165 * @{
<> 161:2cc1468da177 1166 */
<> 161:2cc1468da177 1167 /**
<> 161:2cc1468da177 1168 * @brief HELPER macro retrieving the UIFCPY flag from the counter value.
<> 161:2cc1468da177 1169 * @note ex: @ref __LL_TIM_GETFLAG_UIFCPY (@ref LL_TIM_GetCounter ());
<> 161:2cc1468da177 1170 * @note Relevant only if UIF flag remapping has been enabled (UIF status bit is copied
<> 161:2cc1468da177 1171 * to TIMx_CNT register bit 31)
<> 161:2cc1468da177 1172 * @param __CNT__ Counter value
<> 161:2cc1468da177 1173 * @retval UIF status bit
<> 161:2cc1468da177 1174 */
<> 161:2cc1468da177 1175 #define __LL_TIM_GETFLAG_UIFCPY(__CNT__) \
<> 161:2cc1468da177 1176 (READ_BIT((__CNT__), TIM_CNT_UIFCPY) >> TIM_CNT_UIFCPY_Pos)
<> 161:2cc1468da177 1177
<> 161:2cc1468da177 1178 /**
<> 161:2cc1468da177 1179 * @brief HELPER macro calculating DTG[0:7] in the TIMx_BDTR register to achieve the requested dead time duration.
<> 161:2cc1468da177 1180 * @note ex: @ref __LL_TIM_CALC_DEADTIME (80000000, @ref LL_TIM_GetClockDivision (), 120);
<> 161:2cc1468da177 1181 * @param __TIMCLK__ timer input clock frequency (in Hz)
<> 161:2cc1468da177 1182 * @param __CKD__ This parameter can be one of the following values:
<> 161:2cc1468da177 1183 * @arg @ref LL_TIM_CLOCKDIVISION_DIV1
<> 161:2cc1468da177 1184 * @arg @ref LL_TIM_CLOCKDIVISION_DIV2
<> 161:2cc1468da177 1185 * @arg @ref LL_TIM_CLOCKDIVISION_DIV4
<> 161:2cc1468da177 1186 * @param __DT__ deadtime duration (in ns)
<> 161:2cc1468da177 1187 * @retval DTG[0:7]
<> 161:2cc1468da177 1188 */
<> 161:2cc1468da177 1189 #define __LL_TIM_CALC_DEADTIME(__TIMCLK__, __CKD__, __DT__) \
<> 161:2cc1468da177 1190 ( (((uint64_t)((__DT__)*1000U)) < ((DT_DELAY_1+1U) * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(((uint64_t)((__DT__)*1000U) / TIM_CALC_DTS((__TIMCLK__), (__CKD__))) & DT_DELAY_1) : \
<> 161:2cc1468da177 1191 (((uint64_t)((__DT__)*1000U)) < (64U + (DT_DELAY_2+1U)) * 2U * TIM_CALC_DTS((__TIMCLK__), (__CKD__))) ? (uint8_t)(DT_RANGE_2 | ((uint8_t)((uint8_t)((((uint64_t)((__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 1U) - (uint8_t) 64U) & DT_DELAY_2)) :\
<> 161:2cc1468da177 1192 (((uint64_t)((__DT__)*1000U)) < (32U + (DT_DELAY_3+1U)) * 8U * TIM_CALC_DTS((__TIMCLK__), (__CKD__))) ? (uint8_t)(DT_RANGE_3 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 3U) - (uint8_t) 32U) & DT_DELAY_3)) :\
<> 161:2cc1468da177 1193 (((uint64_t)((__DT__)*1000U)) < (32U + (DT_DELAY_4+1U)) * 16U * TIM_CALC_DTS((__TIMCLK__), (__CKD__))) ? (uint8_t)(DT_RANGE_4 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 4U) - (uint8_t) 32U) & DT_DELAY_4)) :\
<> 161:2cc1468da177 1194 0U)
<> 161:2cc1468da177 1195
<> 161:2cc1468da177 1196 /**
<> 161:2cc1468da177 1197 * @brief HELPER macro calculating the prescaler value to achieve the required counter clock frequency.
<> 161:2cc1468da177 1198 * @note ex: @ref __LL_TIM_CALC_PSC (80000000, 1000000);
<> 161:2cc1468da177 1199 * @param __TIMCLK__ timer input clock frequency (in Hz)
<> 161:2cc1468da177 1200 * @param __CNTCLK__ counter clock frequency (in Hz)
<> 161:2cc1468da177 1201 * @retval Prescaler value (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 1202 */
<> 161:2cc1468da177 1203 #define __LL_TIM_CALC_PSC(__TIMCLK__, __CNTCLK__) \
<> 161:2cc1468da177 1204 ((__TIMCLK__) >= (__CNTCLK__)) ? (uint32_t)((__TIMCLK__)/(__CNTCLK__) - 1U) : 0U
<> 161:2cc1468da177 1205
<> 161:2cc1468da177 1206 /**
<> 161:2cc1468da177 1207 * @brief HELPER macro calculating the auto-reload value to achieve the required output signal frequency.
<> 161:2cc1468da177 1208 * @note ex: @ref __LL_TIM_CALC_ARR (1000000, @ref LL_TIM_GetPrescaler (), 10000);
<> 161:2cc1468da177 1209 * @param __TIMCLK__ timer input clock frequency (in Hz)
<> 161:2cc1468da177 1210 * @param __PSC__ prescaler
<> 161:2cc1468da177 1211 * @param __FREQ__ output signal frequency (in Hz)
<> 161:2cc1468da177 1212 * @retval Auto-reload value (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 1213 */
<> 161:2cc1468da177 1214 #define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \
<> 161:2cc1468da177 1215 (((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? ((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U)) - 1U) : 0U
<> 161:2cc1468da177 1216
<> 161:2cc1468da177 1217 /**
<> 161:2cc1468da177 1218 * @brief HELPER macro calculating the compare value required to achieve the required timer output compare active/inactive delay.
<> 161:2cc1468da177 1219 * @note ex: @ref __LL_TIM_CALC_DELAY (1000000, @ref LL_TIM_GetPrescaler (), 10);
<> 161:2cc1468da177 1220 * @param __TIMCLK__ timer input clock frequency (in Hz)
<> 161:2cc1468da177 1221 * @param __PSC__ prescaler
<> 161:2cc1468da177 1222 * @param __DELAY__ timer output compare active/inactive delay (in us)
<> 161:2cc1468da177 1223 * @retval Compare value (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 1224 */
<> 161:2cc1468da177 1225 #define __LL_TIM_CALC_DELAY(__TIMCLK__, __PSC__, __DELAY__) \
<> 161:2cc1468da177 1226 ((uint32_t)(((uint64_t)(__TIMCLK__) * (uint64_t)(__DELAY__)) \
<> 161:2cc1468da177 1227 / ((uint64_t)1000000U * (uint64_t)((__PSC__) + 1U))))
<> 161:2cc1468da177 1228
<> 161:2cc1468da177 1229 /**
<> 161:2cc1468da177 1230 * @brief HELPER macro calculating the auto-reload value to achieve the required pulse duration (when the timer operates in one pulse mode).
<> 161:2cc1468da177 1231 * @note ex: @ref __LL_TIM_CALC_PULSE (1000000, @ref LL_TIM_GetPrescaler (), 10, 20);
<> 161:2cc1468da177 1232 * @param __TIMCLK__ timer input clock frequency (in Hz)
<> 161:2cc1468da177 1233 * @param __PSC__ prescaler
<> 161:2cc1468da177 1234 * @param __DELAY__ timer output compare active/inactive delay (in us)
<> 161:2cc1468da177 1235 * @param __PULSE__ pulse duration (in us)
<> 161:2cc1468da177 1236 * @retval Auto-reload value (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 1237 */
<> 161:2cc1468da177 1238 #define __LL_TIM_CALC_PULSE(__TIMCLK__, __PSC__, __DELAY__, __PULSE__) \
<> 161:2cc1468da177 1239 ((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
<> 161:2cc1468da177 1240 + __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
<> 161:2cc1468da177 1241
<> 161:2cc1468da177 1242 /**
<> 161:2cc1468da177 1243 * @brief HELPER macro retrieving the ratio of the input capture prescaler
<> 161:2cc1468da177 1244 * @note ex: @ref __LL_TIM_GET_ICPSC_RATIO (@ref LL_TIM_IC_GetPrescaler ());
<> 161:2cc1468da177 1245 * @param __ICPSC__ This parameter can be one of the following values:
<> 161:2cc1468da177 1246 * @arg @ref LL_TIM_ICPSC_DIV1
<> 161:2cc1468da177 1247 * @arg @ref LL_TIM_ICPSC_DIV2
<> 161:2cc1468da177 1248 * @arg @ref LL_TIM_ICPSC_DIV4
<> 161:2cc1468da177 1249 * @arg @ref LL_TIM_ICPSC_DIV8
<> 161:2cc1468da177 1250 * @retval Input capture prescaler ratio (1, 2, 4 or 8)
<> 161:2cc1468da177 1251 */
<> 161:2cc1468da177 1252 #define __LL_TIM_GET_ICPSC_RATIO(__ICPSC__) \
<> 161:2cc1468da177 1253 ((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
<> 161:2cc1468da177 1254
<> 161:2cc1468da177 1255
<> 161:2cc1468da177 1256 /**
<> 161:2cc1468da177 1257 * @}
<> 161:2cc1468da177 1258 */
<> 161:2cc1468da177 1259
<> 161:2cc1468da177 1260
<> 161:2cc1468da177 1261 /**
<> 161:2cc1468da177 1262 * @}
<> 161:2cc1468da177 1263 */
<> 161:2cc1468da177 1264
<> 161:2cc1468da177 1265 /* Exported functions --------------------------------------------------------*/
<> 161:2cc1468da177 1266 /** @defgroup TIM_LL_Exported_Functions TIM Exported Functions
<> 161:2cc1468da177 1267 * @{
<> 161:2cc1468da177 1268 */
<> 161:2cc1468da177 1269
<> 161:2cc1468da177 1270 /** @defgroup TIM_LL_EF_Time_Base Time Base configuration
<> 161:2cc1468da177 1271 * @{
<> 161:2cc1468da177 1272 */
<> 161:2cc1468da177 1273 /**
<> 161:2cc1468da177 1274 * @brief Enable timer counter.
<> 161:2cc1468da177 1275 * @rmtoll CR1 CEN LL_TIM_EnableCounter
<> 161:2cc1468da177 1276 * @param TIMx Timer instance
<> 161:2cc1468da177 1277 * @retval None
<> 161:2cc1468da177 1278 */
<> 161:2cc1468da177 1279 __STATIC_INLINE void LL_TIM_EnableCounter(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1280 {
<> 161:2cc1468da177 1281 SET_BIT(TIMx->CR1, TIM_CR1_CEN);
<> 161:2cc1468da177 1282 }
<> 161:2cc1468da177 1283
<> 161:2cc1468da177 1284 /**
<> 161:2cc1468da177 1285 * @brief Disable timer counter.
<> 161:2cc1468da177 1286 * @rmtoll CR1 CEN LL_TIM_DisableCounter
<> 161:2cc1468da177 1287 * @param TIMx Timer instance
<> 161:2cc1468da177 1288 * @retval None
<> 161:2cc1468da177 1289 */
<> 161:2cc1468da177 1290 __STATIC_INLINE void LL_TIM_DisableCounter(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1291 {
<> 161:2cc1468da177 1292 CLEAR_BIT(TIMx->CR1, TIM_CR1_CEN);
<> 161:2cc1468da177 1293 }
<> 161:2cc1468da177 1294
<> 161:2cc1468da177 1295 /**
<> 161:2cc1468da177 1296 * @brief Indicates whether the timer counter is enabled.
<> 161:2cc1468da177 1297 * @rmtoll CR1 CEN LL_TIM_IsEnabledCounter
<> 161:2cc1468da177 1298 * @param TIMx Timer instance
<> 161:2cc1468da177 1299 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 1300 */
<> 161:2cc1468da177 1301 __STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1302 {
<> 161:2cc1468da177 1303 return (READ_BIT(TIMx->CR1, TIM_CR1_CEN) == (TIM_CR1_CEN));
<> 161:2cc1468da177 1304 }
<> 161:2cc1468da177 1305
<> 161:2cc1468da177 1306 /**
<> 161:2cc1468da177 1307 * @brief Enable update event generation.
<> 161:2cc1468da177 1308 * @rmtoll CR1 UDIS LL_TIM_EnableUpdateEvent
<> 161:2cc1468da177 1309 * @param TIMx Timer instance
<> 161:2cc1468da177 1310 * @retval None
<> 161:2cc1468da177 1311 */
<> 161:2cc1468da177 1312 __STATIC_INLINE void LL_TIM_EnableUpdateEvent(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1313 {
AnnaBridge 182:a56a73fd2a6f 1314 CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
<> 161:2cc1468da177 1315 }
<> 161:2cc1468da177 1316
<> 161:2cc1468da177 1317 /**
<> 161:2cc1468da177 1318 * @brief Disable update event generation.
<> 161:2cc1468da177 1319 * @rmtoll CR1 UDIS LL_TIM_DisableUpdateEvent
<> 161:2cc1468da177 1320 * @param TIMx Timer instance
<> 161:2cc1468da177 1321 * @retval None
<> 161:2cc1468da177 1322 */
<> 161:2cc1468da177 1323 __STATIC_INLINE void LL_TIM_DisableUpdateEvent(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1324 {
AnnaBridge 182:a56a73fd2a6f 1325 SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
<> 161:2cc1468da177 1326 }
<> 161:2cc1468da177 1327
<> 161:2cc1468da177 1328 /**
<> 161:2cc1468da177 1329 * @brief Indicates whether update event generation is enabled.
<> 161:2cc1468da177 1330 * @rmtoll CR1 UDIS LL_TIM_IsEnabledUpdateEvent
<> 161:2cc1468da177 1331 * @param TIMx Timer instance
<> 161:2cc1468da177 1332 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 1333 */
<> 161:2cc1468da177 1334 __STATIC_INLINE uint32_t LL_TIM_IsEnabledUpdateEvent(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1335 {
<> 161:2cc1468da177 1336 return (READ_BIT(TIMx->CR1, TIM_CR1_UDIS) == (TIM_CR1_UDIS));
<> 161:2cc1468da177 1337 }
<> 161:2cc1468da177 1338
<> 161:2cc1468da177 1339 /**
<> 161:2cc1468da177 1340 * @brief Set update event source
<> 161:2cc1468da177 1341 * @note Update event source set to LL_TIM_UPDATESOURCE_REGULAR: any of the following events
<> 161:2cc1468da177 1342 * generate an update interrupt or DMA request if enabled:
<> 161:2cc1468da177 1343 * - Counter overflow/underflow
<> 161:2cc1468da177 1344 * - Setting the UG bit
<> 161:2cc1468da177 1345 * - Update generation through the slave mode controller
<> 161:2cc1468da177 1346 * @note Update event source set to LL_TIM_UPDATESOURCE_COUNTER: only counter
<> 161:2cc1468da177 1347 * overflow/underflow generates an update interrupt or DMA request if enabled.
<> 161:2cc1468da177 1348 * @rmtoll CR1 URS LL_TIM_SetUpdateSource
<> 161:2cc1468da177 1349 * @param TIMx Timer instance
<> 161:2cc1468da177 1350 * @param UpdateSource This parameter can be one of the following values:
<> 161:2cc1468da177 1351 * @arg @ref LL_TIM_UPDATESOURCE_REGULAR
<> 161:2cc1468da177 1352 * @arg @ref LL_TIM_UPDATESOURCE_COUNTER
<> 161:2cc1468da177 1353 * @retval None
<> 161:2cc1468da177 1354 */
<> 161:2cc1468da177 1355 __STATIC_INLINE void LL_TIM_SetUpdateSource(TIM_TypeDef *TIMx, uint32_t UpdateSource)
<> 161:2cc1468da177 1356 {
<> 161:2cc1468da177 1357 MODIFY_REG(TIMx->CR1, TIM_CR1_URS, UpdateSource);
<> 161:2cc1468da177 1358 }
<> 161:2cc1468da177 1359
<> 161:2cc1468da177 1360 /**
<> 161:2cc1468da177 1361 * @brief Get actual event update source
<> 161:2cc1468da177 1362 * @rmtoll CR1 URS LL_TIM_GetUpdateSource
<> 161:2cc1468da177 1363 * @param TIMx Timer instance
<> 161:2cc1468da177 1364 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1365 * @arg @ref LL_TIM_UPDATESOURCE_REGULAR
<> 161:2cc1468da177 1366 * @arg @ref LL_TIM_UPDATESOURCE_COUNTER
<> 161:2cc1468da177 1367 */
<> 161:2cc1468da177 1368 __STATIC_INLINE uint32_t LL_TIM_GetUpdateSource(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1369 {
<> 161:2cc1468da177 1370 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_URS));
<> 161:2cc1468da177 1371 }
<> 161:2cc1468da177 1372
<> 161:2cc1468da177 1373 /**
<> 161:2cc1468da177 1374 * @brief Set one pulse mode (one shot v.s. repetitive).
<> 161:2cc1468da177 1375 * @rmtoll CR1 OPM LL_TIM_SetOnePulseMode
<> 161:2cc1468da177 1376 * @param TIMx Timer instance
<> 161:2cc1468da177 1377 * @param OnePulseMode This parameter can be one of the following values:
<> 161:2cc1468da177 1378 * @arg @ref LL_TIM_ONEPULSEMODE_SINGLE
<> 161:2cc1468da177 1379 * @arg @ref LL_TIM_ONEPULSEMODE_REPETITIVE
<> 161:2cc1468da177 1380 * @retval None
<> 161:2cc1468da177 1381 */
<> 161:2cc1468da177 1382 __STATIC_INLINE void LL_TIM_SetOnePulseMode(TIM_TypeDef *TIMx, uint32_t OnePulseMode)
<> 161:2cc1468da177 1383 {
<> 161:2cc1468da177 1384 MODIFY_REG(TIMx->CR1, TIM_CR1_OPM, OnePulseMode);
<> 161:2cc1468da177 1385 }
<> 161:2cc1468da177 1386
<> 161:2cc1468da177 1387 /**
<> 161:2cc1468da177 1388 * @brief Get actual one pulse mode.
<> 161:2cc1468da177 1389 * @rmtoll CR1 OPM LL_TIM_GetOnePulseMode
<> 161:2cc1468da177 1390 * @param TIMx Timer instance
<> 161:2cc1468da177 1391 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1392 * @arg @ref LL_TIM_ONEPULSEMODE_SINGLE
<> 161:2cc1468da177 1393 * @arg @ref LL_TIM_ONEPULSEMODE_REPETITIVE
<> 161:2cc1468da177 1394 */
<> 161:2cc1468da177 1395 __STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1396 {
<> 161:2cc1468da177 1397 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_OPM));
<> 161:2cc1468da177 1398 }
<> 161:2cc1468da177 1399
<> 161:2cc1468da177 1400 /**
<> 161:2cc1468da177 1401 * @brief Set the timer counter counting mode.
<> 161:2cc1468da177 1402 * @note Macro @ref IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
<> 161:2cc1468da177 1403 * check whether or not the counter mode selection feature is supported
<> 161:2cc1468da177 1404 * by a timer instance.
<> 161:2cc1468da177 1405 * @rmtoll CR1 DIR LL_TIM_SetCounterMode\n
<> 161:2cc1468da177 1406 * CR1 CMS LL_TIM_SetCounterMode
<> 161:2cc1468da177 1407 * @param TIMx Timer instance
<> 161:2cc1468da177 1408 * @param CounterMode This parameter can be one of the following values:
<> 161:2cc1468da177 1409 * @arg @ref LL_TIM_COUNTERMODE_UP
<> 161:2cc1468da177 1410 * @arg @ref LL_TIM_COUNTERMODE_DOWN
<> 161:2cc1468da177 1411 * @arg @ref LL_TIM_COUNTERMODE_CENTER_UP
<> 161:2cc1468da177 1412 * @arg @ref LL_TIM_COUNTERMODE_CENTER_DOWN
<> 161:2cc1468da177 1413 * @arg @ref LL_TIM_COUNTERMODE_CENTER_UP_DOWN
<> 161:2cc1468da177 1414 * @retval None
<> 161:2cc1468da177 1415 */
<> 161:2cc1468da177 1416 __STATIC_INLINE void LL_TIM_SetCounterMode(TIM_TypeDef *TIMx, uint32_t CounterMode)
<> 161:2cc1468da177 1417 {
<> 161:2cc1468da177 1418 MODIFY_REG(TIMx->CR1, TIM_CR1_DIR | TIM_CR1_CMS, CounterMode);
<> 161:2cc1468da177 1419 }
<> 161:2cc1468da177 1420
<> 161:2cc1468da177 1421 /**
<> 161:2cc1468da177 1422 * @brief Get actual counter mode.
<> 161:2cc1468da177 1423 * @note Macro @ref IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
<> 161:2cc1468da177 1424 * check whether or not the counter mode selection feature is supported
<> 161:2cc1468da177 1425 * by a timer instance.
<> 161:2cc1468da177 1426 * @rmtoll CR1 DIR LL_TIM_GetCounterMode\n
<> 161:2cc1468da177 1427 * CR1 CMS LL_TIM_GetCounterMode
<> 161:2cc1468da177 1428 * @param TIMx Timer instance
<> 161:2cc1468da177 1429 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1430 * @arg @ref LL_TIM_COUNTERMODE_UP
<> 161:2cc1468da177 1431 * @arg @ref LL_TIM_COUNTERMODE_DOWN
<> 161:2cc1468da177 1432 * @arg @ref LL_TIM_COUNTERMODE_CENTER_UP
<> 161:2cc1468da177 1433 * @arg @ref LL_TIM_COUNTERMODE_CENTER_DOWN
<> 161:2cc1468da177 1434 * @arg @ref LL_TIM_COUNTERMODE_CENTER_UP_DOWN
<> 161:2cc1468da177 1435 */
<> 161:2cc1468da177 1436 __STATIC_INLINE uint32_t LL_TIM_GetCounterMode(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1437 {
<> 161:2cc1468da177 1438 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR | TIM_CR1_CMS));
<> 161:2cc1468da177 1439 }
<> 161:2cc1468da177 1440
<> 161:2cc1468da177 1441 /**
<> 161:2cc1468da177 1442 * @brief Enable auto-reload (ARR) preload.
<> 161:2cc1468da177 1443 * @rmtoll CR1 ARPE LL_TIM_EnableARRPreload
<> 161:2cc1468da177 1444 * @param TIMx Timer instance
<> 161:2cc1468da177 1445 * @retval None
<> 161:2cc1468da177 1446 */
<> 161:2cc1468da177 1447 __STATIC_INLINE void LL_TIM_EnableARRPreload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1448 {
<> 161:2cc1468da177 1449 SET_BIT(TIMx->CR1, TIM_CR1_ARPE);
<> 161:2cc1468da177 1450 }
<> 161:2cc1468da177 1451
<> 161:2cc1468da177 1452 /**
<> 161:2cc1468da177 1453 * @brief Disable auto-reload (ARR) preload.
<> 161:2cc1468da177 1454 * @rmtoll CR1 ARPE LL_TIM_DisableARRPreload
<> 161:2cc1468da177 1455 * @param TIMx Timer instance
<> 161:2cc1468da177 1456 * @retval None
<> 161:2cc1468da177 1457 */
<> 161:2cc1468da177 1458 __STATIC_INLINE void LL_TIM_DisableARRPreload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1459 {
<> 161:2cc1468da177 1460 CLEAR_BIT(TIMx->CR1, TIM_CR1_ARPE);
<> 161:2cc1468da177 1461 }
<> 161:2cc1468da177 1462
<> 161:2cc1468da177 1463 /**
<> 161:2cc1468da177 1464 * @brief Indicates whether auto-reload (ARR) preload is enabled.
<> 161:2cc1468da177 1465 * @rmtoll CR1 ARPE LL_TIM_IsEnabledARRPreload
<> 161:2cc1468da177 1466 * @param TIMx Timer instance
<> 161:2cc1468da177 1467 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 1468 */
<> 161:2cc1468da177 1469 __STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1470 {
<> 161:2cc1468da177 1471 return (READ_BIT(TIMx->CR1, TIM_CR1_ARPE) == (TIM_CR1_ARPE));
<> 161:2cc1468da177 1472 }
<> 161:2cc1468da177 1473
<> 161:2cc1468da177 1474 /**
<> 161:2cc1468da177 1475 * @brief Set the division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.
<> 161:2cc1468da177 1476 * @note Macro @ref IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1477 * whether or not the clock division feature is supported by the timer
<> 161:2cc1468da177 1478 * instance.
<> 161:2cc1468da177 1479 * @rmtoll CR1 CKD LL_TIM_SetClockDivision
<> 161:2cc1468da177 1480 * @param TIMx Timer instance
<> 161:2cc1468da177 1481 * @param ClockDivision This parameter can be one of the following values:
<> 161:2cc1468da177 1482 * @arg @ref LL_TIM_CLOCKDIVISION_DIV1
<> 161:2cc1468da177 1483 * @arg @ref LL_TIM_CLOCKDIVISION_DIV2
<> 161:2cc1468da177 1484 * @arg @ref LL_TIM_CLOCKDIVISION_DIV4
<> 161:2cc1468da177 1485 * @retval None
<> 161:2cc1468da177 1486 */
<> 161:2cc1468da177 1487 __STATIC_INLINE void LL_TIM_SetClockDivision(TIM_TypeDef *TIMx, uint32_t ClockDivision)
<> 161:2cc1468da177 1488 {
<> 161:2cc1468da177 1489 MODIFY_REG(TIMx->CR1, TIM_CR1_CKD, ClockDivision);
<> 161:2cc1468da177 1490 }
<> 161:2cc1468da177 1491
<> 161:2cc1468da177 1492 /**
<> 161:2cc1468da177 1493 * @brief Get the actual division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.
<> 161:2cc1468da177 1494 * @note Macro @ref IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1495 * whether or not the clock division feature is supported by the timer
<> 161:2cc1468da177 1496 * instance.
<> 161:2cc1468da177 1497 * @rmtoll CR1 CKD LL_TIM_GetClockDivision
<> 161:2cc1468da177 1498 * @param TIMx Timer instance
<> 161:2cc1468da177 1499 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1500 * @arg @ref LL_TIM_CLOCKDIVISION_DIV1
<> 161:2cc1468da177 1501 * @arg @ref LL_TIM_CLOCKDIVISION_DIV2
<> 161:2cc1468da177 1502 * @arg @ref LL_TIM_CLOCKDIVISION_DIV4
<> 161:2cc1468da177 1503 */
<> 161:2cc1468da177 1504 __STATIC_INLINE uint32_t LL_TIM_GetClockDivision(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1505 {
<> 161:2cc1468da177 1506 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CKD));
<> 161:2cc1468da177 1507 }
<> 161:2cc1468da177 1508
<> 161:2cc1468da177 1509 /**
<> 161:2cc1468da177 1510 * @brief Set the counter value.
<> 161:2cc1468da177 1511 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1512 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 1513 * @rmtoll CNT CNT LL_TIM_SetCounter
<> 161:2cc1468da177 1514 * @param TIMx Timer instance
<> 161:2cc1468da177 1515 * @param Counter Counter value (between Min_Data=0 and Max_Data=0xFFFF or 0xFFFFFFFF)
<> 161:2cc1468da177 1516 * @retval None
<> 161:2cc1468da177 1517 */
<> 161:2cc1468da177 1518 __STATIC_INLINE void LL_TIM_SetCounter(TIM_TypeDef *TIMx, uint32_t Counter)
<> 161:2cc1468da177 1519 {
<> 161:2cc1468da177 1520 WRITE_REG(TIMx->CNT, Counter);
<> 161:2cc1468da177 1521 }
<> 161:2cc1468da177 1522
<> 161:2cc1468da177 1523 /**
<> 161:2cc1468da177 1524 * @brief Get the counter value.
<> 161:2cc1468da177 1525 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1526 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 1527 * @rmtoll CNT CNT LL_TIM_GetCounter
<> 161:2cc1468da177 1528 * @param TIMx Timer instance
<> 161:2cc1468da177 1529 * @retval Counter value (between Min_Data=0 and Max_Data=0xFFFF or 0xFFFFFFFF)
<> 161:2cc1468da177 1530 */
<> 161:2cc1468da177 1531 __STATIC_INLINE uint32_t LL_TIM_GetCounter(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1532 {
<> 161:2cc1468da177 1533 return (uint32_t)(READ_REG(TIMx->CNT));
<> 161:2cc1468da177 1534 }
<> 161:2cc1468da177 1535
<> 161:2cc1468da177 1536 /**
<> 161:2cc1468da177 1537 * @brief Get the current direction of the counter
<> 161:2cc1468da177 1538 * @rmtoll CR1 DIR LL_TIM_GetDirection
<> 161:2cc1468da177 1539 * @param TIMx Timer instance
<> 161:2cc1468da177 1540 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1541 * @arg @ref LL_TIM_COUNTERDIRECTION_UP
<> 161:2cc1468da177 1542 * @arg @ref LL_TIM_COUNTERDIRECTION_DOWN
<> 161:2cc1468da177 1543 */
<> 161:2cc1468da177 1544 __STATIC_INLINE uint32_t LL_TIM_GetDirection(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1545 {
<> 161:2cc1468da177 1546 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
<> 161:2cc1468da177 1547 }
<> 161:2cc1468da177 1548
<> 161:2cc1468da177 1549 /**
<> 161:2cc1468da177 1550 * @brief Set the prescaler value.
<> 161:2cc1468da177 1551 * @note The counter clock frequency CK_CNT is equal to fCK_PSC / (PSC[15:0] + 1).
<> 161:2cc1468da177 1552 * @note The prescaler can be changed on the fly as this control register is buffered. The new
<> 161:2cc1468da177 1553 * prescaler ratio is taken into account at the next update event.
<> 161:2cc1468da177 1554 * @note Helper macro @ref __LL_TIM_CALC_PSC can be used to calculate the Prescaler parameter
<> 161:2cc1468da177 1555 * @rmtoll PSC PSC LL_TIM_SetPrescaler
<> 161:2cc1468da177 1556 * @param TIMx Timer instance
<> 161:2cc1468da177 1557 * @param Prescaler between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 1558 * @retval None
<> 161:2cc1468da177 1559 */
<> 161:2cc1468da177 1560 __STATIC_INLINE void LL_TIM_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Prescaler)
<> 161:2cc1468da177 1561 {
<> 161:2cc1468da177 1562 WRITE_REG(TIMx->PSC, Prescaler);
<> 161:2cc1468da177 1563 }
<> 161:2cc1468da177 1564
<> 161:2cc1468da177 1565 /**
<> 161:2cc1468da177 1566 * @brief Get the prescaler value.
<> 161:2cc1468da177 1567 * @rmtoll PSC PSC LL_TIM_GetPrescaler
<> 161:2cc1468da177 1568 * @param TIMx Timer instance
<> 161:2cc1468da177 1569 * @retval Prescaler value between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 1570 */
<> 161:2cc1468da177 1571 __STATIC_INLINE uint32_t LL_TIM_GetPrescaler(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1572 {
<> 161:2cc1468da177 1573 return (uint32_t)(READ_REG(TIMx->PSC));
<> 161:2cc1468da177 1574 }
<> 161:2cc1468da177 1575
<> 161:2cc1468da177 1576 /**
<> 161:2cc1468da177 1577 * @brief Set the auto-reload value.
<> 161:2cc1468da177 1578 * @note The counter is blocked while the auto-reload value is null.
<> 161:2cc1468da177 1579 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1580 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 1581 * @note Helper macro @ref __LL_TIM_CALC_ARR can be used to calculate the AutoReload parameter
<> 161:2cc1468da177 1582 * @rmtoll ARR ARR LL_TIM_SetAutoReload
<> 161:2cc1468da177 1583 * @param TIMx Timer instance
<> 161:2cc1468da177 1584 * @param AutoReload between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 1585 * @retval None
<> 161:2cc1468da177 1586 */
<> 161:2cc1468da177 1587 __STATIC_INLINE void LL_TIM_SetAutoReload(TIM_TypeDef *TIMx, uint32_t AutoReload)
<> 161:2cc1468da177 1588 {
<> 161:2cc1468da177 1589 WRITE_REG(TIMx->ARR, AutoReload);
<> 161:2cc1468da177 1590 }
<> 161:2cc1468da177 1591
<> 161:2cc1468da177 1592 /**
<> 161:2cc1468da177 1593 * @brief Get the auto-reload value.
<> 161:2cc1468da177 1594 * @rmtoll ARR ARR LL_TIM_GetAutoReload
<> 161:2cc1468da177 1595 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1596 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 1597 * @param TIMx Timer instance
<> 161:2cc1468da177 1598 * @retval Auto-reload value
<> 161:2cc1468da177 1599 */
<> 161:2cc1468da177 1600 __STATIC_INLINE uint32_t LL_TIM_GetAutoReload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1601 {
<> 161:2cc1468da177 1602 return (uint32_t)(READ_REG(TIMx->ARR));
<> 161:2cc1468da177 1603 }
<> 161:2cc1468da177 1604
<> 161:2cc1468da177 1605 /**
<> 161:2cc1468da177 1606 * @brief Set the repetition counter value.
<> 161:2cc1468da177 1607 * @note For advanced timer instances RepetitionCounter can be up to 65535.
<> 161:2cc1468da177 1608 * @note Macro @ref IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1609 * whether or not a timer instance supports a repetition counter.
<> 161:2cc1468da177 1610 * @rmtoll RCR REP LL_TIM_SetRepetitionCounter
<> 161:2cc1468da177 1611 * @param TIMx Timer instance
<> 161:2cc1468da177 1612 * @param RepetitionCounter between Min_Data=0 and Max_Data=255
<> 161:2cc1468da177 1613 * @retval None
<> 161:2cc1468da177 1614 */
<> 161:2cc1468da177 1615 __STATIC_INLINE void LL_TIM_SetRepetitionCounter(TIM_TypeDef *TIMx, uint32_t RepetitionCounter)
<> 161:2cc1468da177 1616 {
<> 161:2cc1468da177 1617 WRITE_REG(TIMx->RCR, RepetitionCounter);
<> 161:2cc1468da177 1618 }
<> 161:2cc1468da177 1619
<> 161:2cc1468da177 1620 /**
<> 161:2cc1468da177 1621 * @brief Get the repetition counter value.
<> 161:2cc1468da177 1622 * @note Macro @ref IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1623 * whether or not a timer instance supports a repetition counter.
<> 161:2cc1468da177 1624 * @rmtoll RCR REP LL_TIM_GetRepetitionCounter
<> 161:2cc1468da177 1625 * @param TIMx Timer instance
<> 161:2cc1468da177 1626 * @retval Repetition counter value
<> 161:2cc1468da177 1627 */
<> 161:2cc1468da177 1628 __STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1629 {
<> 161:2cc1468da177 1630 return (uint32_t)(READ_REG(TIMx->RCR));
<> 161:2cc1468da177 1631 }
<> 161:2cc1468da177 1632
<> 161:2cc1468da177 1633 /**
<> 161:2cc1468da177 1634 * @brief Force a continuous copy of the update interrupt flag (UIF) into the timer counter register (bit 31).
<> 161:2cc1468da177 1635 * @note This allows both the counter value and a potential roll-over condition signalled by the UIFCPY flag to be read in an atomic way.
<> 161:2cc1468da177 1636 * @rmtoll CR1 UIFREMAP LL_TIM_EnableUIFRemap
<> 161:2cc1468da177 1637 * @param TIMx Timer instance
<> 161:2cc1468da177 1638 * @retval None
<> 161:2cc1468da177 1639 */
<> 161:2cc1468da177 1640 __STATIC_INLINE void LL_TIM_EnableUIFRemap(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1641 {
<> 161:2cc1468da177 1642 SET_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
<> 161:2cc1468da177 1643 }
<> 161:2cc1468da177 1644
<> 161:2cc1468da177 1645 /**
<> 161:2cc1468da177 1646 * @brief Disable update interrupt flag (UIF) remapping.
<> 161:2cc1468da177 1647 * @rmtoll CR1 UIFREMAP LL_TIM_DisableUIFRemap
<> 161:2cc1468da177 1648 * @param TIMx Timer instance
<> 161:2cc1468da177 1649 * @retval None
<> 161:2cc1468da177 1650 */
<> 161:2cc1468da177 1651 __STATIC_INLINE void LL_TIM_DisableUIFRemap(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1652 {
<> 161:2cc1468da177 1653 CLEAR_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
<> 161:2cc1468da177 1654 }
<> 161:2cc1468da177 1655
<> 161:2cc1468da177 1656 /**
<> 161:2cc1468da177 1657 * @}
<> 161:2cc1468da177 1658 */
<> 161:2cc1468da177 1659
<> 161:2cc1468da177 1660 /** @defgroup TIM_LL_EF_Capture_Compare Capture Compare configuration
<> 161:2cc1468da177 1661 * @{
<> 161:2cc1468da177 1662 */
<> 161:2cc1468da177 1663 /**
<> 161:2cc1468da177 1664 * @brief Enable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.
<> 161:2cc1468da177 1665 * @note CCxE, CCxNE and OCxM bits are preloaded, after having been written,
<> 161:2cc1468da177 1666 * they are updated only when a commutation event (COM) occurs.
<> 161:2cc1468da177 1667 * @note Only on channels that have a complementary output.
<> 161:2cc1468da177 1668 * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1669 * whether or not a timer instance is able to generate a commutation event.
<> 161:2cc1468da177 1670 * @rmtoll CR2 CCPC LL_TIM_CC_EnablePreload
<> 161:2cc1468da177 1671 * @param TIMx Timer instance
<> 161:2cc1468da177 1672 * @retval None
<> 161:2cc1468da177 1673 */
<> 161:2cc1468da177 1674 __STATIC_INLINE void LL_TIM_CC_EnablePreload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1675 {
<> 161:2cc1468da177 1676 SET_BIT(TIMx->CR2, TIM_CR2_CCPC);
<> 161:2cc1468da177 1677 }
<> 161:2cc1468da177 1678
<> 161:2cc1468da177 1679 /**
<> 161:2cc1468da177 1680 * @brief Disable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.
<> 161:2cc1468da177 1681 * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1682 * whether or not a timer instance is able to generate a commutation event.
<> 161:2cc1468da177 1683 * @rmtoll CR2 CCPC LL_TIM_CC_DisablePreload
<> 161:2cc1468da177 1684 * @param TIMx Timer instance
<> 161:2cc1468da177 1685 * @retval None
<> 161:2cc1468da177 1686 */
<> 161:2cc1468da177 1687 __STATIC_INLINE void LL_TIM_CC_DisablePreload(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1688 {
<> 161:2cc1468da177 1689 CLEAR_BIT(TIMx->CR2, TIM_CR2_CCPC);
<> 161:2cc1468da177 1690 }
<> 161:2cc1468da177 1691
<> 161:2cc1468da177 1692 /**
<> 161:2cc1468da177 1693 * @brief Set the updated source of the capture/compare control bits (CCxE, CCxNE and OCxM).
<> 161:2cc1468da177 1694 * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 1695 * whether or not a timer instance is able to generate a commutation event.
<> 161:2cc1468da177 1696 * @rmtoll CR2 CCUS LL_TIM_CC_SetUpdate
<> 161:2cc1468da177 1697 * @param TIMx Timer instance
<> 161:2cc1468da177 1698 * @param CCUpdateSource This parameter can be one of the following values:
<> 161:2cc1468da177 1699 * @arg @ref LL_TIM_CCUPDATESOURCE_COMG_ONLY
<> 161:2cc1468da177 1700 * @arg @ref LL_TIM_CCUPDATESOURCE_COMG_AND_TRGI
<> 161:2cc1468da177 1701 * @retval None
<> 161:2cc1468da177 1702 */
<> 161:2cc1468da177 1703 __STATIC_INLINE void LL_TIM_CC_SetUpdate(TIM_TypeDef *TIMx, uint32_t CCUpdateSource)
<> 161:2cc1468da177 1704 {
<> 161:2cc1468da177 1705 MODIFY_REG(TIMx->CR2, TIM_CR2_CCUS, CCUpdateSource);
<> 161:2cc1468da177 1706 }
<> 161:2cc1468da177 1707
<> 161:2cc1468da177 1708 /**
<> 161:2cc1468da177 1709 * @brief Set the trigger of the capture/compare DMA request.
<> 161:2cc1468da177 1710 * @rmtoll CR2 CCDS LL_TIM_CC_SetDMAReqTrigger
<> 161:2cc1468da177 1711 * @param TIMx Timer instance
<> 161:2cc1468da177 1712 * @param DMAReqTrigger This parameter can be one of the following values:
<> 161:2cc1468da177 1713 * @arg @ref LL_TIM_CCDMAREQUEST_CC
<> 161:2cc1468da177 1714 * @arg @ref LL_TIM_CCDMAREQUEST_UPDATE
<> 161:2cc1468da177 1715 * @retval None
<> 161:2cc1468da177 1716 */
<> 161:2cc1468da177 1717 __STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger(TIM_TypeDef *TIMx, uint32_t DMAReqTrigger)
<> 161:2cc1468da177 1718 {
<> 161:2cc1468da177 1719 MODIFY_REG(TIMx->CR2, TIM_CR2_CCDS, DMAReqTrigger);
<> 161:2cc1468da177 1720 }
<> 161:2cc1468da177 1721
<> 161:2cc1468da177 1722 /**
<> 161:2cc1468da177 1723 * @brief Get actual trigger of the capture/compare DMA request.
<> 161:2cc1468da177 1724 * @rmtoll CR2 CCDS LL_TIM_CC_GetDMAReqTrigger
<> 161:2cc1468da177 1725 * @param TIMx Timer instance
<> 161:2cc1468da177 1726 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1727 * @arg @ref LL_TIM_CCDMAREQUEST_CC
<> 161:2cc1468da177 1728 * @arg @ref LL_TIM_CCDMAREQUEST_UPDATE
<> 161:2cc1468da177 1729 */
<> 161:2cc1468da177 1730 __STATIC_INLINE uint32_t LL_TIM_CC_GetDMAReqTrigger(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 1731 {
<> 161:2cc1468da177 1732 return (uint32_t)(READ_BIT(TIMx->CR2, TIM_CR2_CCDS));
<> 161:2cc1468da177 1733 }
<> 161:2cc1468da177 1734
<> 161:2cc1468da177 1735 /**
<> 161:2cc1468da177 1736 * @brief Set the lock level to freeze the
<> 161:2cc1468da177 1737 * configuration of several capture/compare parameters.
<> 161:2cc1468da177 1738 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 1739 * the lock mechanism is supported by a timer instance.
<> 161:2cc1468da177 1740 * @rmtoll BDTR LOCK LL_TIM_CC_SetLockLevel
<> 161:2cc1468da177 1741 * @param TIMx Timer instance
<> 161:2cc1468da177 1742 * @param LockLevel This parameter can be one of the following values:
<> 161:2cc1468da177 1743 * @arg @ref LL_TIM_LOCKLEVEL_OFF
<> 161:2cc1468da177 1744 * @arg @ref LL_TIM_LOCKLEVEL_1
<> 161:2cc1468da177 1745 * @arg @ref LL_TIM_LOCKLEVEL_2
<> 161:2cc1468da177 1746 * @arg @ref LL_TIM_LOCKLEVEL_3
<> 161:2cc1468da177 1747 * @retval None
<> 161:2cc1468da177 1748 */
<> 161:2cc1468da177 1749 __STATIC_INLINE void LL_TIM_CC_SetLockLevel(TIM_TypeDef *TIMx, uint32_t LockLevel)
<> 161:2cc1468da177 1750 {
<> 161:2cc1468da177 1751 MODIFY_REG(TIMx->BDTR, TIM_BDTR_LOCK, LockLevel);
<> 161:2cc1468da177 1752 }
<> 161:2cc1468da177 1753
<> 161:2cc1468da177 1754 /**
<> 161:2cc1468da177 1755 * @brief Enable capture/compare channels.
<> 161:2cc1468da177 1756 * @rmtoll CCER CC1E LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1757 * CCER CC1NE LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1758 * CCER CC2E LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1759 * CCER CC2NE LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1760 * CCER CC3E LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1761 * CCER CC3NE LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1762 * CCER CC4E LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1763 * CCER CC5E LL_TIM_CC_EnableChannel\n
<> 161:2cc1468da177 1764 * CCER CC6E LL_TIM_CC_EnableChannel
<> 161:2cc1468da177 1765 * @param TIMx Timer instance
<> 161:2cc1468da177 1766 * @param Channels This parameter can be a combination of the following values:
<> 161:2cc1468da177 1767 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1768 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 1769 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1770 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 1771 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1772 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 1773 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1774 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1775 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1776 * @retval None
<> 161:2cc1468da177 1777 */
<> 161:2cc1468da177 1778 __STATIC_INLINE void LL_TIM_CC_EnableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
<> 161:2cc1468da177 1779 {
<> 161:2cc1468da177 1780 SET_BIT(TIMx->CCER, Channels);
<> 161:2cc1468da177 1781 }
<> 161:2cc1468da177 1782
<> 161:2cc1468da177 1783 /**
<> 161:2cc1468da177 1784 * @brief Disable capture/compare channels.
<> 161:2cc1468da177 1785 * @rmtoll CCER CC1E LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1786 * CCER CC1NE LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1787 * CCER CC2E LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1788 * CCER CC2NE LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1789 * CCER CC3E LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1790 * CCER CC3NE LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1791 * CCER CC4E LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1792 * CCER CC5E LL_TIM_CC_DisableChannel\n
<> 161:2cc1468da177 1793 * CCER CC6E LL_TIM_CC_DisableChannel
<> 161:2cc1468da177 1794 * @param TIMx Timer instance
<> 161:2cc1468da177 1795 * @param Channels This parameter can be a combination of the following values:
<> 161:2cc1468da177 1796 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1797 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 1798 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1799 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 1800 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1801 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 1802 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1803 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1804 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1805 * @retval None
<> 161:2cc1468da177 1806 */
<> 161:2cc1468da177 1807 __STATIC_INLINE void LL_TIM_CC_DisableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
<> 161:2cc1468da177 1808 {
<> 161:2cc1468da177 1809 CLEAR_BIT(TIMx->CCER, Channels);
<> 161:2cc1468da177 1810 }
<> 161:2cc1468da177 1811
<> 161:2cc1468da177 1812 /**
<> 161:2cc1468da177 1813 * @brief Indicate whether channel(s) is(are) enabled.
<> 161:2cc1468da177 1814 * @rmtoll CCER CC1E LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1815 * CCER CC1NE LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1816 * CCER CC2E LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1817 * CCER CC2NE LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1818 * CCER CC3E LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1819 * CCER CC3NE LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1820 * CCER CC4E LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1821 * CCER CC5E LL_TIM_CC_IsEnabledChannel\n
<> 161:2cc1468da177 1822 * CCER CC6E LL_TIM_CC_IsEnabledChannel
<> 161:2cc1468da177 1823 * @param TIMx Timer instance
<> 161:2cc1468da177 1824 * @param Channels This parameter can be a combination of the following values:
<> 161:2cc1468da177 1825 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1826 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 1827 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1828 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 1829 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1830 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 1831 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1832 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1833 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1834 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 1835 */
<> 161:2cc1468da177 1836 __STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledChannel(TIM_TypeDef *TIMx, uint32_t Channels)
<> 161:2cc1468da177 1837 {
<> 161:2cc1468da177 1838 return (READ_BIT(TIMx->CCER, Channels) == (Channels));
<> 161:2cc1468da177 1839 }
<> 161:2cc1468da177 1840
<> 161:2cc1468da177 1841 /**
<> 161:2cc1468da177 1842 * @}
<> 161:2cc1468da177 1843 */
<> 161:2cc1468da177 1844
<> 161:2cc1468da177 1845 /** @defgroup TIM_LL_EF_Output_Channel Output channel configuration
<> 161:2cc1468da177 1846 * @{
<> 161:2cc1468da177 1847 */
<> 161:2cc1468da177 1848 /**
<> 161:2cc1468da177 1849 * @brief Configure an output channel.
<> 161:2cc1468da177 1850 * @rmtoll CCMR1 CC1S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1851 * CCMR1 CC2S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1852 * CCMR2 CC3S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1853 * CCMR2 CC4S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1854 * CCMR3 CC5S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1855 * CCMR3 CC6S LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1856 * CCER CC1P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1857 * CCER CC2P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1858 * CCER CC3P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1859 * CCER CC4P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1860 * CCER CC5P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1861 * CCER CC6P LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1862 * CR2 OIS1 LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1863 * CR2 OIS2 LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1864 * CR2 OIS3 LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1865 * CR2 OIS4 LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1866 * CR2 OIS5 LL_TIM_OC_ConfigOutput\n
<> 161:2cc1468da177 1867 * CR2 OIS6 LL_TIM_OC_ConfigOutput
<> 161:2cc1468da177 1868 * @param TIMx Timer instance
<> 161:2cc1468da177 1869 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 1870 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1871 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1872 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1873 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1874 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1875 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1876 * @param Configuration This parameter must be a combination of all the following values:
<> 161:2cc1468da177 1877 * @arg @ref LL_TIM_OCPOLARITY_HIGH or @ref LL_TIM_OCPOLARITY_LOW
<> 161:2cc1468da177 1878 * @arg @ref LL_TIM_OCIDLESTATE_LOW or @ref LL_TIM_OCIDLESTATE_HIGH
<> 161:2cc1468da177 1879 * @retval None
<> 161:2cc1468da177 1880 */
<> 161:2cc1468da177 1881 __STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
<> 161:2cc1468da177 1882 {
<> 161:2cc1468da177 1883 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 1884 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 1885 CLEAR_BIT(*pReg, (TIM_CCMR1_CC1S << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 1886 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]),
<> 161:2cc1468da177 1887 (Configuration & TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 1888 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]),
<> 161:2cc1468da177 1889 (Configuration & TIM_CR2_OIS1) << SHIFT_TAB_OISx[iChannel]);
<> 161:2cc1468da177 1890 }
<> 161:2cc1468da177 1891
<> 161:2cc1468da177 1892 /**
<> 161:2cc1468da177 1893 * @brief Define the behavior of the output reference signal OCxREF from which
<> 161:2cc1468da177 1894 * OCx and OCxN (when relevant) are derived.
<> 161:2cc1468da177 1895 * @rmtoll CCMR1 OC1M LL_TIM_OC_SetMode\n
<> 161:2cc1468da177 1896 * CCMR1 OC2M LL_TIM_OC_SetMode\n
<> 161:2cc1468da177 1897 * CCMR2 OC3M LL_TIM_OC_SetMode\n
<> 161:2cc1468da177 1898 * CCMR2 OC4M LL_TIM_OC_SetMode\n
<> 161:2cc1468da177 1899 * CCMR3 OC5M LL_TIM_OC_SetMode\n
<> 161:2cc1468da177 1900 * CCMR3 OC6M LL_TIM_OC_SetMode
<> 161:2cc1468da177 1901 * @param TIMx Timer instance
<> 161:2cc1468da177 1902 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 1903 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1904 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1905 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1906 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1907 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1908 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1909 * @param Mode This parameter can be one of the following values:
<> 161:2cc1468da177 1910 * @arg @ref LL_TIM_OCMODE_FROZEN
<> 161:2cc1468da177 1911 * @arg @ref LL_TIM_OCMODE_ACTIVE
<> 161:2cc1468da177 1912 * @arg @ref LL_TIM_OCMODE_INACTIVE
<> 161:2cc1468da177 1913 * @arg @ref LL_TIM_OCMODE_TOGGLE
<> 161:2cc1468da177 1914 * @arg @ref LL_TIM_OCMODE_FORCED_INACTIVE
<> 161:2cc1468da177 1915 * @arg @ref LL_TIM_OCMODE_FORCED_ACTIVE
<> 161:2cc1468da177 1916 * @arg @ref LL_TIM_OCMODE_PWM1
<> 161:2cc1468da177 1917 * @arg @ref LL_TIM_OCMODE_PWM2
<> 161:2cc1468da177 1918 * @arg @ref LL_TIM_OCMODE_RETRIG_OPM1
<> 161:2cc1468da177 1919 * @arg @ref LL_TIM_OCMODE_RETRIG_OPM2
<> 161:2cc1468da177 1920 * @arg @ref LL_TIM_OCMODE_COMBINED_PWM1
<> 161:2cc1468da177 1921 * @arg @ref LL_TIM_OCMODE_COMBINED_PWM2
<> 161:2cc1468da177 1922 * @arg @ref LL_TIM_OCMODE_ASSYMETRIC_PWM1
<> 161:2cc1468da177 1923 * @arg @ref LL_TIM_OCMODE_ASSYMETRIC_PWM2
<> 161:2cc1468da177 1924 * @retval None
<> 161:2cc1468da177 1925 */
<> 161:2cc1468da177 1926 __STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Mode)
<> 161:2cc1468da177 1927 {
<> 161:2cc1468da177 1928 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 1929 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 1930 MODIFY_REG(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel]), Mode << SHIFT_TAB_OCxx[iChannel]);
<> 161:2cc1468da177 1931 }
<> 161:2cc1468da177 1932
<> 161:2cc1468da177 1933 /**
<> 161:2cc1468da177 1934 * @brief Get the output compare mode of an output channel.
<> 161:2cc1468da177 1935 * @rmtoll CCMR1 OC1M LL_TIM_OC_GetMode\n
<> 161:2cc1468da177 1936 * CCMR1 OC2M LL_TIM_OC_GetMode\n
<> 161:2cc1468da177 1937 * CCMR2 OC3M LL_TIM_OC_GetMode\n
<> 161:2cc1468da177 1938 * CCMR2 OC4M LL_TIM_OC_GetMode\n
<> 161:2cc1468da177 1939 * CCMR3 OC5M LL_TIM_OC_GetMode\n
<> 161:2cc1468da177 1940 * CCMR3 OC6M LL_TIM_OC_GetMode
<> 161:2cc1468da177 1941 * @param TIMx Timer instance
<> 161:2cc1468da177 1942 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 1943 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1944 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1945 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1946 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1947 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1948 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1949 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 1950 * @arg @ref LL_TIM_OCMODE_FROZEN
<> 161:2cc1468da177 1951 * @arg @ref LL_TIM_OCMODE_ACTIVE
<> 161:2cc1468da177 1952 * @arg @ref LL_TIM_OCMODE_INACTIVE
<> 161:2cc1468da177 1953 * @arg @ref LL_TIM_OCMODE_TOGGLE
<> 161:2cc1468da177 1954 * @arg @ref LL_TIM_OCMODE_FORCED_INACTIVE
<> 161:2cc1468da177 1955 * @arg @ref LL_TIM_OCMODE_FORCED_ACTIVE
<> 161:2cc1468da177 1956 * @arg @ref LL_TIM_OCMODE_PWM1
<> 161:2cc1468da177 1957 * @arg @ref LL_TIM_OCMODE_PWM2
<> 161:2cc1468da177 1958 * @arg @ref LL_TIM_OCMODE_RETRIG_OPM1
<> 161:2cc1468da177 1959 * @arg @ref LL_TIM_OCMODE_RETRIG_OPM2
<> 161:2cc1468da177 1960 * @arg @ref LL_TIM_OCMODE_COMBINED_PWM1
<> 161:2cc1468da177 1961 * @arg @ref LL_TIM_OCMODE_COMBINED_PWM2
<> 161:2cc1468da177 1962 * @arg @ref LL_TIM_OCMODE_ASSYMETRIC_PWM1
<> 161:2cc1468da177 1963 * @arg @ref LL_TIM_OCMODE_ASSYMETRIC_PWM2
<> 161:2cc1468da177 1964 */
<> 161:2cc1468da177 1965 __STATIC_INLINE uint32_t LL_TIM_OC_GetMode(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 1966 {
<> 161:2cc1468da177 1967 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 1968 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 1969 return (READ_BIT(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel])) >> SHIFT_TAB_OCxx[iChannel]);
<> 161:2cc1468da177 1970 }
<> 161:2cc1468da177 1971
<> 161:2cc1468da177 1972 /**
<> 161:2cc1468da177 1973 * @brief Set the polarity of an output channel.
<> 161:2cc1468da177 1974 * @rmtoll CCER CC1P LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1975 * CCER CC1NP LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1976 * CCER CC2P LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1977 * CCER CC2NP LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1978 * CCER CC3P LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1979 * CCER CC3NP LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1980 * CCER CC4P LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1981 * CCER CC5P LL_TIM_OC_SetPolarity\n
<> 161:2cc1468da177 1982 * CCER CC6P LL_TIM_OC_SetPolarity
<> 161:2cc1468da177 1983 * @param TIMx Timer instance
<> 161:2cc1468da177 1984 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 1985 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 1986 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 1987 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 1988 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 1989 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 1990 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 1991 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 1992 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 1993 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 1994 * @param Polarity This parameter can be one of the following values:
<> 161:2cc1468da177 1995 * @arg @ref LL_TIM_OCPOLARITY_HIGH
<> 161:2cc1468da177 1996 * @arg @ref LL_TIM_OCPOLARITY_LOW
<> 161:2cc1468da177 1997 * @retval None
<> 161:2cc1468da177 1998 */
<> 161:2cc1468da177 1999 __STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Polarity)
<> 161:2cc1468da177 2000 {
<> 161:2cc1468da177 2001 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2002 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), Polarity << SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 2003 }
<> 161:2cc1468da177 2004
<> 161:2cc1468da177 2005 /**
<> 161:2cc1468da177 2006 * @brief Get the polarity of an output channel.
<> 161:2cc1468da177 2007 * @rmtoll CCER CC1P LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2008 * CCER CC1NP LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2009 * CCER CC2P LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2010 * CCER CC2NP LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2011 * CCER CC3P LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2012 * CCER CC3NP LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2013 * CCER CC4P LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2014 * CCER CC5P LL_TIM_OC_GetPolarity\n
<> 161:2cc1468da177 2015 * CCER CC6P LL_TIM_OC_GetPolarity
<> 161:2cc1468da177 2016 * @param TIMx Timer instance
<> 161:2cc1468da177 2017 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2018 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2019 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 2020 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2021 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 2022 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2023 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 2024 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2025 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2026 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2027 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2028 * @arg @ref LL_TIM_OCPOLARITY_HIGH
<> 161:2cc1468da177 2029 * @arg @ref LL_TIM_OCPOLARITY_LOW
<> 161:2cc1468da177 2030 */
<> 161:2cc1468da177 2031 __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2032 {
<> 161:2cc1468da177 2033 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2034 return (READ_BIT(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 2035 }
<> 161:2cc1468da177 2036
<> 161:2cc1468da177 2037 /**
<> 161:2cc1468da177 2038 * @brief Set the IDLE state of an output channel
<> 161:2cc1468da177 2039 * @note This function is significant only for the timer instances
<> 161:2cc1468da177 2040 * supporting the break feature. Macro @ref IS_TIM_BREAK_INSTANCE(TIMx)
<> 161:2cc1468da177 2041 * can be used to check whether or not a timer instance provides
<> 161:2cc1468da177 2042 * a break input.
<> 161:2cc1468da177 2043 * @rmtoll CR2 OIS1 LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2044 * CR2 OIS2N LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2045 * CR2 OIS2 LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2046 * CR2 OIS2N LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2047 * CR2 OIS3 LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2048 * CR2 OIS3N LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2049 * CR2 OIS4 LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2050 * CR2 OIS5 LL_TIM_OC_SetIdleState\n
<> 161:2cc1468da177 2051 * CR2 OIS6 LL_TIM_OC_SetIdleState
<> 161:2cc1468da177 2052 * @param TIMx Timer instance
<> 161:2cc1468da177 2053 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2054 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2055 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 2056 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2057 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 2058 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2059 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 2060 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2061 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2062 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2063 * @param IdleState This parameter can be one of the following values:
<> 161:2cc1468da177 2064 * @arg @ref LL_TIM_OCIDLESTATE_LOW
<> 161:2cc1468da177 2065 * @arg @ref LL_TIM_OCIDLESTATE_HIGH
<> 161:2cc1468da177 2066 * @retval None
<> 161:2cc1468da177 2067 */
<> 161:2cc1468da177 2068 __STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t IdleState)
<> 161:2cc1468da177 2069 {
<> 161:2cc1468da177 2070 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2071 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]), IdleState << SHIFT_TAB_OISx[iChannel]);
<> 161:2cc1468da177 2072 }
<> 161:2cc1468da177 2073
<> 161:2cc1468da177 2074 /**
<> 161:2cc1468da177 2075 * @brief Get the IDLE state of an output channel
<> 161:2cc1468da177 2076 * @rmtoll CR2 OIS1 LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2077 * CR2 OIS2N LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2078 * CR2 OIS2 LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2079 * CR2 OIS2N LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2080 * CR2 OIS3 LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2081 * CR2 OIS3N LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2082 * CR2 OIS4 LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2083 * CR2 OIS5 LL_TIM_OC_GetIdleState\n
<> 161:2cc1468da177 2084 * CR2 OIS6 LL_TIM_OC_GetIdleState
<> 161:2cc1468da177 2085 * @param TIMx Timer instance
<> 161:2cc1468da177 2086 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2087 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2088 * @arg @ref LL_TIM_CHANNEL_CH1N
<> 161:2cc1468da177 2089 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2090 * @arg @ref LL_TIM_CHANNEL_CH2N
<> 161:2cc1468da177 2091 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2092 * @arg @ref LL_TIM_CHANNEL_CH3N
<> 161:2cc1468da177 2093 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2094 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2095 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2096 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2097 * @arg @ref LL_TIM_OCIDLESTATE_LOW
<> 161:2cc1468da177 2098 * @arg @ref LL_TIM_OCIDLESTATE_HIGH
<> 161:2cc1468da177 2099 */
<> 161:2cc1468da177 2100 __STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2101 {
<> 161:2cc1468da177 2102 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2103 return (READ_BIT(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel])) >> SHIFT_TAB_OISx[iChannel]);
<> 161:2cc1468da177 2104 }
<> 161:2cc1468da177 2105
<> 161:2cc1468da177 2106 /**
<> 161:2cc1468da177 2107 * @brief Enable fast mode for the output channel.
<> 161:2cc1468da177 2108 * @note Acts only if the channel is configured in PWM1 or PWM2 mode.
<> 161:2cc1468da177 2109 * @rmtoll CCMR1 OC1FE LL_TIM_OC_EnableFast\n
<> 161:2cc1468da177 2110 * CCMR1 OC2FE LL_TIM_OC_EnableFast\n
<> 161:2cc1468da177 2111 * CCMR2 OC3FE LL_TIM_OC_EnableFast\n
<> 161:2cc1468da177 2112 * CCMR2 OC4FE LL_TIM_OC_EnableFast\n
<> 161:2cc1468da177 2113 * CCMR3 OC5FE LL_TIM_OC_EnableFast\n
<> 161:2cc1468da177 2114 * CCMR3 OC6FE LL_TIM_OC_EnableFast
<> 161:2cc1468da177 2115 * @param TIMx Timer instance
<> 161:2cc1468da177 2116 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2117 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2118 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2119 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2120 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2121 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2122 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2123 * @retval None
<> 161:2cc1468da177 2124 */
<> 161:2cc1468da177 2125 __STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2126 {
<> 161:2cc1468da177 2127 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2128 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2129 SET_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2130
<> 161:2cc1468da177 2131 }
<> 161:2cc1468da177 2132
<> 161:2cc1468da177 2133 /**
<> 161:2cc1468da177 2134 * @brief Disable fast mode for the output channel.
<> 161:2cc1468da177 2135 * @rmtoll CCMR1 OC1FE LL_TIM_OC_DisableFast\n
<> 161:2cc1468da177 2136 * CCMR1 OC2FE LL_TIM_OC_DisableFast\n
<> 161:2cc1468da177 2137 * CCMR2 OC3FE LL_TIM_OC_DisableFast\n
<> 161:2cc1468da177 2138 * CCMR2 OC4FE LL_TIM_OC_DisableFast\n
<> 161:2cc1468da177 2139 * CCMR3 OC5FE LL_TIM_OC_DisableFast\n
<> 161:2cc1468da177 2140 * CCMR3 OC6FE LL_TIM_OC_DisableFast
<> 161:2cc1468da177 2141 * @param TIMx Timer instance
<> 161:2cc1468da177 2142 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2143 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2144 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2145 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2146 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2147 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2148 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2149 * @retval None
<> 161:2cc1468da177 2150 */
<> 161:2cc1468da177 2151 __STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2152 {
<> 161:2cc1468da177 2153 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2154 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2155 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2156
<> 161:2cc1468da177 2157 }
<> 161:2cc1468da177 2158
<> 161:2cc1468da177 2159 /**
<> 161:2cc1468da177 2160 * @brief Indicates whether fast mode is enabled for the output channel.
<> 161:2cc1468da177 2161 * @rmtoll CCMR1 OC1FE LL_TIM_OC_IsEnabledFast\n
<> 161:2cc1468da177 2162 * CCMR1 OC2FE LL_TIM_OC_IsEnabledFast\n
<> 161:2cc1468da177 2163 * CCMR2 OC3FE LL_TIM_OC_IsEnabledFast\n
<> 161:2cc1468da177 2164 * CCMR2 OC4FE LL_TIM_OC_IsEnabledFast\n
<> 161:2cc1468da177 2165 * CCMR3 OC5FE LL_TIM_OC_IsEnabledFast\n
<> 161:2cc1468da177 2166 * CCMR3 OC6FE LL_TIM_OC_IsEnabledFast
<> 161:2cc1468da177 2167 * @param TIMx Timer instance
<> 161:2cc1468da177 2168 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2169 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2170 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2171 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2172 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2173 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2174 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2175 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 2176 */
<> 161:2cc1468da177 2177 __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2178 {
<> 161:2cc1468da177 2179 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2180 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2181 register uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel];
<> 161:2cc1468da177 2182 return (READ_BIT(*pReg, bitfield) == bitfield);
<> 161:2cc1468da177 2183 }
<> 161:2cc1468da177 2184
<> 161:2cc1468da177 2185 /**
<> 161:2cc1468da177 2186 * @brief Enable compare register (TIMx_CCRx) preload for the output channel.
<> 161:2cc1468da177 2187 * @rmtoll CCMR1 OC1PE LL_TIM_OC_EnablePreload\n
<> 161:2cc1468da177 2188 * CCMR1 OC2PE LL_TIM_OC_EnablePreload\n
<> 161:2cc1468da177 2189 * CCMR2 OC3PE LL_TIM_OC_EnablePreload\n
<> 161:2cc1468da177 2190 * CCMR2 OC4PE LL_TIM_OC_EnablePreload\n
<> 161:2cc1468da177 2191 * CCMR3 OC5PE LL_TIM_OC_EnablePreload\n
<> 161:2cc1468da177 2192 * CCMR3 OC6PE LL_TIM_OC_EnablePreload
<> 161:2cc1468da177 2193 * @param TIMx Timer instance
<> 161:2cc1468da177 2194 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2195 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2196 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2197 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2198 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2199 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2200 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2201 * @retval None
<> 161:2cc1468da177 2202 */
<> 161:2cc1468da177 2203 __STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2204 {
<> 161:2cc1468da177 2205 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2206 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2207 SET_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2208 }
<> 161:2cc1468da177 2209
<> 161:2cc1468da177 2210 /**
<> 161:2cc1468da177 2211 * @brief Disable compare register (TIMx_CCRx) preload for the output channel.
<> 161:2cc1468da177 2212 * @rmtoll CCMR1 OC1PE LL_TIM_OC_DisablePreload\n
<> 161:2cc1468da177 2213 * CCMR1 OC2PE LL_TIM_OC_DisablePreload\n
<> 161:2cc1468da177 2214 * CCMR2 OC3PE LL_TIM_OC_DisablePreload\n
<> 161:2cc1468da177 2215 * CCMR2 OC4PE LL_TIM_OC_DisablePreload\n
<> 161:2cc1468da177 2216 * CCMR3 OC5PE LL_TIM_OC_DisablePreload\n
<> 161:2cc1468da177 2217 * CCMR3 OC6PE LL_TIM_OC_DisablePreload
<> 161:2cc1468da177 2218 * @param TIMx Timer instance
<> 161:2cc1468da177 2219 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2220 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2221 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2222 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2223 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2224 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2225 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2226 * @retval None
<> 161:2cc1468da177 2227 */
<> 161:2cc1468da177 2228 __STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2229 {
<> 161:2cc1468da177 2230 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2231 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2232 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2233 }
<> 161:2cc1468da177 2234
<> 161:2cc1468da177 2235 /**
<> 161:2cc1468da177 2236 * @brief Indicates whether compare register (TIMx_CCRx) preload is enabled for the output channel.
<> 161:2cc1468da177 2237 * @rmtoll CCMR1 OC1PE LL_TIM_OC_IsEnabledPreload\n
<> 161:2cc1468da177 2238 * CCMR1 OC2PE LL_TIM_OC_IsEnabledPreload\n
<> 161:2cc1468da177 2239 * CCMR2 OC3PE LL_TIM_OC_IsEnabledPreload\n
<> 161:2cc1468da177 2240 * CCMR2 OC4PE LL_TIM_OC_IsEnabledPreload\n
<> 161:2cc1468da177 2241 * CCMR3 OC5PE LL_TIM_OC_IsEnabledPreload\n
<> 161:2cc1468da177 2242 * CCMR3 OC6PE LL_TIM_OC_IsEnabledPreload
<> 161:2cc1468da177 2243 * @param TIMx Timer instance
<> 161:2cc1468da177 2244 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2245 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2246 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2247 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2248 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2249 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2250 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2251 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 2252 */
<> 161:2cc1468da177 2253 __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2254 {
<> 161:2cc1468da177 2255 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2256 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2257 register uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel];
<> 161:2cc1468da177 2258 return (READ_BIT(*pReg, bitfield) == bitfield);
<> 161:2cc1468da177 2259 }
<> 161:2cc1468da177 2260
<> 161:2cc1468da177 2261 /**
<> 161:2cc1468da177 2262 * @brief Enable clearing the output channel on an external event.
<> 161:2cc1468da177 2263 * @note This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
<> 161:2cc1468da177 2264 * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 2265 * or not a timer instance can clear the OCxREF signal on an external event.
<> 161:2cc1468da177 2266 * @rmtoll CCMR1 OC1CE LL_TIM_OC_EnableClear\n
<> 161:2cc1468da177 2267 * CCMR1 OC2CE LL_TIM_OC_EnableClear\n
<> 161:2cc1468da177 2268 * CCMR2 OC3CE LL_TIM_OC_EnableClear\n
<> 161:2cc1468da177 2269 * CCMR2 OC4CE LL_TIM_OC_EnableClear\n
<> 161:2cc1468da177 2270 * CCMR3 OC5CE LL_TIM_OC_EnableClear\n
<> 161:2cc1468da177 2271 * CCMR3 OC6CE LL_TIM_OC_EnableClear
<> 161:2cc1468da177 2272 * @param TIMx Timer instance
<> 161:2cc1468da177 2273 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2274 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2275 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2276 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2277 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2278 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2279 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2280 * @retval None
<> 161:2cc1468da177 2281 */
<> 161:2cc1468da177 2282 __STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2283 {
<> 161:2cc1468da177 2284 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2285 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2286 SET_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2287 }
<> 161:2cc1468da177 2288
<> 161:2cc1468da177 2289 /**
<> 161:2cc1468da177 2290 * @brief Disable clearing the output channel on an external event.
<> 161:2cc1468da177 2291 * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 2292 * or not a timer instance can clear the OCxREF signal on an external event.
<> 161:2cc1468da177 2293 * @rmtoll CCMR1 OC1CE LL_TIM_OC_DisableClear\n
<> 161:2cc1468da177 2294 * CCMR1 OC2CE LL_TIM_OC_DisableClear\n
<> 161:2cc1468da177 2295 * CCMR2 OC3CE LL_TIM_OC_DisableClear\n
<> 161:2cc1468da177 2296 * CCMR2 OC4CE LL_TIM_OC_DisableClear\n
<> 161:2cc1468da177 2297 * CCMR3 OC5CE LL_TIM_OC_DisableClear\n
<> 161:2cc1468da177 2298 * CCMR3 OC6CE LL_TIM_OC_DisableClear
<> 161:2cc1468da177 2299 * @param TIMx Timer instance
<> 161:2cc1468da177 2300 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2301 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2302 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2303 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2304 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2305 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2306 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2307 * @retval None
<> 161:2cc1468da177 2308 */
<> 161:2cc1468da177 2309 __STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2310 {
<> 161:2cc1468da177 2311 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2312 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2313 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
<> 161:2cc1468da177 2314 }
<> 161:2cc1468da177 2315
<> 161:2cc1468da177 2316 /**
<> 161:2cc1468da177 2317 * @brief Indicates clearing the output channel on an external event is enabled for the output channel.
<> 161:2cc1468da177 2318 * @note This function enables clearing the output channel on an external event.
<> 161:2cc1468da177 2319 * @note This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
<> 161:2cc1468da177 2320 * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 2321 * or not a timer instance can clear the OCxREF signal on an external event.
<> 161:2cc1468da177 2322 * @rmtoll CCMR1 OC1CE LL_TIM_OC_IsEnabledClear\n
<> 161:2cc1468da177 2323 * CCMR1 OC2CE LL_TIM_OC_IsEnabledClear\n
<> 161:2cc1468da177 2324 * CCMR2 OC3CE LL_TIM_OC_IsEnabledClear\n
<> 161:2cc1468da177 2325 * CCMR2 OC4CE LL_TIM_OC_IsEnabledClear\n
<> 161:2cc1468da177 2326 * CCMR3 OC5CE LL_TIM_OC_IsEnabledClear\n
<> 161:2cc1468da177 2327 * CCMR3 OC6CE LL_TIM_OC_IsEnabledClear
<> 161:2cc1468da177 2328 * @param TIMx Timer instance
<> 161:2cc1468da177 2329 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2330 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2331 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2332 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2333 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2334 * @arg @ref LL_TIM_CHANNEL_CH5
<> 161:2cc1468da177 2335 * @arg @ref LL_TIM_CHANNEL_CH6
<> 161:2cc1468da177 2336 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 2337 */
<> 161:2cc1468da177 2338 __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2339 {
<> 161:2cc1468da177 2340 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2341 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2342 register uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel];
<> 161:2cc1468da177 2343 return (READ_BIT(*pReg, bitfield) == bitfield);
<> 161:2cc1468da177 2344 }
<> 161:2cc1468da177 2345
<> 161:2cc1468da177 2346 /**
<> 161:2cc1468da177 2347 * @brief Set the dead-time delay (delay inserted between the rising edge of the OCxREF signal and the rising edge if the Ocx and OCxN signals).
<> 161:2cc1468da177 2348 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2349 * dead-time insertion feature is supported by a timer instance.
<> 161:2cc1468da177 2350 * @note Helper macro @ref __LL_TIM_CALC_DEADTIME can be used to calculate the DeadTime parameter
<> 161:2cc1468da177 2351 * @rmtoll BDTR DTG LL_TIM_OC_SetDeadTime
<> 161:2cc1468da177 2352 * @param TIMx Timer instance
<> 161:2cc1468da177 2353 * @param DeadTime between Min_Data=0 and Max_Data=255
<> 161:2cc1468da177 2354 * @retval None
<> 161:2cc1468da177 2355 */
<> 161:2cc1468da177 2356 __STATIC_INLINE void LL_TIM_OC_SetDeadTime(TIM_TypeDef *TIMx, uint32_t DeadTime)
<> 161:2cc1468da177 2357 {
<> 161:2cc1468da177 2358 MODIFY_REG(TIMx->BDTR, TIM_BDTR_DTG, DeadTime);
<> 161:2cc1468da177 2359 }
<> 161:2cc1468da177 2360
<> 161:2cc1468da177 2361 /**
<> 161:2cc1468da177 2362 * @brief Set compare value for output channel 1 (TIMx_CCR1).
<> 161:2cc1468da177 2363 * @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2364 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2365 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2366 * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2367 * output channel 1 is supported by a timer instance.
<> 161:2cc1468da177 2368 * @rmtoll CCR1 CCR1 LL_TIM_OC_SetCompareCH1
<> 161:2cc1468da177 2369 * @param TIMx Timer instance
<> 161:2cc1468da177 2370 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2371 * @retval None
<> 161:2cc1468da177 2372 */
<> 161:2cc1468da177 2373 __STATIC_INLINE void LL_TIM_OC_SetCompareCH1(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2374 {
<> 161:2cc1468da177 2375 WRITE_REG(TIMx->CCR1, CompareValue);
<> 161:2cc1468da177 2376 }
<> 161:2cc1468da177 2377
<> 161:2cc1468da177 2378 /**
<> 161:2cc1468da177 2379 * @brief Set compare value for output channel 2 (TIMx_CCR2).
<> 161:2cc1468da177 2380 * @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2381 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2382 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2383 * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2384 * output channel 2 is supported by a timer instance.
<> 161:2cc1468da177 2385 * @rmtoll CCR2 CCR2 LL_TIM_OC_SetCompareCH2
<> 161:2cc1468da177 2386 * @param TIMx Timer instance
<> 161:2cc1468da177 2387 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2388 * @retval None
<> 161:2cc1468da177 2389 */
<> 161:2cc1468da177 2390 __STATIC_INLINE void LL_TIM_OC_SetCompareCH2(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2391 {
<> 161:2cc1468da177 2392 WRITE_REG(TIMx->CCR2, CompareValue);
<> 161:2cc1468da177 2393 }
<> 161:2cc1468da177 2394
<> 161:2cc1468da177 2395 /**
<> 161:2cc1468da177 2396 * @brief Set compare value for output channel 3 (TIMx_CCR3).
<> 161:2cc1468da177 2397 * @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2398 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2399 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2400 * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2401 * output channel is supported by a timer instance.
<> 161:2cc1468da177 2402 * @rmtoll CCR3 CCR3 LL_TIM_OC_SetCompareCH3
<> 161:2cc1468da177 2403 * @param TIMx Timer instance
<> 161:2cc1468da177 2404 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2405 * @retval None
<> 161:2cc1468da177 2406 */
<> 161:2cc1468da177 2407 __STATIC_INLINE void LL_TIM_OC_SetCompareCH3(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2408 {
<> 161:2cc1468da177 2409 WRITE_REG(TIMx->CCR3, CompareValue);
<> 161:2cc1468da177 2410 }
<> 161:2cc1468da177 2411
<> 161:2cc1468da177 2412 /**
<> 161:2cc1468da177 2413 * @brief Set compare value for output channel 4 (TIMx_CCR4).
<> 161:2cc1468da177 2414 * @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2415 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2416 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2417 * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2418 * output channel 4 is supported by a timer instance.
<> 161:2cc1468da177 2419 * @rmtoll CCR4 CCR4 LL_TIM_OC_SetCompareCH4
<> 161:2cc1468da177 2420 * @param TIMx Timer instance
<> 161:2cc1468da177 2421 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2422 * @retval None
<> 161:2cc1468da177 2423 */
<> 161:2cc1468da177 2424 __STATIC_INLINE void LL_TIM_OC_SetCompareCH4(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2425 {
<> 161:2cc1468da177 2426 WRITE_REG(TIMx->CCR4, CompareValue);
<> 161:2cc1468da177 2427 }
<> 161:2cc1468da177 2428
<> 161:2cc1468da177 2429 /**
<> 161:2cc1468da177 2430 * @brief Set compare value for output channel 5 (TIMx_CCR5).
<> 161:2cc1468da177 2431 * @note Macro @ref IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2432 * output channel 5 is supported by a timer instance.
<> 161:2cc1468da177 2433 * @rmtoll CCR5 CCR5 LL_TIM_OC_SetCompareCH5
<> 161:2cc1468da177 2434 * @param TIMx Timer instance
<> 161:2cc1468da177 2435 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2436 * @retval None
<> 161:2cc1468da177 2437 */
<> 161:2cc1468da177 2438 __STATIC_INLINE void LL_TIM_OC_SetCompareCH5(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2439 {
<> 161:2cc1468da177 2440 WRITE_REG(TIMx->CCR5, CompareValue);
<> 161:2cc1468da177 2441 }
<> 161:2cc1468da177 2442
<> 161:2cc1468da177 2443 /**
<> 161:2cc1468da177 2444 * @brief Set compare value for output channel 6 (TIMx_CCR6).
<> 161:2cc1468da177 2445 * @note Macro @ref IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2446 * output channel 6 is supported by a timer instance.
<> 161:2cc1468da177 2447 * @rmtoll CCR6 CCR6 LL_TIM_OC_SetCompareCH6
<> 161:2cc1468da177 2448 * @param TIMx Timer instance
<> 161:2cc1468da177 2449 * @param CompareValue between Min_Data=0 and Max_Data=65535
<> 161:2cc1468da177 2450 * @retval None
<> 161:2cc1468da177 2451 */
<> 161:2cc1468da177 2452 __STATIC_INLINE void LL_TIM_OC_SetCompareCH6(TIM_TypeDef *TIMx, uint32_t CompareValue)
<> 161:2cc1468da177 2453 {
<> 161:2cc1468da177 2454 WRITE_REG(TIMx->CCR6, CompareValue);
<> 161:2cc1468da177 2455 }
<> 161:2cc1468da177 2456
<> 161:2cc1468da177 2457 /**
<> 161:2cc1468da177 2458 * @brief Get compare value (TIMx_CCR1) set for output channel 1.
<> 161:2cc1468da177 2459 * @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2460 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2461 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2462 * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2463 * output channel 1 is supported by a timer instance.
<> 161:2cc1468da177 2464 * @rmtoll CCR1 CCR1 LL_TIM_OC_GetCompareCH1
<> 161:2cc1468da177 2465 * @param TIMx Timer instance
<> 161:2cc1468da177 2466 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2467 */
<> 161:2cc1468da177 2468 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2469 {
<> 161:2cc1468da177 2470 return (uint32_t)(READ_REG(TIMx->CCR1));
<> 161:2cc1468da177 2471 }
<> 161:2cc1468da177 2472
<> 161:2cc1468da177 2473 /**
<> 161:2cc1468da177 2474 * @brief Get compare value (TIMx_CCR2) set for output channel 2.
<> 161:2cc1468da177 2475 * @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2476 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2477 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2478 * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2479 * output channel 2 is supported by a timer instance.
<> 161:2cc1468da177 2480 * @rmtoll CCR2 CCR2 LL_TIM_OC_GetCompareCH2
<> 161:2cc1468da177 2481 * @param TIMx Timer instance
<> 161:2cc1468da177 2482 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2483 */
<> 161:2cc1468da177 2484 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2485 {
<> 161:2cc1468da177 2486 return (uint32_t)(READ_REG(TIMx->CCR2));
<> 161:2cc1468da177 2487 }
<> 161:2cc1468da177 2488
<> 161:2cc1468da177 2489 /**
<> 161:2cc1468da177 2490 * @brief Get compare value (TIMx_CCR3) set for output channel 3.
<> 161:2cc1468da177 2491 * @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2492 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2493 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2494 * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2495 * output channel 3 is supported by a timer instance.
<> 161:2cc1468da177 2496 * @rmtoll CCR3 CCR3 LL_TIM_OC_GetCompareCH3
<> 161:2cc1468da177 2497 * @param TIMx Timer instance
<> 161:2cc1468da177 2498 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2499 */
<> 161:2cc1468da177 2500 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2501 {
<> 161:2cc1468da177 2502 return (uint32_t)(READ_REG(TIMx->CCR3));
<> 161:2cc1468da177 2503 }
<> 161:2cc1468da177 2504
<> 161:2cc1468da177 2505 /**
<> 161:2cc1468da177 2506 * @brief Get compare value (TIMx_CCR4) set for output channel 4.
<> 161:2cc1468da177 2507 * @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2508 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2509 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2510 * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2511 * output channel 4 is supported by a timer instance.
<> 161:2cc1468da177 2512 * @rmtoll CCR4 CCR4 LL_TIM_OC_GetCompareCH4
<> 161:2cc1468da177 2513 * @param TIMx Timer instance
<> 161:2cc1468da177 2514 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2515 */
<> 161:2cc1468da177 2516 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2517 {
<> 161:2cc1468da177 2518 return (uint32_t)(READ_REG(TIMx->CCR4));
<> 161:2cc1468da177 2519 }
<> 161:2cc1468da177 2520
<> 161:2cc1468da177 2521 /**
<> 161:2cc1468da177 2522 * @brief Get compare value (TIMx_CCR5) set for output channel 5.
<> 161:2cc1468da177 2523 * @note Macro @ref IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2524 * output channel 5 is supported by a timer instance.
<> 161:2cc1468da177 2525 * @rmtoll CCR5 CCR5 LL_TIM_OC_GetCompareCH5
<> 161:2cc1468da177 2526 * @param TIMx Timer instance
<> 161:2cc1468da177 2527 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2528 */
<> 161:2cc1468da177 2529 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH5(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2530 {
<> 161:2cc1468da177 2531 return (uint32_t)(READ_REG(TIMx->CCR5));
<> 161:2cc1468da177 2532 }
<> 161:2cc1468da177 2533
<> 161:2cc1468da177 2534 /**
<> 161:2cc1468da177 2535 * @brief Get compare value (TIMx_CCR6) set for output channel 6.
<> 161:2cc1468da177 2536 * @note Macro @ref IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2537 * output channel 6 is supported by a timer instance.
<> 161:2cc1468da177 2538 * @rmtoll CCR6 CCR6 LL_TIM_OC_GetCompareCH6
<> 161:2cc1468da177 2539 * @param TIMx Timer instance
<> 161:2cc1468da177 2540 * @retval CompareValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2541 */
<> 161:2cc1468da177 2542 __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH6(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2543 {
<> 161:2cc1468da177 2544 return (uint32_t)(READ_REG(TIMx->CCR6));
<> 161:2cc1468da177 2545 }
<> 161:2cc1468da177 2546
<> 161:2cc1468da177 2547 /**
<> 161:2cc1468da177 2548 * @brief Select on which reference signal the OC5REF is combined to.
<> 161:2cc1468da177 2549 * @note Macro @ref IS_TIM_COMBINED3PHASEPWM_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2550 * whether or not a timer instance supports the combined 3-phase PWM mode.
<> 161:2cc1468da177 2551 * @rmtoll CCR5 GC5C3 LL_TIM_SetCH5CombinedChannels\n
<> 161:2cc1468da177 2552 * CCR5 GC5C2 LL_TIM_SetCH5CombinedChannels\n
<> 161:2cc1468da177 2553 * CCR5 GC5C1 LL_TIM_SetCH5CombinedChannels
<> 161:2cc1468da177 2554 * @param TIMx Timer instance
<> 161:2cc1468da177 2555 * @param GroupCH5 This parameter can be one of the following values:
<> 161:2cc1468da177 2556 * @arg @ref LL_TIM_GROUPCH5_NONE
<> 161:2cc1468da177 2557 * @arg @ref LL_TIM_GROUPCH5_OC1REFC
<> 161:2cc1468da177 2558 * @arg @ref LL_TIM_GROUPCH5_OC2REFC
<> 161:2cc1468da177 2559 * @arg @ref LL_TIM_GROUPCH5_OC3REFC
<> 161:2cc1468da177 2560 * @retval None
<> 161:2cc1468da177 2561 */
<> 161:2cc1468da177 2562 __STATIC_INLINE void LL_TIM_SetCH5CombinedChannels(TIM_TypeDef *TIMx, uint32_t GroupCH5)
<> 161:2cc1468da177 2563 {
<> 161:2cc1468da177 2564 MODIFY_REG(TIMx->CCR5, TIM_CCR5_CCR5, GroupCH5);
<> 161:2cc1468da177 2565 }
<> 161:2cc1468da177 2566
<> 161:2cc1468da177 2567 /**
<> 161:2cc1468da177 2568 * @}
<> 161:2cc1468da177 2569 */
<> 161:2cc1468da177 2570
<> 161:2cc1468da177 2571 /** @defgroup TIM_LL_EF_Input_Channel Input channel configuration
<> 161:2cc1468da177 2572 * @{
<> 161:2cc1468da177 2573 */
<> 161:2cc1468da177 2574 /**
<> 161:2cc1468da177 2575 * @brief Configure input channel.
<> 161:2cc1468da177 2576 * @rmtoll CCMR1 CC1S LL_TIM_IC_Config\n
<> 161:2cc1468da177 2577 * CCMR1 IC1PSC LL_TIM_IC_Config\n
<> 161:2cc1468da177 2578 * CCMR1 IC1F LL_TIM_IC_Config\n
<> 161:2cc1468da177 2579 * CCMR1 CC2S LL_TIM_IC_Config\n
<> 161:2cc1468da177 2580 * CCMR1 IC2PSC LL_TIM_IC_Config\n
<> 161:2cc1468da177 2581 * CCMR1 IC2F LL_TIM_IC_Config\n
<> 161:2cc1468da177 2582 * CCMR2 CC3S LL_TIM_IC_Config\n
<> 161:2cc1468da177 2583 * CCMR2 IC3PSC LL_TIM_IC_Config\n
<> 161:2cc1468da177 2584 * CCMR2 IC3F LL_TIM_IC_Config\n
<> 161:2cc1468da177 2585 * CCMR2 CC4S LL_TIM_IC_Config\n
<> 161:2cc1468da177 2586 * CCMR2 IC4PSC LL_TIM_IC_Config\n
<> 161:2cc1468da177 2587 * CCMR2 IC4F LL_TIM_IC_Config\n
<> 161:2cc1468da177 2588 * CCER CC1P LL_TIM_IC_Config\n
<> 161:2cc1468da177 2589 * CCER CC1NP LL_TIM_IC_Config\n
<> 161:2cc1468da177 2590 * CCER CC2P LL_TIM_IC_Config\n
<> 161:2cc1468da177 2591 * CCER CC2NP LL_TIM_IC_Config\n
<> 161:2cc1468da177 2592 * CCER CC3P LL_TIM_IC_Config\n
<> 161:2cc1468da177 2593 * CCER CC3NP LL_TIM_IC_Config\n
<> 161:2cc1468da177 2594 * CCER CC4P LL_TIM_IC_Config\n
<> 161:2cc1468da177 2595 * CCER CC4NP LL_TIM_IC_Config
<> 161:2cc1468da177 2596 * @param TIMx Timer instance
<> 161:2cc1468da177 2597 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2598 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2599 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2600 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2601 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2602 * @param Configuration This parameter must be a combination of all the following values:
<> 161:2cc1468da177 2603 * @arg @ref LL_TIM_ACTIVEINPUT_DIRECTTI or @ref LL_TIM_ACTIVEINPUT_INDIRECTTI or @ref LL_TIM_ACTIVEINPUT_TRC
<> 161:2cc1468da177 2604 * @arg @ref LL_TIM_ICPSC_DIV1 or ... or @ref LL_TIM_ICPSC_DIV8
<> 161:2cc1468da177 2605 * @arg @ref LL_TIM_IC_FILTER_FDIV1 or ... or @ref LL_TIM_IC_FILTER_FDIV32_N8
<> 161:2cc1468da177 2606 * @arg @ref LL_TIM_IC_POLARITY_RISING or @ref LL_TIM_IC_POLARITY_FALLING or @ref LL_TIM_IC_POLARITY_BOTHEDGE
<> 161:2cc1468da177 2607 * @retval None
<> 161:2cc1468da177 2608 */
<> 161:2cc1468da177 2609 __STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
<> 161:2cc1468da177 2610 {
<> 161:2cc1468da177 2611 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2612 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2613 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]),
<> 161:2cc1468da177 2614 ((Configuration >> 16U) & (TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S)) << SHIFT_TAB_ICxx[iChannel]);
<> 161:2cc1468da177 2615 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
<> 161:2cc1468da177 2616 (Configuration & (TIM_CCER_CC1NP | TIM_CCER_CC1P)) << SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 2617 }
<> 161:2cc1468da177 2618
<> 161:2cc1468da177 2619 /**
<> 161:2cc1468da177 2620 * @brief Set the active input.
<> 161:2cc1468da177 2621 * @rmtoll CCMR1 CC1S LL_TIM_IC_SetActiveInput\n
<> 161:2cc1468da177 2622 * CCMR1 CC2S LL_TIM_IC_SetActiveInput\n
<> 161:2cc1468da177 2623 * CCMR2 CC3S LL_TIM_IC_SetActiveInput\n
<> 161:2cc1468da177 2624 * CCMR2 CC4S LL_TIM_IC_SetActiveInput
<> 161:2cc1468da177 2625 * @param TIMx Timer instance
<> 161:2cc1468da177 2626 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2627 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2628 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2629 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2630 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2631 * @param ICActiveInput This parameter can be one of the following values:
<> 161:2cc1468da177 2632 * @arg @ref LL_TIM_ACTIVEINPUT_DIRECTTI
<> 161:2cc1468da177 2633 * @arg @ref LL_TIM_ACTIVEINPUT_INDIRECTTI
<> 161:2cc1468da177 2634 * @arg @ref LL_TIM_ACTIVEINPUT_TRC
<> 161:2cc1468da177 2635 * @retval None
<> 161:2cc1468da177 2636 */
<> 161:2cc1468da177 2637 __STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput)
<> 161:2cc1468da177 2638 {
<> 161:2cc1468da177 2639 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2640 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2641 MODIFY_REG(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), (ICActiveInput >> 16U) << SHIFT_TAB_ICxx[iChannel]);
<> 161:2cc1468da177 2642 }
<> 161:2cc1468da177 2643
<> 161:2cc1468da177 2644 /**
<> 161:2cc1468da177 2645 * @brief Get the current active input.
<> 161:2cc1468da177 2646 * @rmtoll CCMR1 CC1S LL_TIM_IC_GetActiveInput\n
<> 161:2cc1468da177 2647 * CCMR1 CC2S LL_TIM_IC_GetActiveInput\n
<> 161:2cc1468da177 2648 * CCMR2 CC3S LL_TIM_IC_GetActiveInput\n
<> 161:2cc1468da177 2649 * CCMR2 CC4S LL_TIM_IC_GetActiveInput
<> 161:2cc1468da177 2650 * @param TIMx Timer instance
<> 161:2cc1468da177 2651 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2652 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2653 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2654 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2655 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2656 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2657 * @arg @ref LL_TIM_ACTIVEINPUT_DIRECTTI
<> 161:2cc1468da177 2658 * @arg @ref LL_TIM_ACTIVEINPUT_INDIRECTTI
<> 161:2cc1468da177 2659 * @arg @ref LL_TIM_ACTIVEINPUT_TRC
<> 161:2cc1468da177 2660 */
<> 161:2cc1468da177 2661 __STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2662 {
<> 161:2cc1468da177 2663 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2664 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2665 return ((READ_BIT(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
<> 161:2cc1468da177 2666 }
<> 161:2cc1468da177 2667
<> 161:2cc1468da177 2668 /**
<> 161:2cc1468da177 2669 * @brief Set the prescaler of input channel.
<> 161:2cc1468da177 2670 * @rmtoll CCMR1 IC1PSC LL_TIM_IC_SetPrescaler\n
<> 161:2cc1468da177 2671 * CCMR1 IC2PSC LL_TIM_IC_SetPrescaler\n
<> 161:2cc1468da177 2672 * CCMR2 IC3PSC LL_TIM_IC_SetPrescaler\n
<> 161:2cc1468da177 2673 * CCMR2 IC4PSC LL_TIM_IC_SetPrescaler
<> 161:2cc1468da177 2674 * @param TIMx Timer instance
<> 161:2cc1468da177 2675 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2676 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2677 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2678 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2679 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2680 * @param ICPrescaler This parameter can be one of the following values:
<> 161:2cc1468da177 2681 * @arg @ref LL_TIM_ICPSC_DIV1
<> 161:2cc1468da177 2682 * @arg @ref LL_TIM_ICPSC_DIV2
<> 161:2cc1468da177 2683 * @arg @ref LL_TIM_ICPSC_DIV4
<> 161:2cc1468da177 2684 * @arg @ref LL_TIM_ICPSC_DIV8
<> 161:2cc1468da177 2685 * @retval None
<> 161:2cc1468da177 2686 */
<> 161:2cc1468da177 2687 __STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler)
<> 161:2cc1468da177 2688 {
<> 161:2cc1468da177 2689 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2690 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2691 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel]), (ICPrescaler >> 16U) << SHIFT_TAB_ICxx[iChannel]);
<> 161:2cc1468da177 2692 }
<> 161:2cc1468da177 2693
<> 161:2cc1468da177 2694 /**
<> 161:2cc1468da177 2695 * @brief Get the current prescaler value acting on an input channel.
<> 161:2cc1468da177 2696 * @rmtoll CCMR1 IC1PSC LL_TIM_IC_GetPrescaler\n
<> 161:2cc1468da177 2697 * CCMR1 IC2PSC LL_TIM_IC_GetPrescaler\n
<> 161:2cc1468da177 2698 * CCMR2 IC3PSC LL_TIM_IC_GetPrescaler\n
<> 161:2cc1468da177 2699 * CCMR2 IC4PSC LL_TIM_IC_GetPrescaler
<> 161:2cc1468da177 2700 * @param TIMx Timer instance
<> 161:2cc1468da177 2701 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2702 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2703 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2704 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2705 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2706 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2707 * @arg @ref LL_TIM_ICPSC_DIV1
<> 161:2cc1468da177 2708 * @arg @ref LL_TIM_ICPSC_DIV2
<> 161:2cc1468da177 2709 * @arg @ref LL_TIM_ICPSC_DIV4
<> 161:2cc1468da177 2710 * @arg @ref LL_TIM_ICPSC_DIV8
<> 161:2cc1468da177 2711 */
<> 161:2cc1468da177 2712 __STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2713 {
<> 161:2cc1468da177 2714 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2715 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2716 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
<> 161:2cc1468da177 2717 }
<> 161:2cc1468da177 2718
<> 161:2cc1468da177 2719 /**
<> 161:2cc1468da177 2720 * @brief Set the input filter duration.
<> 161:2cc1468da177 2721 * @rmtoll CCMR1 IC1F LL_TIM_IC_SetFilter\n
<> 161:2cc1468da177 2722 * CCMR1 IC2F LL_TIM_IC_SetFilter\n
<> 161:2cc1468da177 2723 * CCMR2 IC3F LL_TIM_IC_SetFilter\n
<> 161:2cc1468da177 2724 * CCMR2 IC4F LL_TIM_IC_SetFilter
<> 161:2cc1468da177 2725 * @param TIMx Timer instance
<> 161:2cc1468da177 2726 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2727 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2728 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2729 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2730 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2731 * @param ICFilter This parameter can be one of the following values:
<> 161:2cc1468da177 2732 * @arg @ref LL_TIM_IC_FILTER_FDIV1
<> 161:2cc1468da177 2733 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N2
<> 161:2cc1468da177 2734 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N4
<> 161:2cc1468da177 2735 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N8
<> 161:2cc1468da177 2736 * @arg @ref LL_TIM_IC_FILTER_FDIV2_N6
<> 161:2cc1468da177 2737 * @arg @ref LL_TIM_IC_FILTER_FDIV2_N8
<> 161:2cc1468da177 2738 * @arg @ref LL_TIM_IC_FILTER_FDIV4_N6
<> 161:2cc1468da177 2739 * @arg @ref LL_TIM_IC_FILTER_FDIV4_N8
<> 161:2cc1468da177 2740 * @arg @ref LL_TIM_IC_FILTER_FDIV8_N6
<> 161:2cc1468da177 2741 * @arg @ref LL_TIM_IC_FILTER_FDIV8_N8
<> 161:2cc1468da177 2742 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N5
<> 161:2cc1468da177 2743 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N6
<> 161:2cc1468da177 2744 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N8
<> 161:2cc1468da177 2745 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N5
<> 161:2cc1468da177 2746 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N6
<> 161:2cc1468da177 2747 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N8
<> 161:2cc1468da177 2748 * @retval None
<> 161:2cc1468da177 2749 */
<> 161:2cc1468da177 2750 __STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter)
<> 161:2cc1468da177 2751 {
<> 161:2cc1468da177 2752 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2753 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2754 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel]), (ICFilter >> 16U) << SHIFT_TAB_ICxx[iChannel]);
<> 161:2cc1468da177 2755 }
<> 161:2cc1468da177 2756
<> 161:2cc1468da177 2757 /**
<> 161:2cc1468da177 2758 * @brief Get the input filter duration.
<> 161:2cc1468da177 2759 * @rmtoll CCMR1 IC1F LL_TIM_IC_GetFilter\n
<> 161:2cc1468da177 2760 * CCMR1 IC2F LL_TIM_IC_GetFilter\n
<> 161:2cc1468da177 2761 * CCMR2 IC3F LL_TIM_IC_GetFilter\n
<> 161:2cc1468da177 2762 * CCMR2 IC4F LL_TIM_IC_GetFilter
<> 161:2cc1468da177 2763 * @param TIMx Timer instance
<> 161:2cc1468da177 2764 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2765 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2766 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2767 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2768 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2769 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2770 * @arg @ref LL_TIM_IC_FILTER_FDIV1
<> 161:2cc1468da177 2771 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N2
<> 161:2cc1468da177 2772 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N4
<> 161:2cc1468da177 2773 * @arg @ref LL_TIM_IC_FILTER_FDIV1_N8
<> 161:2cc1468da177 2774 * @arg @ref LL_TIM_IC_FILTER_FDIV2_N6
<> 161:2cc1468da177 2775 * @arg @ref LL_TIM_IC_FILTER_FDIV2_N8
<> 161:2cc1468da177 2776 * @arg @ref LL_TIM_IC_FILTER_FDIV4_N6
<> 161:2cc1468da177 2777 * @arg @ref LL_TIM_IC_FILTER_FDIV4_N8
<> 161:2cc1468da177 2778 * @arg @ref LL_TIM_IC_FILTER_FDIV8_N6
<> 161:2cc1468da177 2779 * @arg @ref LL_TIM_IC_FILTER_FDIV8_N8
<> 161:2cc1468da177 2780 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N5
<> 161:2cc1468da177 2781 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N6
<> 161:2cc1468da177 2782 * @arg @ref LL_TIM_IC_FILTER_FDIV16_N8
<> 161:2cc1468da177 2783 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N5
<> 161:2cc1468da177 2784 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N6
<> 161:2cc1468da177 2785 * @arg @ref LL_TIM_IC_FILTER_FDIV32_N8
<> 161:2cc1468da177 2786 */
<> 161:2cc1468da177 2787 __STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2788 {
<> 161:2cc1468da177 2789 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2790 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
<> 161:2cc1468da177 2791 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
<> 161:2cc1468da177 2792 }
<> 161:2cc1468da177 2793
<> 161:2cc1468da177 2794 /**
<> 161:2cc1468da177 2795 * @brief Set the input channel polarity.
<> 161:2cc1468da177 2796 * @rmtoll CCER CC1P LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2797 * CCER CC1NP LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2798 * CCER CC2P LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2799 * CCER CC2NP LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2800 * CCER CC3P LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2801 * CCER CC3NP LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2802 * CCER CC4P LL_TIM_IC_SetPolarity\n
<> 161:2cc1468da177 2803 * CCER CC4NP LL_TIM_IC_SetPolarity
<> 161:2cc1468da177 2804 * @param TIMx Timer instance
<> 161:2cc1468da177 2805 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2806 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2807 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2808 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2809 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2810 * @param ICPolarity This parameter can be one of the following values:
<> 161:2cc1468da177 2811 * @arg @ref LL_TIM_IC_POLARITY_RISING
<> 161:2cc1468da177 2812 * @arg @ref LL_TIM_IC_POLARITY_FALLING
<> 161:2cc1468da177 2813 * @arg @ref LL_TIM_IC_POLARITY_BOTHEDGE
<> 161:2cc1468da177 2814 * @retval None
<> 161:2cc1468da177 2815 */
<> 161:2cc1468da177 2816 __STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity)
<> 161:2cc1468da177 2817 {
<> 161:2cc1468da177 2818 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2819 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
<> 161:2cc1468da177 2820 ICPolarity << SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 2821 }
<> 161:2cc1468da177 2822
<> 161:2cc1468da177 2823 /**
<> 161:2cc1468da177 2824 * @brief Get the current input channel polarity.
<> 161:2cc1468da177 2825 * @rmtoll CCER CC1P LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2826 * CCER CC1NP LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2827 * CCER CC2P LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2828 * CCER CC2NP LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2829 * CCER CC3P LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2830 * CCER CC3NP LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2831 * CCER CC4P LL_TIM_IC_GetPolarity\n
<> 161:2cc1468da177 2832 * CCER CC4NP LL_TIM_IC_GetPolarity
<> 161:2cc1468da177 2833 * @param TIMx Timer instance
<> 161:2cc1468da177 2834 * @param Channel This parameter can be one of the following values:
<> 161:2cc1468da177 2835 * @arg @ref LL_TIM_CHANNEL_CH1
<> 161:2cc1468da177 2836 * @arg @ref LL_TIM_CHANNEL_CH2
<> 161:2cc1468da177 2837 * @arg @ref LL_TIM_CHANNEL_CH3
<> 161:2cc1468da177 2838 * @arg @ref LL_TIM_CHANNEL_CH4
<> 161:2cc1468da177 2839 * @retval Returned value can be one of the following values:
<> 161:2cc1468da177 2840 * @arg @ref LL_TIM_IC_POLARITY_RISING
<> 161:2cc1468da177 2841 * @arg @ref LL_TIM_IC_POLARITY_FALLING
<> 161:2cc1468da177 2842 * @arg @ref LL_TIM_IC_POLARITY_BOTHEDGE
<> 161:2cc1468da177 2843 */
<> 161:2cc1468da177 2844 __STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel)
<> 161:2cc1468da177 2845 {
<> 161:2cc1468da177 2846 register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
<> 161:2cc1468da177 2847 return (READ_BIT(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel])) >>
<> 161:2cc1468da177 2848 SHIFT_TAB_CCxP[iChannel]);
<> 161:2cc1468da177 2849 }
<> 161:2cc1468da177 2850
<> 161:2cc1468da177 2851 /**
<> 161:2cc1468da177 2852 * @brief Connect the TIMx_CH1, CH2 and CH3 pins to the TI1 input (XOR combination).
<> 161:2cc1468da177 2853 * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2854 * a timer instance provides an XOR input.
<> 161:2cc1468da177 2855 * @rmtoll CR2 TI1S LL_TIM_IC_EnableXORCombination
<> 161:2cc1468da177 2856 * @param TIMx Timer instance
<> 161:2cc1468da177 2857 * @retval None
<> 161:2cc1468da177 2858 */
<> 161:2cc1468da177 2859 __STATIC_INLINE void LL_TIM_IC_EnableXORCombination(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2860 {
<> 161:2cc1468da177 2861 SET_BIT(TIMx->CR2, TIM_CR2_TI1S);
<> 161:2cc1468da177 2862 }
<> 161:2cc1468da177 2863
<> 161:2cc1468da177 2864 /**
<> 161:2cc1468da177 2865 * @brief Disconnect the TIMx_CH1, CH2 and CH3 pins from the TI1 input.
<> 161:2cc1468da177 2866 * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2867 * a timer instance provides an XOR input.
<> 161:2cc1468da177 2868 * @rmtoll CR2 TI1S LL_TIM_IC_DisableXORCombination
<> 161:2cc1468da177 2869 * @param TIMx Timer instance
<> 161:2cc1468da177 2870 * @retval None
<> 161:2cc1468da177 2871 */
<> 161:2cc1468da177 2872 __STATIC_INLINE void LL_TIM_IC_DisableXORCombination(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2873 {
<> 161:2cc1468da177 2874 CLEAR_BIT(TIMx->CR2, TIM_CR2_TI1S);
<> 161:2cc1468da177 2875 }
<> 161:2cc1468da177 2876
<> 161:2cc1468da177 2877 /**
<> 161:2cc1468da177 2878 * @brief Indicates whether the TIMx_CH1, CH2 and CH3 pins are connectected to the TI1 input.
<> 161:2cc1468da177 2879 * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2880 * a timer instance provides an XOR input.
<> 161:2cc1468da177 2881 * @rmtoll CR2 TI1S LL_TIM_IC_IsEnabledXORCombination
<> 161:2cc1468da177 2882 * @param TIMx Timer instance
<> 161:2cc1468da177 2883 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 2884 */
<> 161:2cc1468da177 2885 __STATIC_INLINE uint32_t LL_TIM_IC_IsEnabledXORCombination(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2886 {
<> 161:2cc1468da177 2887 return (READ_BIT(TIMx->CR2, TIM_CR2_TI1S) == (TIM_CR2_TI1S));
<> 161:2cc1468da177 2888 }
<> 161:2cc1468da177 2889
<> 161:2cc1468da177 2890 /**
<> 161:2cc1468da177 2891 * @brief Get captured value for input channel 1.
<> 161:2cc1468da177 2892 * @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2893 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2894 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2895 * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2896 * input channel 1 is supported by a timer instance.
<> 161:2cc1468da177 2897 * @rmtoll CCR1 CCR1 LL_TIM_IC_GetCaptureCH1
<> 161:2cc1468da177 2898 * @param TIMx Timer instance
<> 161:2cc1468da177 2899 * @retval CapturedValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2900 */
<> 161:2cc1468da177 2901 __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2902 {
<> 161:2cc1468da177 2903 return (uint32_t)(READ_REG(TIMx->CCR1));
<> 161:2cc1468da177 2904 }
<> 161:2cc1468da177 2905
<> 161:2cc1468da177 2906 /**
<> 161:2cc1468da177 2907 * @brief Get captured value for input channel 2.
<> 161:2cc1468da177 2908 * @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2909 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2910 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2911 * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2912 * input channel 2 is supported by a timer instance.
<> 161:2cc1468da177 2913 * @rmtoll CCR2 CCR2 LL_TIM_IC_GetCaptureCH2
<> 161:2cc1468da177 2914 * @param TIMx Timer instance
<> 161:2cc1468da177 2915 * @retval CapturedValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2916 */
<> 161:2cc1468da177 2917 __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2918 {
<> 161:2cc1468da177 2919 return (uint32_t)(READ_REG(TIMx->CCR2));
<> 161:2cc1468da177 2920 }
<> 161:2cc1468da177 2921
<> 161:2cc1468da177 2922 /**
<> 161:2cc1468da177 2923 * @brief Get captured value for input channel 3.
<> 161:2cc1468da177 2924 * @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2925 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2926 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2927 * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2928 * input channel 3 is supported by a timer instance.
<> 161:2cc1468da177 2929 * @rmtoll CCR3 CCR3 LL_TIM_IC_GetCaptureCH3
<> 161:2cc1468da177 2930 * @param TIMx Timer instance
<> 161:2cc1468da177 2931 * @retval CapturedValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2932 */
<> 161:2cc1468da177 2933 __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2934 {
<> 161:2cc1468da177 2935 return (uint32_t)(READ_REG(TIMx->CCR3));
<> 161:2cc1468da177 2936 }
<> 161:2cc1468da177 2937
<> 161:2cc1468da177 2938 /**
<> 161:2cc1468da177 2939 * @brief Get captured value for input channel 4.
<> 161:2cc1468da177 2940 * @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
<> 161:2cc1468da177 2941 * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2942 * whether or not a timer instance supports a 32 bits counter.
<> 161:2cc1468da177 2943 * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 2944 * input channel 4 is supported by a timer instance.
<> 161:2cc1468da177 2945 * @rmtoll CCR4 CCR4 LL_TIM_IC_GetCaptureCH4
<> 161:2cc1468da177 2946 * @param TIMx Timer instance
<> 161:2cc1468da177 2947 * @retval CapturedValue (between Min_Data=0 and Max_Data=65535)
<> 161:2cc1468da177 2948 */
<> 161:2cc1468da177 2949 __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2950 {
<> 161:2cc1468da177 2951 return (uint32_t)(READ_REG(TIMx->CCR4));
<> 161:2cc1468da177 2952 }
<> 161:2cc1468da177 2953
<> 161:2cc1468da177 2954 /**
<> 161:2cc1468da177 2955 * @}
<> 161:2cc1468da177 2956 */
<> 161:2cc1468da177 2957
<> 161:2cc1468da177 2958 /** @defgroup TIM_LL_EF_Clock_Selection Counter clock selection
<> 161:2cc1468da177 2959 * @{
<> 161:2cc1468da177 2960 */
<> 161:2cc1468da177 2961 /**
<> 161:2cc1468da177 2962 * @brief Enable external clock mode 2.
<> 161:2cc1468da177 2963 * @note When external clock mode 2 is enabled the counter is clocked by any active edge on the ETRF signal.
<> 161:2cc1468da177 2964 * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2965 * whether or not a timer instance supports external clock mode2.
<> 161:2cc1468da177 2966 * @rmtoll SMCR ECE LL_TIM_EnableExternalClock
<> 161:2cc1468da177 2967 * @param TIMx Timer instance
<> 161:2cc1468da177 2968 * @retval None
<> 161:2cc1468da177 2969 */
<> 161:2cc1468da177 2970 __STATIC_INLINE void LL_TIM_EnableExternalClock(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2971 {
<> 161:2cc1468da177 2972 SET_BIT(TIMx->SMCR, TIM_SMCR_ECE);
<> 161:2cc1468da177 2973 }
<> 161:2cc1468da177 2974
<> 161:2cc1468da177 2975 /**
<> 161:2cc1468da177 2976 * @brief Disable external clock mode 2.
<> 161:2cc1468da177 2977 * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2978 * whether or not a timer instance supports external clock mode2.
<> 161:2cc1468da177 2979 * @rmtoll SMCR ECE LL_TIM_DisableExternalClock
<> 161:2cc1468da177 2980 * @param TIMx Timer instance
<> 161:2cc1468da177 2981 * @retval None
<> 161:2cc1468da177 2982 */
<> 161:2cc1468da177 2983 __STATIC_INLINE void LL_TIM_DisableExternalClock(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2984 {
<> 161:2cc1468da177 2985 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_ECE);
<> 161:2cc1468da177 2986 }
<> 161:2cc1468da177 2987
<> 161:2cc1468da177 2988 /**
<> 161:2cc1468da177 2989 * @brief Indicate whether external clock mode 2 is enabled.
<> 161:2cc1468da177 2990 * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 2991 * whether or not a timer instance supports external clock mode2.
<> 161:2cc1468da177 2992 * @rmtoll SMCR ECE LL_TIM_IsEnabledExternalClock
<> 161:2cc1468da177 2993 * @param TIMx Timer instance
<> 161:2cc1468da177 2994 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 2995 */
<> 161:2cc1468da177 2996 __STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 2997 {
<> 161:2cc1468da177 2998 return (READ_BIT(TIMx->SMCR, TIM_SMCR_ECE) == (TIM_SMCR_ECE));
<> 161:2cc1468da177 2999 }
<> 161:2cc1468da177 3000
<> 161:2cc1468da177 3001 /**
<> 161:2cc1468da177 3002 * @brief Set the clock source of the counter clock.
<> 161:2cc1468da177 3003 * @note when selected clock source is external clock mode 1, the timer input
<> 161:2cc1468da177 3004 * the external clock is applied is selected by calling the @ref LL_TIM_SetTriggerInput()
<> 161:2cc1468da177 3005 * function. This timer input must be configured by calling
<> 161:2cc1468da177 3006 * the @ref LL_TIM_IC_Config() function.
<> 161:2cc1468da177 3007 * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 3008 * whether or not a timer instance supports external clock mode1.
<> 161:2cc1468da177 3009 * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 3010 * whether or not a timer instance supports external clock mode2.
<> 161:2cc1468da177 3011 * @rmtoll SMCR SMS LL_TIM_SetClockSource\n
<> 161:2cc1468da177 3012 * SMCR ECE LL_TIM_SetClockSource
<> 161:2cc1468da177 3013 * @param TIMx Timer instance
<> 161:2cc1468da177 3014 * @param ClockSource This parameter can be one of the following values:
<> 161:2cc1468da177 3015 * @arg @ref LL_TIM_CLOCKSOURCE_INTERNAL
<> 161:2cc1468da177 3016 * @arg @ref LL_TIM_CLOCKSOURCE_EXT_MODE1
<> 161:2cc1468da177 3017 * @arg @ref LL_TIM_CLOCKSOURCE_EXT_MODE2
<> 161:2cc1468da177 3018 * @retval None
<> 161:2cc1468da177 3019 */
<> 161:2cc1468da177 3020 __STATIC_INLINE void LL_TIM_SetClockSource(TIM_TypeDef *TIMx, uint32_t ClockSource)
<> 161:2cc1468da177 3021 {
<> 161:2cc1468da177 3022 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS | TIM_SMCR_ECE, ClockSource);
<> 161:2cc1468da177 3023 }
<> 161:2cc1468da177 3024
<> 161:2cc1468da177 3025 /**
<> 161:2cc1468da177 3026 * @brief Set the encoder interface mode.
<> 161:2cc1468da177 3027 * @note Macro @ref IS_TIM_ENCODER_INTERFACE_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 3028 * whether or not a timer instance supports the encoder mode.
<> 161:2cc1468da177 3029 * @rmtoll SMCR SMS LL_TIM_SetEncoderMode
<> 161:2cc1468da177 3030 * @param TIMx Timer instance
<> 161:2cc1468da177 3031 * @param EncoderMode This parameter can be one of the following values:
<> 161:2cc1468da177 3032 * @arg @ref LL_TIM_ENCODERMODE_X2_TI1
<> 161:2cc1468da177 3033 * @arg @ref LL_TIM_ENCODERMODE_X2_TI2
<> 161:2cc1468da177 3034 * @arg @ref LL_TIM_ENCODERMODE_X4_TI12
<> 161:2cc1468da177 3035 * @retval None
<> 161:2cc1468da177 3036 */
<> 161:2cc1468da177 3037 __STATIC_INLINE void LL_TIM_SetEncoderMode(TIM_TypeDef *TIMx, uint32_t EncoderMode)
<> 161:2cc1468da177 3038 {
<> 161:2cc1468da177 3039 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, EncoderMode);
<> 161:2cc1468da177 3040 }
<> 161:2cc1468da177 3041
<> 161:2cc1468da177 3042 /**
<> 161:2cc1468da177 3043 * @}
<> 161:2cc1468da177 3044 */
<> 161:2cc1468da177 3045
<> 161:2cc1468da177 3046 /** @defgroup TIM_LL_EF_Timer_Synchronization Timer synchronisation configuration
<> 161:2cc1468da177 3047 * @{
<> 161:2cc1468da177 3048 */
<> 161:2cc1468da177 3049 /**
<> 161:2cc1468da177 3050 * @brief Set the trigger output (TRGO) used for timer synchronization .
<> 161:2cc1468da177 3051 * @note Macro @ref IS_TIM_MASTER_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 3052 * whether or not a timer instance can operate as a master timer.
<> 161:2cc1468da177 3053 * @rmtoll CR2 MMS LL_TIM_SetTriggerOutput
<> 161:2cc1468da177 3054 * @param TIMx Timer instance
<> 161:2cc1468da177 3055 * @param TimerSynchronization This parameter can be one of the following values:
<> 161:2cc1468da177 3056 * @arg @ref LL_TIM_TRGO_RESET
<> 161:2cc1468da177 3057 * @arg @ref LL_TIM_TRGO_ENABLE
<> 161:2cc1468da177 3058 * @arg @ref LL_TIM_TRGO_UPDATE
<> 161:2cc1468da177 3059 * @arg @ref LL_TIM_TRGO_CC1IF
<> 161:2cc1468da177 3060 * @arg @ref LL_TIM_TRGO_OC1REF
<> 161:2cc1468da177 3061 * @arg @ref LL_TIM_TRGO_OC2REF
<> 161:2cc1468da177 3062 * @arg @ref LL_TIM_TRGO_OC3REF
<> 161:2cc1468da177 3063 * @arg @ref LL_TIM_TRGO_OC4REF
<> 161:2cc1468da177 3064 * @retval None
<> 161:2cc1468da177 3065 */
<> 161:2cc1468da177 3066 __STATIC_INLINE void LL_TIM_SetTriggerOutput(TIM_TypeDef *TIMx, uint32_t TimerSynchronization)
<> 161:2cc1468da177 3067 {
<> 161:2cc1468da177 3068 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS, TimerSynchronization);
<> 161:2cc1468da177 3069 }
<> 161:2cc1468da177 3070
<> 161:2cc1468da177 3071 /**
<> 161:2cc1468da177 3072 * @brief Set the trigger output 2 (TRGO2) used for ADC synchronization .
<> 161:2cc1468da177 3073 * @note Macro @ref IS_TIM_TRGO2_INSTANCE(TIMx) can be used to check
<> 161:2cc1468da177 3074 * whether or not a timer instance can be used for ADC synchronization.
<> 161:2cc1468da177 3075 * @rmtoll CR2 MMS2 LL_TIM_SetTriggerOutput2
<> 161:2cc1468da177 3076 * @param TIMx Timer Instance
<> 161:2cc1468da177 3077 * @param ADCSynchronization This parameter can be one of the following values:
<> 161:2cc1468da177 3078 * @arg @ref LL_TIM_TRGO2_RESET
<> 161:2cc1468da177 3079 * @arg @ref LL_TIM_TRGO2_ENABLE
<> 161:2cc1468da177 3080 * @arg @ref LL_TIM_TRGO2_UPDATE
<> 161:2cc1468da177 3081 * @arg @ref LL_TIM_TRGO2_CC1F
<> 161:2cc1468da177 3082 * @arg @ref LL_TIM_TRGO2_OC1
<> 161:2cc1468da177 3083 * @arg @ref LL_TIM_TRGO2_OC2
<> 161:2cc1468da177 3084 * @arg @ref LL_TIM_TRGO2_OC3
<> 161:2cc1468da177 3085 * @arg @ref LL_TIM_TRGO2_OC4
<> 161:2cc1468da177 3086 * @arg @ref LL_TIM_TRGO2_OC5
<> 161:2cc1468da177 3087 * @arg @ref LL_TIM_TRGO2_OC6
<> 161:2cc1468da177 3088 * @arg @ref LL_TIM_TRGO2_OC4_RISINGFALLING
<> 161:2cc1468da177 3089 * @arg @ref LL_TIM_TRGO2_OC6_RISINGFALLING
<> 161:2cc1468da177 3090 * @arg @ref LL_TIM_TRGO2_OC4_RISING_OC6_RISING
<> 161:2cc1468da177 3091 * @arg @ref LL_TIM_TRGO2_OC4_RISING_OC6_FALLING
<> 161:2cc1468da177 3092 * @arg @ref LL_TIM_TRGO2_OC5_RISING_OC6_RISING
<> 161:2cc1468da177 3093 * @arg @ref LL_TIM_TRGO2_OC5_RISING_OC6_FALLING
<> 161:2cc1468da177 3094 * @retval None
<> 161:2cc1468da177 3095 */
<> 161:2cc1468da177 3096 __STATIC_INLINE void LL_TIM_SetTriggerOutput2(TIM_TypeDef *TIMx, uint32_t ADCSynchronization)
<> 161:2cc1468da177 3097 {
<> 161:2cc1468da177 3098 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS2, ADCSynchronization);
<> 161:2cc1468da177 3099 }
<> 161:2cc1468da177 3100
<> 161:2cc1468da177 3101 /**
<> 161:2cc1468da177 3102 * @brief Set the synchronization mode of a slave timer.
<> 161:2cc1468da177 3103 * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3104 * a timer instance can operate as a slave timer.
<> 161:2cc1468da177 3105 * @rmtoll SMCR SMS LL_TIM_SetSlaveMode
<> 161:2cc1468da177 3106 * @param TIMx Timer instance
<> 161:2cc1468da177 3107 * @param SlaveMode This parameter can be one of the following values:
<> 161:2cc1468da177 3108 * @arg @ref LL_TIM_SLAVEMODE_DISABLED
<> 161:2cc1468da177 3109 * @arg @ref LL_TIM_SLAVEMODE_RESET
<> 161:2cc1468da177 3110 * @arg @ref LL_TIM_SLAVEMODE_GATED
<> 161:2cc1468da177 3111 * @arg @ref LL_TIM_SLAVEMODE_TRIGGER
<> 161:2cc1468da177 3112 * @arg @ref LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER
<> 161:2cc1468da177 3113 * @retval None
<> 161:2cc1468da177 3114 */
<> 161:2cc1468da177 3115 __STATIC_INLINE void LL_TIM_SetSlaveMode(TIM_TypeDef *TIMx, uint32_t SlaveMode)
<> 161:2cc1468da177 3116 {
<> 161:2cc1468da177 3117 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, SlaveMode);
<> 161:2cc1468da177 3118 }
<> 161:2cc1468da177 3119
<> 161:2cc1468da177 3120 /**
<> 161:2cc1468da177 3121 * @brief Set the selects the trigger input to be used to synchronize the counter.
<> 161:2cc1468da177 3122 * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3123 * a timer instance can operate as a slave timer.
<> 161:2cc1468da177 3124 * @rmtoll SMCR TS LL_TIM_SetTriggerInput
<> 161:2cc1468da177 3125 * @param TIMx Timer instance
<> 161:2cc1468da177 3126 * @param TriggerInput This parameter can be one of the following values:
<> 161:2cc1468da177 3127 * @arg @ref LL_TIM_TS_ITR0
<> 161:2cc1468da177 3128 * @arg @ref LL_TIM_TS_ITR1
<> 161:2cc1468da177 3129 * @arg @ref LL_TIM_TS_ITR2
<> 161:2cc1468da177 3130 * @arg @ref LL_TIM_TS_ITR3
<> 161:2cc1468da177 3131 * @arg @ref LL_TIM_TS_TI1F_ED
<> 161:2cc1468da177 3132 * @arg @ref LL_TIM_TS_TI1FP1
<> 161:2cc1468da177 3133 * @arg @ref LL_TIM_TS_TI2FP2
<> 161:2cc1468da177 3134 * @arg @ref LL_TIM_TS_ETRF
<> 161:2cc1468da177 3135 * @retval None
<> 161:2cc1468da177 3136 */
<> 161:2cc1468da177 3137 __STATIC_INLINE void LL_TIM_SetTriggerInput(TIM_TypeDef *TIMx, uint32_t TriggerInput)
<> 161:2cc1468da177 3138 {
<> 161:2cc1468da177 3139 MODIFY_REG(TIMx->SMCR, TIM_SMCR_TS, TriggerInput);
<> 161:2cc1468da177 3140 }
<> 161:2cc1468da177 3141
<> 161:2cc1468da177 3142 /**
<> 161:2cc1468da177 3143 * @brief Enable the Master/Slave mode.
<> 161:2cc1468da177 3144 * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3145 * a timer instance can operate as a slave timer.
<> 161:2cc1468da177 3146 * @rmtoll SMCR MSM LL_TIM_EnableMasterSlaveMode
<> 161:2cc1468da177 3147 * @param TIMx Timer instance
<> 161:2cc1468da177 3148 * @retval None
<> 161:2cc1468da177 3149 */
<> 161:2cc1468da177 3150 __STATIC_INLINE void LL_TIM_EnableMasterSlaveMode(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3151 {
<> 161:2cc1468da177 3152 SET_BIT(TIMx->SMCR, TIM_SMCR_MSM);
<> 161:2cc1468da177 3153 }
<> 161:2cc1468da177 3154
<> 161:2cc1468da177 3155 /**
<> 161:2cc1468da177 3156 * @brief Disable the Master/Slave mode.
<> 161:2cc1468da177 3157 * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3158 * a timer instance can operate as a slave timer.
<> 161:2cc1468da177 3159 * @rmtoll SMCR MSM LL_TIM_DisableMasterSlaveMode
<> 161:2cc1468da177 3160 * @param TIMx Timer instance
<> 161:2cc1468da177 3161 * @retval None
<> 161:2cc1468da177 3162 */
<> 161:2cc1468da177 3163 __STATIC_INLINE void LL_TIM_DisableMasterSlaveMode(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3164 {
<> 161:2cc1468da177 3165 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_MSM);
<> 161:2cc1468da177 3166 }
<> 161:2cc1468da177 3167
<> 161:2cc1468da177 3168 /**
<> 161:2cc1468da177 3169 * @brief Indicates whether the Master/Slave mode is enabled.
<> 161:2cc1468da177 3170 * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3171 * a timer instance can operate as a slave timer.
<> 161:2cc1468da177 3172 * @rmtoll SMCR MSM LL_TIM_IsEnabledMasterSlaveMode
<> 161:2cc1468da177 3173 * @param TIMx Timer instance
<> 161:2cc1468da177 3174 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3175 */
<> 161:2cc1468da177 3176 __STATIC_INLINE uint32_t LL_TIM_IsEnabledMasterSlaveMode(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3177 {
<> 161:2cc1468da177 3178 return (READ_BIT(TIMx->SMCR, TIM_SMCR_MSM) == (TIM_SMCR_MSM));
<> 161:2cc1468da177 3179 }
<> 161:2cc1468da177 3180
<> 161:2cc1468da177 3181 /**
<> 161:2cc1468da177 3182 * @brief Configure the external trigger (ETR) input.
<> 161:2cc1468da177 3183 * @note Macro @ref IS_TIM_ETR_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3184 * a timer instance provides an external trigger input.
<> 161:2cc1468da177 3185 * @rmtoll SMCR ETP LL_TIM_ConfigETR\n
<> 161:2cc1468da177 3186 * SMCR ETPS LL_TIM_ConfigETR\n
<> 161:2cc1468da177 3187 * SMCR ETF LL_TIM_ConfigETR
<> 161:2cc1468da177 3188 * @param TIMx Timer instance
<> 161:2cc1468da177 3189 * @param ETRPolarity This parameter can be one of the following values:
<> 161:2cc1468da177 3190 * @arg @ref LL_TIM_ETR_POLARITY_NONINVERTED
<> 161:2cc1468da177 3191 * @arg @ref LL_TIM_ETR_POLARITY_INVERTED
<> 161:2cc1468da177 3192 * @param ETRPrescaler This parameter can be one of the following values:
<> 161:2cc1468da177 3193 * @arg @ref LL_TIM_ETR_PRESCALER_DIV1
<> 161:2cc1468da177 3194 * @arg @ref LL_TIM_ETR_PRESCALER_DIV2
<> 161:2cc1468da177 3195 * @arg @ref LL_TIM_ETR_PRESCALER_DIV4
<> 161:2cc1468da177 3196 * @arg @ref LL_TIM_ETR_PRESCALER_DIV8
<> 161:2cc1468da177 3197 * @param ETRFilter This parameter can be one of the following values:
<> 161:2cc1468da177 3198 * @arg @ref LL_TIM_ETR_FILTER_FDIV1
<> 161:2cc1468da177 3199 * @arg @ref LL_TIM_ETR_FILTER_FDIV1_N2
<> 161:2cc1468da177 3200 * @arg @ref LL_TIM_ETR_FILTER_FDIV1_N4
<> 161:2cc1468da177 3201 * @arg @ref LL_TIM_ETR_FILTER_FDIV1_N8
<> 161:2cc1468da177 3202 * @arg @ref LL_TIM_ETR_FILTER_FDIV2_N6
<> 161:2cc1468da177 3203 * @arg @ref LL_TIM_ETR_FILTER_FDIV2_N8
<> 161:2cc1468da177 3204 * @arg @ref LL_TIM_ETR_FILTER_FDIV4_N6
<> 161:2cc1468da177 3205 * @arg @ref LL_TIM_ETR_FILTER_FDIV4_N8
<> 161:2cc1468da177 3206 * @arg @ref LL_TIM_ETR_FILTER_FDIV8_N6
<> 161:2cc1468da177 3207 * @arg @ref LL_TIM_ETR_FILTER_FDIV8_N8
<> 161:2cc1468da177 3208 * @arg @ref LL_TIM_ETR_FILTER_FDIV16_N5
<> 161:2cc1468da177 3209 * @arg @ref LL_TIM_ETR_FILTER_FDIV16_N6
<> 161:2cc1468da177 3210 * @arg @ref LL_TIM_ETR_FILTER_FDIV16_N8
<> 161:2cc1468da177 3211 * @arg @ref LL_TIM_ETR_FILTER_FDIV32_N5
<> 161:2cc1468da177 3212 * @arg @ref LL_TIM_ETR_FILTER_FDIV32_N6
<> 161:2cc1468da177 3213 * @arg @ref LL_TIM_ETR_FILTER_FDIV32_N8
<> 161:2cc1468da177 3214 * @retval None
<> 161:2cc1468da177 3215 */
<> 161:2cc1468da177 3216 __STATIC_INLINE void LL_TIM_ConfigETR(TIM_TypeDef *TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler,
<> 161:2cc1468da177 3217 uint32_t ETRFilter)
<> 161:2cc1468da177 3218 {
<> 161:2cc1468da177 3219 MODIFY_REG(TIMx->SMCR, TIM_SMCR_ETP | TIM_SMCR_ETPS | TIM_SMCR_ETF, ETRPolarity | ETRPrescaler | ETRFilter);
<> 161:2cc1468da177 3220 }
<> 161:2cc1468da177 3221
<> 161:2cc1468da177 3222 /**
<> 161:2cc1468da177 3223 * @}
<> 161:2cc1468da177 3224 */
<> 161:2cc1468da177 3225
<> 161:2cc1468da177 3226 /** @defgroup TIM_LL_EF_Break_Function Break function configuration
<> 161:2cc1468da177 3227 * @{
<> 161:2cc1468da177 3228 */
<> 161:2cc1468da177 3229 /**
<> 161:2cc1468da177 3230 * @brief Enable the break function.
<> 161:2cc1468da177 3231 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3232 * a timer instance provides a break input.
<> 161:2cc1468da177 3233 * @rmtoll BDTR BKE LL_TIM_EnableBRK
<> 161:2cc1468da177 3234 * @param TIMx Timer instance
<> 161:2cc1468da177 3235 * @retval None
<> 161:2cc1468da177 3236 */
<> 161:2cc1468da177 3237 __STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3238 {
<> 161:2cc1468da177 3239 SET_BIT(TIMx->BDTR, TIM_BDTR_BKE);
<> 161:2cc1468da177 3240 }
<> 161:2cc1468da177 3241
<> 161:2cc1468da177 3242 /**
<> 161:2cc1468da177 3243 * @brief Disable the break function.
<> 161:2cc1468da177 3244 * @rmtoll BDTR BKE LL_TIM_DisableBRK
<> 161:2cc1468da177 3245 * @param TIMx Timer instance
<> 161:2cc1468da177 3246 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3247 * a timer instance provides a break input.
<> 161:2cc1468da177 3248 * @retval None
<> 161:2cc1468da177 3249 */
<> 161:2cc1468da177 3250 __STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3251 {
<> 161:2cc1468da177 3252 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BKE);
<> 161:2cc1468da177 3253 }
<> 161:2cc1468da177 3254
<> 161:2cc1468da177 3255 /**
<> 161:2cc1468da177 3256 * @brief Configure the break input.
<> 161:2cc1468da177 3257 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3258 * a timer instance provides a break input.
<> 161:2cc1468da177 3259 * @rmtoll BDTR BKP LL_TIM_ConfigBRK\n
<> 161:2cc1468da177 3260 * BDTR BKF LL_TIM_ConfigBRK
<> 161:2cc1468da177 3261 * @param TIMx Timer instance
<> 161:2cc1468da177 3262 * @param BreakPolarity This parameter can be one of the following values:
<> 161:2cc1468da177 3263 * @arg @ref LL_TIM_BREAK_POLARITY_LOW
<> 161:2cc1468da177 3264 * @arg @ref LL_TIM_BREAK_POLARITY_HIGH
<> 161:2cc1468da177 3265 * @param BreakFilter This parameter can be one of the following values:
<> 161:2cc1468da177 3266 * @arg @ref LL_TIM_BREAK_FILTER_FDIV1
<> 161:2cc1468da177 3267 * @arg @ref LL_TIM_BREAK_FILTER_FDIV1_N2
<> 161:2cc1468da177 3268 * @arg @ref LL_TIM_BREAK_FILTER_FDIV1_N4
<> 161:2cc1468da177 3269 * @arg @ref LL_TIM_BREAK_FILTER_FDIV1_N8
<> 161:2cc1468da177 3270 * @arg @ref LL_TIM_BREAK_FILTER_FDIV2_N6
<> 161:2cc1468da177 3271 * @arg @ref LL_TIM_BREAK_FILTER_FDIV2_N8
<> 161:2cc1468da177 3272 * @arg @ref LL_TIM_BREAK_FILTER_FDIV4_N6
<> 161:2cc1468da177 3273 * @arg @ref LL_TIM_BREAK_FILTER_FDIV4_N8
<> 161:2cc1468da177 3274 * @arg @ref LL_TIM_BREAK_FILTER_FDIV8_N6
<> 161:2cc1468da177 3275 * @arg @ref LL_TIM_BREAK_FILTER_FDIV8_N8
<> 161:2cc1468da177 3276 * @arg @ref LL_TIM_BREAK_FILTER_FDIV16_N5
<> 161:2cc1468da177 3277 * @arg @ref LL_TIM_BREAK_FILTER_FDIV16_N6
<> 161:2cc1468da177 3278 * @arg @ref LL_TIM_BREAK_FILTER_FDIV16_N8
<> 161:2cc1468da177 3279 * @arg @ref LL_TIM_BREAK_FILTER_FDIV32_N5
<> 161:2cc1468da177 3280 * @arg @ref LL_TIM_BREAK_FILTER_FDIV32_N6
<> 161:2cc1468da177 3281 * @arg @ref LL_TIM_BREAK_FILTER_FDIV32_N8
<> 161:2cc1468da177 3282 * @retval None
<> 161:2cc1468da177 3283 */
<> 161:2cc1468da177 3284 __STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter)
<> 161:2cc1468da177 3285 {
<> 161:2cc1468da177 3286 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF, BreakPolarity | BreakFilter);
<> 161:2cc1468da177 3287 }
<> 161:2cc1468da177 3288
<> 161:2cc1468da177 3289 /**
<> 161:2cc1468da177 3290 * @brief Enable the break 2 function.
<> 161:2cc1468da177 3291 * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3292 * a timer instance provides a second break input.
<> 161:2cc1468da177 3293 * @rmtoll BDTR BK2E LL_TIM_EnableBRK2
<> 161:2cc1468da177 3294 * @param TIMx Timer instance
<> 161:2cc1468da177 3295 * @retval None
<> 161:2cc1468da177 3296 */
<> 161:2cc1468da177 3297 __STATIC_INLINE void LL_TIM_EnableBRK2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3298 {
<> 161:2cc1468da177 3299 SET_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
<> 161:2cc1468da177 3300 }
<> 161:2cc1468da177 3301
<> 161:2cc1468da177 3302 /**
<> 161:2cc1468da177 3303 * @brief Disable the break 2 function.
<> 161:2cc1468da177 3304 * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3305 * a timer instance provides a second break input.
<> 161:2cc1468da177 3306 * @rmtoll BDTR BK2E LL_TIM_DisableBRK2
<> 161:2cc1468da177 3307 * @param TIMx Timer instance
<> 161:2cc1468da177 3308 * @retval None
<> 161:2cc1468da177 3309 */
<> 161:2cc1468da177 3310 __STATIC_INLINE void LL_TIM_DisableBRK2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3311 {
<> 161:2cc1468da177 3312 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
<> 161:2cc1468da177 3313 }
<> 161:2cc1468da177 3314
<> 161:2cc1468da177 3315 /**
<> 161:2cc1468da177 3316 * @brief Configure the break 2 input.
<> 161:2cc1468da177 3317 * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3318 * a timer instance provides a second break input.
<> 161:2cc1468da177 3319 * @rmtoll BDTR BK2P LL_TIM_ConfigBRK2\n
<> 161:2cc1468da177 3320 * BDTR BK2F LL_TIM_ConfigBRK2
<> 161:2cc1468da177 3321 * @param TIMx Timer instance
<> 161:2cc1468da177 3322 * @param Break2Polarity This parameter can be one of the following values:
<> 161:2cc1468da177 3323 * @arg @ref LL_TIM_BREAK2_POLARITY_LOW
<> 161:2cc1468da177 3324 * @arg @ref LL_TIM_BREAK2_POLARITY_HIGH
<> 161:2cc1468da177 3325 * @param Break2Filter This parameter can be one of the following values:
<> 161:2cc1468da177 3326 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV1
<> 161:2cc1468da177 3327 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV1_N2
<> 161:2cc1468da177 3328 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV1_N4
<> 161:2cc1468da177 3329 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV1_N8
<> 161:2cc1468da177 3330 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV2_N6
<> 161:2cc1468da177 3331 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV2_N8
<> 161:2cc1468da177 3332 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV4_N6
<> 161:2cc1468da177 3333 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV4_N8
<> 161:2cc1468da177 3334 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV8_N6
<> 161:2cc1468da177 3335 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV8_N8
<> 161:2cc1468da177 3336 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV16_N5
<> 161:2cc1468da177 3337 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV16_N6
<> 161:2cc1468da177 3338 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV16_N8
<> 161:2cc1468da177 3339 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV32_N5
<> 161:2cc1468da177 3340 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV32_N6
<> 161:2cc1468da177 3341 * @arg @ref LL_TIM_BREAK2_FILTER_FDIV32_N8
<> 161:2cc1468da177 3342 * @retval None
<> 161:2cc1468da177 3343 */
<> 161:2cc1468da177 3344 __STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter)
<> 161:2cc1468da177 3345 {
<> 161:2cc1468da177 3346 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F, Break2Polarity | Break2Filter);
<> 161:2cc1468da177 3347 }
<> 161:2cc1468da177 3348
<> 161:2cc1468da177 3349 /**
<> 161:2cc1468da177 3350 * @brief Select the outputs off state (enabled v.s. disabled) in Idle and Run modes.
<> 161:2cc1468da177 3351 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3352 * a timer instance provides a break input.
<> 161:2cc1468da177 3353 * @rmtoll BDTR OSSI LL_TIM_SetOffStates\n
<> 161:2cc1468da177 3354 * BDTR OSSR LL_TIM_SetOffStates
<> 161:2cc1468da177 3355 * @param TIMx Timer instance
<> 161:2cc1468da177 3356 * @param OffStateIdle This parameter can be one of the following values:
<> 161:2cc1468da177 3357 * @arg @ref LL_TIM_OSSI_DISABLE
<> 161:2cc1468da177 3358 * @arg @ref LL_TIM_OSSI_ENABLE
<> 161:2cc1468da177 3359 * @param OffStateRun This parameter can be one of the following values:
<> 161:2cc1468da177 3360 * @arg @ref LL_TIM_OSSR_DISABLE
<> 161:2cc1468da177 3361 * @arg @ref LL_TIM_OSSR_ENABLE
<> 161:2cc1468da177 3362 * @retval None
<> 161:2cc1468da177 3363 */
<> 161:2cc1468da177 3364 __STATIC_INLINE void LL_TIM_SetOffStates(TIM_TypeDef *TIMx, uint32_t OffStateIdle, uint32_t OffStateRun)
<> 161:2cc1468da177 3365 {
<> 161:2cc1468da177 3366 MODIFY_REG(TIMx->BDTR, TIM_BDTR_OSSI | TIM_BDTR_OSSR, OffStateIdle | OffStateRun);
<> 161:2cc1468da177 3367 }
<> 161:2cc1468da177 3368
<> 161:2cc1468da177 3369 /**
<> 161:2cc1468da177 3370 * @brief Enable automatic output (MOE can be set by software or automatically when a break input is active).
<> 161:2cc1468da177 3371 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3372 * a timer instance provides a break input.
<> 161:2cc1468da177 3373 * @rmtoll BDTR AOE LL_TIM_EnableAutomaticOutput
<> 161:2cc1468da177 3374 * @param TIMx Timer instance
<> 161:2cc1468da177 3375 * @retval None
<> 161:2cc1468da177 3376 */
<> 161:2cc1468da177 3377 __STATIC_INLINE void LL_TIM_EnableAutomaticOutput(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3378 {
<> 161:2cc1468da177 3379 SET_BIT(TIMx->BDTR, TIM_BDTR_AOE);
<> 161:2cc1468da177 3380 }
<> 161:2cc1468da177 3381
<> 161:2cc1468da177 3382 /**
<> 161:2cc1468da177 3383 * @brief Disable automatic output (MOE can be set only by software).
<> 161:2cc1468da177 3384 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3385 * a timer instance provides a break input.
<> 161:2cc1468da177 3386 * @rmtoll BDTR AOE LL_TIM_DisableAutomaticOutput
<> 161:2cc1468da177 3387 * @param TIMx Timer instance
<> 161:2cc1468da177 3388 * @retval None
<> 161:2cc1468da177 3389 */
<> 161:2cc1468da177 3390 __STATIC_INLINE void LL_TIM_DisableAutomaticOutput(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3391 {
<> 161:2cc1468da177 3392 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_AOE);
<> 161:2cc1468da177 3393 }
<> 161:2cc1468da177 3394
<> 161:2cc1468da177 3395 /**
<> 161:2cc1468da177 3396 * @brief Indicate whether automatic output is enabled.
<> 161:2cc1468da177 3397 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3398 * a timer instance provides a break input.
<> 161:2cc1468da177 3399 * @rmtoll BDTR AOE LL_TIM_IsEnabledAutomaticOutput
<> 161:2cc1468da177 3400 * @param TIMx Timer instance
<> 161:2cc1468da177 3401 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3402 */
<> 161:2cc1468da177 3403 __STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3404 {
<> 161:2cc1468da177 3405 return (READ_BIT(TIMx->BDTR, TIM_BDTR_AOE) == (TIM_BDTR_AOE));
<> 161:2cc1468da177 3406 }
<> 161:2cc1468da177 3407
<> 161:2cc1468da177 3408 /**
<> 161:2cc1468da177 3409 * @brief Enable the outputs (set the MOE bit in TIMx_BDTR register).
<> 161:2cc1468da177 3410 * @note The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by
<> 161:2cc1468da177 3411 * software and is reset in case of break or break2 event
<> 161:2cc1468da177 3412 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3413 * a timer instance provides a break input.
<> 161:2cc1468da177 3414 * @rmtoll BDTR MOE LL_TIM_EnableAllOutputs
<> 161:2cc1468da177 3415 * @param TIMx Timer instance
<> 161:2cc1468da177 3416 * @retval None
<> 161:2cc1468da177 3417 */
<> 161:2cc1468da177 3418 __STATIC_INLINE void LL_TIM_EnableAllOutputs(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3419 {
<> 161:2cc1468da177 3420 SET_BIT(TIMx->BDTR, TIM_BDTR_MOE);
<> 161:2cc1468da177 3421 }
<> 161:2cc1468da177 3422
<> 161:2cc1468da177 3423 /**
<> 161:2cc1468da177 3424 * @brief Disable the outputs (reset the MOE bit in TIMx_BDTR register).
<> 161:2cc1468da177 3425 * @note The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by
<> 161:2cc1468da177 3426 * software and is reset in case of break or break2 event.
<> 161:2cc1468da177 3427 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3428 * a timer instance provides a break input.
<> 161:2cc1468da177 3429 * @rmtoll BDTR MOE LL_TIM_DisableAllOutputs
<> 161:2cc1468da177 3430 * @param TIMx Timer instance
<> 161:2cc1468da177 3431 * @retval None
<> 161:2cc1468da177 3432 */
<> 161:2cc1468da177 3433 __STATIC_INLINE void LL_TIM_DisableAllOutputs(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3434 {
<> 161:2cc1468da177 3435 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_MOE);
<> 161:2cc1468da177 3436 }
<> 161:2cc1468da177 3437
<> 161:2cc1468da177 3438 /**
<> 161:2cc1468da177 3439 * @brief Indicates whether outputs are enabled.
<> 161:2cc1468da177 3440 * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3441 * a timer instance provides a break input.
<> 161:2cc1468da177 3442 * @rmtoll BDTR MOE LL_TIM_IsEnabledAllOutputs
<> 161:2cc1468da177 3443 * @param TIMx Timer instance
<> 161:2cc1468da177 3444 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3445 */
<> 161:2cc1468da177 3446 __STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3447 {
<> 161:2cc1468da177 3448 return (READ_BIT(TIMx->BDTR, TIM_BDTR_MOE) == (TIM_BDTR_MOE));
<> 161:2cc1468da177 3449 }
<> 161:2cc1468da177 3450
<> 161:2cc1468da177 3451 #if defined(TIM_BREAK_INPUT_SUPPORT)
<> 161:2cc1468da177 3452 /**
<> 161:2cc1468da177 3453 * @brief Enable the signals connected to the designated timer break input.
<> 161:2cc1468da177 3454 * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 3455 * or not a timer instance allows for break input selection.
<> 161:2cc1468da177 3456 * @rmtoll AF1 BKINE LL_TIM_EnableBreakInputSource\n
<> 161:2cc1468da177 3457 * AF1 BKDFBKE LL_TIM_EnableBreakInputSource\n
<> 161:2cc1468da177 3458 * AF2 BK2INE LL_TIM_EnableBreakInputSource\n
<> 161:2cc1468da177 3459 * AF2 BK2DFBKE LL_TIM_EnableBreakInputSource
<> 161:2cc1468da177 3460 * @param TIMx Timer instance
<> 161:2cc1468da177 3461 * @param BreakInput This parameter can be one of the following values:
<> 161:2cc1468da177 3462 * @arg @ref LL_TIM_BREAK_INPUT_BKIN
<> 161:2cc1468da177 3463 * @arg @ref LL_TIM_BREAK_INPUT_BKIN2
<> 161:2cc1468da177 3464 * @param Source This parameter can be one of the following values:
<> 161:2cc1468da177 3465 * @arg @ref LL_TIM_BKIN_SOURCE_BKIN
<> 161:2cc1468da177 3466 * @arg @ref LL_TIM_BKIN_SOURCE_DF1BK
<> 161:2cc1468da177 3467 * @retval None
<> 161:2cc1468da177 3468 */
<> 161:2cc1468da177 3469 __STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
<> 161:2cc1468da177 3470 {
<> 161:2cc1468da177 3471 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
<> 161:2cc1468da177 3472 SET_BIT(*pReg , Source);
<> 161:2cc1468da177 3473 }
<> 161:2cc1468da177 3474
<> 161:2cc1468da177 3475 /**
<> 161:2cc1468da177 3476 * @brief Disable the signals connected to the designated timer break input.
<> 161:2cc1468da177 3477 * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 3478 * or not a timer instance allows for break input selection.
<> 161:2cc1468da177 3479 * @rmtoll AF1 BKINE LL_TIM_DisableBreakInputSource\n
<> 161:2cc1468da177 3480 * AF1 BKDFBKE LL_TIM_DisableBreakInputSource\n
<> 161:2cc1468da177 3481 * AF2 BK2INE LL_TIM_DisableBreakInputSource\n
<> 161:2cc1468da177 3482 * AF2 BK2DFBKE LL_TIM_DisableBreakInputSource
<> 161:2cc1468da177 3483 * @param TIMx Timer instance
<> 161:2cc1468da177 3484 * @param BreakInput This parameter can be one of the following values:
<> 161:2cc1468da177 3485 * @arg @ref LL_TIM_BREAK_INPUT_BKIN
<> 161:2cc1468da177 3486 * @arg @ref LL_TIM_BREAK_INPUT_BKIN2
<> 161:2cc1468da177 3487 * @param Source This parameter can be one of the following values:
<> 161:2cc1468da177 3488 * @arg @ref LL_TIM_BKIN_SOURCE_BKIN
<> 161:2cc1468da177 3489 * @arg @ref LL_TIM_BKIN_SOURCE_DF1BK
<> 161:2cc1468da177 3490 * @retval None
<> 161:2cc1468da177 3491 */
<> 161:2cc1468da177 3492 __STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
<> 161:2cc1468da177 3493 {
<> 161:2cc1468da177 3494 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
<> 161:2cc1468da177 3495 CLEAR_BIT(*pReg, Source);
<> 161:2cc1468da177 3496 }
<> 161:2cc1468da177 3497
<> 161:2cc1468da177 3498 /**
<> 161:2cc1468da177 3499 * @brief Set the polarity of the break signal for the timer break input.
<> 161:2cc1468da177 3500 * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
<> 161:2cc1468da177 3501 * or not a timer instance allows for break input selection.
<> 161:2cc1468da177 3502 * @rmtoll AF1 BKINE LL_TIM_SetBreakInputSourcePolarity\n
<> 161:2cc1468da177 3503 * AF1 BKDFBKE LL_TIM_SetBreakInputSourcePolarity\n
<> 161:2cc1468da177 3504 * AF2 BK2INE LL_TIM_SetBreakInputSourcePolarity\n
<> 161:2cc1468da177 3505 * AF2 BK2DFBKE LL_TIM_SetBreakInputSourcePolarity
<> 161:2cc1468da177 3506 * @param TIMx Timer instance
<> 161:2cc1468da177 3507 * @param BreakInput This parameter can be one of the following values:
<> 161:2cc1468da177 3508 * @arg @ref LL_TIM_BREAK_INPUT_BKIN
<> 161:2cc1468da177 3509 * @arg @ref LL_TIM_BREAK_INPUT_BKIN2
<> 161:2cc1468da177 3510 * @param Source This parameter can be one of the following values:
<> 161:2cc1468da177 3511 * @arg @ref LL_TIM_BKIN_SOURCE_BKIN
<> 161:2cc1468da177 3512 * @arg @ref LL_TIM_BKIN_SOURCE_DF1BK
<> 161:2cc1468da177 3513 * @param Polarity This parameter can be one of the following values:
<> 161:2cc1468da177 3514 * @arg @ref LL_TIM_BKIN_POLARITY_LOW
<> 161:2cc1468da177 3515 * @arg @ref LL_TIM_BKIN_POLARITY_HIGH
<> 161:2cc1468da177 3516 * @retval None
<> 161:2cc1468da177 3517 */
<> 161:2cc1468da177 3518 __STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source,
<> 161:2cc1468da177 3519 uint32_t Polarity)
<> 161:2cc1468da177 3520 {
<> 161:2cc1468da177 3521 register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
<> 161:2cc1468da177 3522 MODIFY_REG(*pReg, (TIMx_AF1_BKINP << (TIM_POSITION_BRK_SOURCE)) , (Polarity << (TIM_POSITION_BRK_SOURCE)));
<> 161:2cc1468da177 3523 }
<> 161:2cc1468da177 3524 #endif /* TIM_BREAK_INPUT_SUPPORT */
<> 161:2cc1468da177 3525 /**
<> 161:2cc1468da177 3526 * @}
<> 161:2cc1468da177 3527 */
<> 161:2cc1468da177 3528
<> 161:2cc1468da177 3529 /** @defgroup TIM_LL_EF_DMA_Burst_Mode DMA burst mode configuration
<> 161:2cc1468da177 3530 * @{
<> 161:2cc1468da177 3531 */
<> 161:2cc1468da177 3532 /**
<> 161:2cc1468da177 3533 * @brief Configures the timer DMA burst feature.
<> 161:2cc1468da177 3534 * @note Macro @ref IS_TIM_DMABURST_INSTANCE(TIMx) can be used to check whether or
<> 161:2cc1468da177 3535 * not a timer instance supports the DMA burst mode.
<> 161:2cc1468da177 3536 * @rmtoll DCR DBL LL_TIM_ConfigDMABurst\n
<> 161:2cc1468da177 3537 * DCR DBA LL_TIM_ConfigDMABurst
<> 161:2cc1468da177 3538 * @param TIMx Timer instance
<> 161:2cc1468da177 3539 * @param DMABurstBaseAddress This parameter can be one of the following values:
<> 161:2cc1468da177 3540 * @arg @ref LL_TIM_DMABURST_BASEADDR_CR1
<> 161:2cc1468da177 3541 * @arg @ref LL_TIM_DMABURST_BASEADDR_CR2
<> 161:2cc1468da177 3542 * @arg @ref LL_TIM_DMABURST_BASEADDR_SMCR
<> 161:2cc1468da177 3543 * @arg @ref LL_TIM_DMABURST_BASEADDR_DIER
<> 161:2cc1468da177 3544 * @arg @ref LL_TIM_DMABURST_BASEADDR_SR
<> 161:2cc1468da177 3545 * @arg @ref LL_TIM_DMABURST_BASEADDR_EGR
<> 161:2cc1468da177 3546 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCMR1
<> 161:2cc1468da177 3547 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCMR2
<> 161:2cc1468da177 3548 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCER
<> 161:2cc1468da177 3549 * @arg @ref LL_TIM_DMABURST_BASEADDR_CNT
<> 161:2cc1468da177 3550 * @arg @ref LL_TIM_DMABURST_BASEADDR_PSC
<> 161:2cc1468da177 3551 * @arg @ref LL_TIM_DMABURST_BASEADDR_ARR
<> 161:2cc1468da177 3552 * @arg @ref LL_TIM_DMABURST_BASEADDR_RCR
<> 161:2cc1468da177 3553 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR1
<> 161:2cc1468da177 3554 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR2
<> 161:2cc1468da177 3555 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR3
<> 161:2cc1468da177 3556 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR4
<> 161:2cc1468da177 3557 * @arg @ref LL_TIM_DMABURST_BASEADDR_BDTR
<> 161:2cc1468da177 3558 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCMR3
<> 161:2cc1468da177 3559 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR5
<> 161:2cc1468da177 3560 * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR6
<> 161:2cc1468da177 3561 * @arg @ref LL_TIM_DMABURST_BASEADDR_OR
<> 161:2cc1468da177 3562 * @arg @ref LL_TIM_DMABURST_BASEADDR_AF1
<> 161:2cc1468da177 3563 * @arg @ref LL_TIM_DMABURST_BASEADDR_AF2
<> 161:2cc1468da177 3564 * @param DMABurstLength This parameter can be one of the following values:
<> 161:2cc1468da177 3565 * @arg @ref LL_TIM_DMABURST_LENGTH_1TRANSFER
<> 161:2cc1468da177 3566 * @arg @ref LL_TIM_DMABURST_LENGTH_2TRANSFERS
<> 161:2cc1468da177 3567 * @arg @ref LL_TIM_DMABURST_LENGTH_3TRANSFERS
<> 161:2cc1468da177 3568 * @arg @ref LL_TIM_DMABURST_LENGTH_4TRANSFERS
<> 161:2cc1468da177 3569 * @arg @ref LL_TIM_DMABURST_LENGTH_5TRANSFERS
<> 161:2cc1468da177 3570 * @arg @ref LL_TIM_DMABURST_LENGTH_6TRANSFERS
<> 161:2cc1468da177 3571 * @arg @ref LL_TIM_DMABURST_LENGTH_7TRANSFERS
<> 161:2cc1468da177 3572 * @arg @ref LL_TIM_DMABURST_LENGTH_8TRANSFERS
<> 161:2cc1468da177 3573 * @arg @ref LL_TIM_DMABURST_LENGTH_9TRANSFERS
<> 161:2cc1468da177 3574 * @arg @ref LL_TIM_DMABURST_LENGTH_10TRANSFERS
<> 161:2cc1468da177 3575 * @arg @ref LL_TIM_DMABURST_LENGTH_11TRANSFERS
<> 161:2cc1468da177 3576 * @arg @ref LL_TIM_DMABURST_LENGTH_12TRANSFERS
<> 161:2cc1468da177 3577 * @arg @ref LL_TIM_DMABURST_LENGTH_13TRANSFERS
<> 161:2cc1468da177 3578 * @arg @ref LL_TIM_DMABURST_LENGTH_14TRANSFERS
<> 161:2cc1468da177 3579 * @arg @ref LL_TIM_DMABURST_LENGTH_15TRANSFERS
<> 161:2cc1468da177 3580 * @arg @ref LL_TIM_DMABURST_LENGTH_16TRANSFERS
<> 161:2cc1468da177 3581 * @arg @ref LL_TIM_DMABURST_LENGTH_17TRANSFERS
<> 161:2cc1468da177 3582 * @arg @ref LL_TIM_DMABURST_LENGTH_18TRANSFERS
<> 161:2cc1468da177 3583 * @retval None
<> 161:2cc1468da177 3584 */
<> 161:2cc1468da177 3585 __STATIC_INLINE void LL_TIM_ConfigDMABurst(TIM_TypeDef *TIMx, uint32_t DMABurstBaseAddress, uint32_t DMABurstLength)
<> 161:2cc1468da177 3586 {
<> 161:2cc1468da177 3587 MODIFY_REG(TIMx->DCR, TIM_DCR_DBL | TIM_DCR_DBA, DMABurstBaseAddress | DMABurstLength);
<> 161:2cc1468da177 3588 }
<> 161:2cc1468da177 3589
<> 161:2cc1468da177 3590 /**
<> 161:2cc1468da177 3591 * @}
<> 161:2cc1468da177 3592 */
<> 161:2cc1468da177 3593
<> 161:2cc1468da177 3594 /** @defgroup TIM_LL_EF_Timer_Inputs_Remapping Timer input remapping
<> 161:2cc1468da177 3595 * @{
<> 161:2cc1468da177 3596 */
<> 161:2cc1468da177 3597 /**
<> 161:2cc1468da177 3598 * @brief Remap TIM inputs (input channel, internal/external triggers).
<> 161:2cc1468da177 3599 * @note Macro @ref IS_TIM_REMAP_INSTANCE(TIMx) can be used to check whether or not
<> 161:2cc1468da177 3600 * a some timer inputs can be remapped.
<> 161:2cc1468da177 3601 * @rmtoll TIM2_OR ITR1_RMP LL_TIM_SetRemap\n
<> 161:2cc1468da177 3602 * TIM5_OR TI4_RMP LL_TIM_SetRemap\n
<> 161:2cc1468da177 3603 * TIM11_OR TI1_RMP LL_TIM_SetRemap
<> 161:2cc1468da177 3604 * @param TIMx Timer instance
<> 161:2cc1468da177 3605 * @param Remap Remap param depends on the TIMx. Description available only
<> 161:2cc1468da177 3606 * in CHM version of the User Manual (not in .pdf).
<> 161:2cc1468da177 3607 * Otherwise see Reference Manual description of OR registers.
<> 161:2cc1468da177 3608 *
<> 161:2cc1468da177 3609 * Below description summarizes "Timer Instance" and "Remap" param combinations:
<> 161:2cc1468da177 3610 *
<> 161:2cc1468da177 3611 * TIM2: one of the following values
<> 161:2cc1468da177 3612 *
<> 161:2cc1468da177 3613 * ITR1_RMP can be one of the following values
<> 161:2cc1468da177 3614 * @arg @ref LL_TIM_TIM2_ITR1_RMP_TIM8_TRGO
<> 161:2cc1468da177 3615 * @arg @ref LL_TIM_TIM2_ITR1_RMP_ETH_PTP
<> 161:2cc1468da177 3616 * @arg @ref LL_TIM_TIM2_ITR1_RMP_OTG_FS_SOF
<> 161:2cc1468da177 3617 * @arg @ref LL_TIM_TIM2_ITR1_RMP_OTG_HS_SOF
<> 161:2cc1468da177 3618 *
<> 161:2cc1468da177 3619 * TIM5: one of the following values
<> 161:2cc1468da177 3620 *
<> 161:2cc1468da177 3621 * @arg @ref LL_TIM_TIM5_TI4_RMP_GPIO
<> 161:2cc1468da177 3622 * @arg @ref LL_TIM_TIM5_TI4_RMP_LSI
<> 161:2cc1468da177 3623 * @arg @ref LL_TIM_TIM5_TI4_RMP_LSE
<> 161:2cc1468da177 3624 * @arg @ref LL_TIM_TIM5_TI4_RMP_RTC
<> 161:2cc1468da177 3625 *
<> 161:2cc1468da177 3626 * TIM11: one of the following values
<> 161:2cc1468da177 3627 *
<> 161:2cc1468da177 3628 * @arg @ref LL_TIM_TIM11_TI1_RMP_GPIO
<> 161:2cc1468da177 3629 * @arg @ref LL_TIM_TIM11_TI1_RMP_SPDIFRX
<> 161:2cc1468da177 3630 * @arg @ref LL_TIM_TIM11_TI1_RMP_HSE
<> 161:2cc1468da177 3631 * @arg @ref LL_TIM_TIM11_TI1_RMP_MCO1
<> 161:2cc1468da177 3632 *
<> 161:2cc1468da177 3633 * @retval None
<> 161:2cc1468da177 3634 */
<> 161:2cc1468da177 3635 __STATIC_INLINE void LL_TIM_SetRemap(TIM_TypeDef *TIMx, uint32_t Remap)
<> 161:2cc1468da177 3636 {
<> 161:2cc1468da177 3637 MODIFY_REG(TIMx->OR, (Remap >> TIMx_OR_RMP_SHIFT), (Remap & TIMx_OR_RMP_MASK));
<> 161:2cc1468da177 3638 }
<> 161:2cc1468da177 3639
<> 161:2cc1468da177 3640 /**
<> 161:2cc1468da177 3641 * @}
<> 161:2cc1468da177 3642 */
<> 161:2cc1468da177 3643
<> 161:2cc1468da177 3644
<> 161:2cc1468da177 3645 /** @defgroup TIM_LL_EF_FLAG_Management FLAG-Management
<> 161:2cc1468da177 3646 * @{
<> 161:2cc1468da177 3647 */
<> 161:2cc1468da177 3648 /**
<> 161:2cc1468da177 3649 * @brief Clear the update interrupt flag (UIF).
<> 161:2cc1468da177 3650 * @rmtoll SR UIF LL_TIM_ClearFlag_UPDATE
<> 161:2cc1468da177 3651 * @param TIMx Timer instance
<> 161:2cc1468da177 3652 * @retval None
<> 161:2cc1468da177 3653 */
<> 161:2cc1468da177 3654 __STATIC_INLINE void LL_TIM_ClearFlag_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3655 {
<> 161:2cc1468da177 3656 WRITE_REG(TIMx->SR, ~(TIM_SR_UIF));
<> 161:2cc1468da177 3657 }
<> 161:2cc1468da177 3658
<> 161:2cc1468da177 3659 /**
<> 161:2cc1468da177 3660 * @brief Indicate whether update interrupt flag (UIF) is set (update interrupt is pending).
<> 161:2cc1468da177 3661 * @rmtoll SR UIF LL_TIM_IsActiveFlag_UPDATE
<> 161:2cc1468da177 3662 * @param TIMx Timer instance
<> 161:2cc1468da177 3663 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3664 */
<> 161:2cc1468da177 3665 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3666 {
<> 161:2cc1468da177 3667 return (READ_BIT(TIMx->SR, TIM_SR_UIF) == (TIM_SR_UIF));
<> 161:2cc1468da177 3668 }
<> 161:2cc1468da177 3669
<> 161:2cc1468da177 3670 /**
<> 161:2cc1468da177 3671 * @brief Clear the Capture/Compare 1 interrupt flag (CC1F).
<> 161:2cc1468da177 3672 * @rmtoll SR CC1IF LL_TIM_ClearFlag_CC1
<> 161:2cc1468da177 3673 * @param TIMx Timer instance
<> 161:2cc1468da177 3674 * @retval None
<> 161:2cc1468da177 3675 */
<> 161:2cc1468da177 3676 __STATIC_INLINE void LL_TIM_ClearFlag_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3677 {
<> 161:2cc1468da177 3678 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1IF));
<> 161:2cc1468da177 3679 }
<> 161:2cc1468da177 3680
<> 161:2cc1468da177 3681 /**
<> 161:2cc1468da177 3682 * @brief Indicate whether Capture/Compare 1 interrupt flag (CC1F) is set (Capture/Compare 1 interrupt is pending).
<> 161:2cc1468da177 3683 * @rmtoll SR CC1IF LL_TIM_IsActiveFlag_CC1
<> 161:2cc1468da177 3684 * @param TIMx Timer instance
<> 161:2cc1468da177 3685 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3686 */
<> 161:2cc1468da177 3687 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3688 {
<> 161:2cc1468da177 3689 return (READ_BIT(TIMx->SR, TIM_SR_CC1IF) == (TIM_SR_CC1IF));
<> 161:2cc1468da177 3690 }
<> 161:2cc1468da177 3691
<> 161:2cc1468da177 3692 /**
<> 161:2cc1468da177 3693 * @brief Clear the Capture/Compare 2 interrupt flag (CC2F).
<> 161:2cc1468da177 3694 * @rmtoll SR CC2IF LL_TIM_ClearFlag_CC2
<> 161:2cc1468da177 3695 * @param TIMx Timer instance
<> 161:2cc1468da177 3696 * @retval None
<> 161:2cc1468da177 3697 */
<> 161:2cc1468da177 3698 __STATIC_INLINE void LL_TIM_ClearFlag_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3699 {
<> 161:2cc1468da177 3700 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2IF));
<> 161:2cc1468da177 3701 }
<> 161:2cc1468da177 3702
<> 161:2cc1468da177 3703 /**
<> 161:2cc1468da177 3704 * @brief Indicate whether Capture/Compare 2 interrupt flag (CC2F) is set (Capture/Compare 2 interrupt is pending).
<> 161:2cc1468da177 3705 * @rmtoll SR CC2IF LL_TIM_IsActiveFlag_CC2
<> 161:2cc1468da177 3706 * @param TIMx Timer instance
<> 161:2cc1468da177 3707 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3708 */
<> 161:2cc1468da177 3709 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3710 {
<> 161:2cc1468da177 3711 return (READ_BIT(TIMx->SR, TIM_SR_CC2IF) == (TIM_SR_CC2IF));
<> 161:2cc1468da177 3712 }
<> 161:2cc1468da177 3713
<> 161:2cc1468da177 3714 /**
<> 161:2cc1468da177 3715 * @brief Clear the Capture/Compare 3 interrupt flag (CC3F).
<> 161:2cc1468da177 3716 * @rmtoll SR CC3IF LL_TIM_ClearFlag_CC3
<> 161:2cc1468da177 3717 * @param TIMx Timer instance
<> 161:2cc1468da177 3718 * @retval None
<> 161:2cc1468da177 3719 */
<> 161:2cc1468da177 3720 __STATIC_INLINE void LL_TIM_ClearFlag_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3721 {
<> 161:2cc1468da177 3722 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3IF));
<> 161:2cc1468da177 3723 }
<> 161:2cc1468da177 3724
<> 161:2cc1468da177 3725 /**
<> 161:2cc1468da177 3726 * @brief Indicate whether Capture/Compare 3 interrupt flag (CC3F) is set (Capture/Compare 3 interrupt is pending).
<> 161:2cc1468da177 3727 * @rmtoll SR CC3IF LL_TIM_IsActiveFlag_CC3
<> 161:2cc1468da177 3728 * @param TIMx Timer instance
<> 161:2cc1468da177 3729 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3730 */
<> 161:2cc1468da177 3731 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3732 {
<> 161:2cc1468da177 3733 return (READ_BIT(TIMx->SR, TIM_SR_CC3IF) == (TIM_SR_CC3IF));
<> 161:2cc1468da177 3734 }
<> 161:2cc1468da177 3735
<> 161:2cc1468da177 3736 /**
<> 161:2cc1468da177 3737 * @brief Clear the Capture/Compare 4 interrupt flag (CC4F).
<> 161:2cc1468da177 3738 * @rmtoll SR CC4IF LL_TIM_ClearFlag_CC4
<> 161:2cc1468da177 3739 * @param TIMx Timer instance
<> 161:2cc1468da177 3740 * @retval None
<> 161:2cc1468da177 3741 */
<> 161:2cc1468da177 3742 __STATIC_INLINE void LL_TIM_ClearFlag_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3743 {
<> 161:2cc1468da177 3744 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4IF));
<> 161:2cc1468da177 3745 }
<> 161:2cc1468da177 3746
<> 161:2cc1468da177 3747 /**
<> 161:2cc1468da177 3748 * @brief Indicate whether Capture/Compare 4 interrupt flag (CC4F) is set (Capture/Compare 4 interrupt is pending).
<> 161:2cc1468da177 3749 * @rmtoll SR CC4IF LL_TIM_IsActiveFlag_CC4
<> 161:2cc1468da177 3750 * @param TIMx Timer instance
<> 161:2cc1468da177 3751 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3752 */
<> 161:2cc1468da177 3753 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3754 {
<> 161:2cc1468da177 3755 return (READ_BIT(TIMx->SR, TIM_SR_CC4IF) == (TIM_SR_CC4IF));
<> 161:2cc1468da177 3756 }
<> 161:2cc1468da177 3757
<> 161:2cc1468da177 3758 /**
<> 161:2cc1468da177 3759 * @brief Clear the Capture/Compare 5 interrupt flag (CC5F).
<> 161:2cc1468da177 3760 * @rmtoll SR CC5IF LL_TIM_ClearFlag_CC5
<> 161:2cc1468da177 3761 * @param TIMx Timer instance
<> 161:2cc1468da177 3762 * @retval None
<> 161:2cc1468da177 3763 */
<> 161:2cc1468da177 3764 __STATIC_INLINE void LL_TIM_ClearFlag_CC5(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3765 {
<> 161:2cc1468da177 3766 WRITE_REG(TIMx->SR, ~(TIM_SR_CC5IF));
<> 161:2cc1468da177 3767 }
<> 161:2cc1468da177 3768
<> 161:2cc1468da177 3769 /**
<> 161:2cc1468da177 3770 * @brief Indicate whether Capture/Compare 5 interrupt flag (CC5F) is set (Capture/Compare 5 interrupt is pending).
<> 161:2cc1468da177 3771 * @rmtoll SR CC5IF LL_TIM_IsActiveFlag_CC5
<> 161:2cc1468da177 3772 * @param TIMx Timer instance
<> 161:2cc1468da177 3773 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3774 */
<> 161:2cc1468da177 3775 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC5(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3776 {
<> 161:2cc1468da177 3777 return (READ_BIT(TIMx->SR, TIM_SR_CC5IF) == (TIM_SR_CC5IF));
<> 161:2cc1468da177 3778 }
<> 161:2cc1468da177 3779
<> 161:2cc1468da177 3780 /**
<> 161:2cc1468da177 3781 * @brief Clear the Capture/Compare 6 interrupt flag (CC6F).
<> 161:2cc1468da177 3782 * @rmtoll SR CC6IF LL_TIM_ClearFlag_CC6
<> 161:2cc1468da177 3783 * @param TIMx Timer instance
<> 161:2cc1468da177 3784 * @retval None
<> 161:2cc1468da177 3785 */
<> 161:2cc1468da177 3786 __STATIC_INLINE void LL_TIM_ClearFlag_CC6(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3787 {
<> 161:2cc1468da177 3788 WRITE_REG(TIMx->SR, ~(TIM_SR_CC6IF));
<> 161:2cc1468da177 3789 }
<> 161:2cc1468da177 3790
<> 161:2cc1468da177 3791 /**
<> 161:2cc1468da177 3792 * @brief Indicate whether Capture/Compare 6 interrupt flag (CC6F) is set (Capture/Compare 6 interrupt is pending).
<> 161:2cc1468da177 3793 * @rmtoll SR CC6IF LL_TIM_IsActiveFlag_CC6
<> 161:2cc1468da177 3794 * @param TIMx Timer instance
<> 161:2cc1468da177 3795 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3796 */
<> 161:2cc1468da177 3797 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC6(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3798 {
<> 161:2cc1468da177 3799 return (READ_BIT(TIMx->SR, TIM_SR_CC6IF) == (TIM_SR_CC6IF));
<> 161:2cc1468da177 3800 }
<> 161:2cc1468da177 3801
<> 161:2cc1468da177 3802 /**
<> 161:2cc1468da177 3803 * @brief Clear the commutation interrupt flag (COMIF).
<> 161:2cc1468da177 3804 * @rmtoll SR COMIF LL_TIM_ClearFlag_COM
<> 161:2cc1468da177 3805 * @param TIMx Timer instance
<> 161:2cc1468da177 3806 * @retval None
<> 161:2cc1468da177 3807 */
<> 161:2cc1468da177 3808 __STATIC_INLINE void LL_TIM_ClearFlag_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3809 {
<> 161:2cc1468da177 3810 WRITE_REG(TIMx->SR, ~(TIM_SR_COMIF));
<> 161:2cc1468da177 3811 }
<> 161:2cc1468da177 3812
<> 161:2cc1468da177 3813 /**
<> 161:2cc1468da177 3814 * @brief Indicate whether commutation interrupt flag (COMIF) is set (commutation interrupt is pending).
<> 161:2cc1468da177 3815 * @rmtoll SR COMIF LL_TIM_IsActiveFlag_COM
<> 161:2cc1468da177 3816 * @param TIMx Timer instance
<> 161:2cc1468da177 3817 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3818 */
<> 161:2cc1468da177 3819 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3820 {
<> 161:2cc1468da177 3821 return (READ_BIT(TIMx->SR, TIM_SR_COMIF) == (TIM_SR_COMIF));
<> 161:2cc1468da177 3822 }
<> 161:2cc1468da177 3823
<> 161:2cc1468da177 3824 /**
<> 161:2cc1468da177 3825 * @brief Clear the trigger interrupt flag (TIF).
<> 161:2cc1468da177 3826 * @rmtoll SR TIF LL_TIM_ClearFlag_TRIG
<> 161:2cc1468da177 3827 * @param TIMx Timer instance
<> 161:2cc1468da177 3828 * @retval None
<> 161:2cc1468da177 3829 */
<> 161:2cc1468da177 3830 __STATIC_INLINE void LL_TIM_ClearFlag_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3831 {
<> 161:2cc1468da177 3832 WRITE_REG(TIMx->SR, ~(TIM_SR_TIF));
<> 161:2cc1468da177 3833 }
<> 161:2cc1468da177 3834
<> 161:2cc1468da177 3835 /**
<> 161:2cc1468da177 3836 * @brief Indicate whether trigger interrupt flag (TIF) is set (trigger interrupt is pending).
<> 161:2cc1468da177 3837 * @rmtoll SR TIF LL_TIM_IsActiveFlag_TRIG
<> 161:2cc1468da177 3838 * @param TIMx Timer instance
<> 161:2cc1468da177 3839 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3840 */
<> 161:2cc1468da177 3841 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3842 {
<> 161:2cc1468da177 3843 return (READ_BIT(TIMx->SR, TIM_SR_TIF) == (TIM_SR_TIF));
<> 161:2cc1468da177 3844 }
<> 161:2cc1468da177 3845
<> 161:2cc1468da177 3846 /**
<> 161:2cc1468da177 3847 * @brief Clear the break interrupt flag (BIF).
<> 161:2cc1468da177 3848 * @rmtoll SR BIF LL_TIM_ClearFlag_BRK
<> 161:2cc1468da177 3849 * @param TIMx Timer instance
<> 161:2cc1468da177 3850 * @retval None
<> 161:2cc1468da177 3851 */
<> 161:2cc1468da177 3852 __STATIC_INLINE void LL_TIM_ClearFlag_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3853 {
<> 161:2cc1468da177 3854 WRITE_REG(TIMx->SR, ~(TIM_SR_BIF));
<> 161:2cc1468da177 3855 }
<> 161:2cc1468da177 3856
<> 161:2cc1468da177 3857 /**
<> 161:2cc1468da177 3858 * @brief Indicate whether break interrupt flag (BIF) is set (break interrupt is pending).
<> 161:2cc1468da177 3859 * @rmtoll SR BIF LL_TIM_IsActiveFlag_BRK
<> 161:2cc1468da177 3860 * @param TIMx Timer instance
<> 161:2cc1468da177 3861 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3862 */
<> 161:2cc1468da177 3863 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3864 {
<> 161:2cc1468da177 3865 return (READ_BIT(TIMx->SR, TIM_SR_BIF) == (TIM_SR_BIF));
<> 161:2cc1468da177 3866 }
<> 161:2cc1468da177 3867
<> 161:2cc1468da177 3868 /**
<> 161:2cc1468da177 3869 * @brief Clear the break 2 interrupt flag (B2IF).
<> 161:2cc1468da177 3870 * @rmtoll SR B2IF LL_TIM_ClearFlag_BRK2
<> 161:2cc1468da177 3871 * @param TIMx Timer instance
<> 161:2cc1468da177 3872 * @retval None
<> 161:2cc1468da177 3873 */
<> 161:2cc1468da177 3874 __STATIC_INLINE void LL_TIM_ClearFlag_BRK2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3875 {
<> 161:2cc1468da177 3876 WRITE_REG(TIMx->SR, ~(TIM_SR_B2IF));
<> 161:2cc1468da177 3877 }
<> 161:2cc1468da177 3878
<> 161:2cc1468da177 3879 /**
<> 161:2cc1468da177 3880 * @brief Indicate whether break 2 interrupt flag (B2IF) is set (break 2 interrupt is pending).
<> 161:2cc1468da177 3881 * @rmtoll SR B2IF LL_TIM_IsActiveFlag_BRK2
<> 161:2cc1468da177 3882 * @param TIMx Timer instance
<> 161:2cc1468da177 3883 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3884 */
<> 161:2cc1468da177 3885 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3886 {
<> 161:2cc1468da177 3887 return (READ_BIT(TIMx->SR, TIM_SR_B2IF) == (TIM_SR_B2IF));
<> 161:2cc1468da177 3888 }
<> 161:2cc1468da177 3889
<> 161:2cc1468da177 3890 /**
<> 161:2cc1468da177 3891 * @brief Clear the Capture/Compare 1 over-capture interrupt flag (CC1OF).
<> 161:2cc1468da177 3892 * @rmtoll SR CC1OF LL_TIM_ClearFlag_CC1OVR
<> 161:2cc1468da177 3893 * @param TIMx Timer instance
<> 161:2cc1468da177 3894 * @retval None
<> 161:2cc1468da177 3895 */
<> 161:2cc1468da177 3896 __STATIC_INLINE void LL_TIM_ClearFlag_CC1OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3897 {
<> 161:2cc1468da177 3898 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1OF));
<> 161:2cc1468da177 3899 }
<> 161:2cc1468da177 3900
<> 161:2cc1468da177 3901 /**
<> 161:2cc1468da177 3902 * @brief Indicate whether Capture/Compare 1 over-capture interrupt flag (CC1OF) is set (Capture/Compare 1 interrupt is pending).
<> 161:2cc1468da177 3903 * @rmtoll SR CC1OF LL_TIM_IsActiveFlag_CC1OVR
<> 161:2cc1468da177 3904 * @param TIMx Timer instance
<> 161:2cc1468da177 3905 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3906 */
<> 161:2cc1468da177 3907 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3908 {
<> 161:2cc1468da177 3909 return (READ_BIT(TIMx->SR, TIM_SR_CC1OF) == (TIM_SR_CC1OF));
<> 161:2cc1468da177 3910 }
<> 161:2cc1468da177 3911
<> 161:2cc1468da177 3912 /**
<> 161:2cc1468da177 3913 * @brief Clear the Capture/Compare 2 over-capture interrupt flag (CC2OF).
<> 161:2cc1468da177 3914 * @rmtoll SR CC2OF LL_TIM_ClearFlag_CC2OVR
<> 161:2cc1468da177 3915 * @param TIMx Timer instance
<> 161:2cc1468da177 3916 * @retval None
<> 161:2cc1468da177 3917 */
<> 161:2cc1468da177 3918 __STATIC_INLINE void LL_TIM_ClearFlag_CC2OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3919 {
<> 161:2cc1468da177 3920 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2OF));
<> 161:2cc1468da177 3921 }
<> 161:2cc1468da177 3922
<> 161:2cc1468da177 3923 /**
<> 161:2cc1468da177 3924 * @brief Indicate whether Capture/Compare 2 over-capture interrupt flag (CC2OF) is set (Capture/Compare 2 over-capture interrupt is pending).
<> 161:2cc1468da177 3925 * @rmtoll SR CC2OF LL_TIM_IsActiveFlag_CC2OVR
<> 161:2cc1468da177 3926 * @param TIMx Timer instance
<> 161:2cc1468da177 3927 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3928 */
<> 161:2cc1468da177 3929 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3930 {
<> 161:2cc1468da177 3931 return (READ_BIT(TIMx->SR, TIM_SR_CC2OF) == (TIM_SR_CC2OF));
<> 161:2cc1468da177 3932 }
<> 161:2cc1468da177 3933
<> 161:2cc1468da177 3934 /**
<> 161:2cc1468da177 3935 * @brief Clear the Capture/Compare 3 over-capture interrupt flag (CC3OF).
<> 161:2cc1468da177 3936 * @rmtoll SR CC3OF LL_TIM_ClearFlag_CC3OVR
<> 161:2cc1468da177 3937 * @param TIMx Timer instance
<> 161:2cc1468da177 3938 * @retval None
<> 161:2cc1468da177 3939 */
<> 161:2cc1468da177 3940 __STATIC_INLINE void LL_TIM_ClearFlag_CC3OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3941 {
<> 161:2cc1468da177 3942 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3OF));
<> 161:2cc1468da177 3943 }
<> 161:2cc1468da177 3944
<> 161:2cc1468da177 3945 /**
<> 161:2cc1468da177 3946 * @brief Indicate whether Capture/Compare 3 over-capture interrupt flag (CC3OF) is set (Capture/Compare 3 over-capture interrupt is pending).
<> 161:2cc1468da177 3947 * @rmtoll SR CC3OF LL_TIM_IsActiveFlag_CC3OVR
<> 161:2cc1468da177 3948 * @param TIMx Timer instance
<> 161:2cc1468da177 3949 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3950 */
<> 161:2cc1468da177 3951 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3952 {
<> 161:2cc1468da177 3953 return (READ_BIT(TIMx->SR, TIM_SR_CC3OF) == (TIM_SR_CC3OF));
<> 161:2cc1468da177 3954 }
<> 161:2cc1468da177 3955
<> 161:2cc1468da177 3956 /**
<> 161:2cc1468da177 3957 * @brief Clear the Capture/Compare 4 over-capture interrupt flag (CC4OF).
<> 161:2cc1468da177 3958 * @rmtoll SR CC4OF LL_TIM_ClearFlag_CC4OVR
<> 161:2cc1468da177 3959 * @param TIMx Timer instance
<> 161:2cc1468da177 3960 * @retval None
<> 161:2cc1468da177 3961 */
<> 161:2cc1468da177 3962 __STATIC_INLINE void LL_TIM_ClearFlag_CC4OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3963 {
<> 161:2cc1468da177 3964 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4OF));
<> 161:2cc1468da177 3965 }
<> 161:2cc1468da177 3966
<> 161:2cc1468da177 3967 /**
<> 161:2cc1468da177 3968 * @brief Indicate whether Capture/Compare 4 over-capture interrupt flag (CC4OF) is set (Capture/Compare 4 over-capture interrupt is pending).
<> 161:2cc1468da177 3969 * @rmtoll SR CC4OF LL_TIM_IsActiveFlag_CC4OVR
<> 161:2cc1468da177 3970 * @param TIMx Timer instance
<> 161:2cc1468da177 3971 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3972 */
<> 161:2cc1468da177 3973 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4OVR(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3974 {
<> 161:2cc1468da177 3975 return (READ_BIT(TIMx->SR, TIM_SR_CC4OF) == (TIM_SR_CC4OF));
<> 161:2cc1468da177 3976 }
<> 161:2cc1468da177 3977
<> 161:2cc1468da177 3978 /**
<> 161:2cc1468da177 3979 * @brief Clear the system break interrupt flag (SBIF).
<> 161:2cc1468da177 3980 * @rmtoll SR SBIF LL_TIM_ClearFlag_SYSBRK
<> 161:2cc1468da177 3981 * @param TIMx Timer instance
<> 161:2cc1468da177 3982 * @retval None
<> 161:2cc1468da177 3983 */
<> 161:2cc1468da177 3984 __STATIC_INLINE void LL_TIM_ClearFlag_SYSBRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3985 {
<> 161:2cc1468da177 3986 WRITE_REG(TIMx->SR, ~(TIM_SR_SBIF));
<> 161:2cc1468da177 3987 }
<> 161:2cc1468da177 3988
<> 161:2cc1468da177 3989 /**
<> 161:2cc1468da177 3990 * @brief Indicate whether system break interrupt flag (SBIF) is set (system break interrupt is pending).
<> 161:2cc1468da177 3991 * @rmtoll SR SBIF LL_TIM_IsActiveFlag_SYSBRK
<> 161:2cc1468da177 3992 * @param TIMx Timer instance
<> 161:2cc1468da177 3993 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 3994 */
<> 161:2cc1468da177 3995 __STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_SYSBRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 3996 {
<> 161:2cc1468da177 3997 return (READ_BIT(TIMx->SR, TIM_SR_SBIF) == (TIM_SR_SBIF));
<> 161:2cc1468da177 3998 }
<> 161:2cc1468da177 3999
<> 161:2cc1468da177 4000 /**
<> 161:2cc1468da177 4001 * @}
<> 161:2cc1468da177 4002 */
<> 161:2cc1468da177 4003
<> 161:2cc1468da177 4004 /** @defgroup TIM_LL_EF_IT_Management IT-Management
<> 161:2cc1468da177 4005 * @{
<> 161:2cc1468da177 4006 */
<> 161:2cc1468da177 4007 /**
<> 161:2cc1468da177 4008 * @brief Enable update interrupt (UIE).
<> 161:2cc1468da177 4009 * @rmtoll DIER UIE LL_TIM_EnableIT_UPDATE
<> 161:2cc1468da177 4010 * @param TIMx Timer instance
<> 161:2cc1468da177 4011 * @retval None
<> 161:2cc1468da177 4012 */
<> 161:2cc1468da177 4013 __STATIC_INLINE void LL_TIM_EnableIT_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4014 {
<> 161:2cc1468da177 4015 SET_BIT(TIMx->DIER, TIM_DIER_UIE);
<> 161:2cc1468da177 4016 }
<> 161:2cc1468da177 4017
<> 161:2cc1468da177 4018 /**
<> 161:2cc1468da177 4019 * @brief Disable update interrupt (UIE).
<> 161:2cc1468da177 4020 * @rmtoll DIER UIE LL_TIM_DisableIT_UPDATE
<> 161:2cc1468da177 4021 * @param TIMx Timer instance
<> 161:2cc1468da177 4022 * @retval None
<> 161:2cc1468da177 4023 */
<> 161:2cc1468da177 4024 __STATIC_INLINE void LL_TIM_DisableIT_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4025 {
<> 161:2cc1468da177 4026 CLEAR_BIT(TIMx->DIER, TIM_DIER_UIE);
<> 161:2cc1468da177 4027 }
<> 161:2cc1468da177 4028
<> 161:2cc1468da177 4029 /**
<> 161:2cc1468da177 4030 * @brief Indicates whether the update interrupt (UIE) is enabled.
<> 161:2cc1468da177 4031 * @rmtoll DIER UIE LL_TIM_IsEnabledIT_UPDATE
<> 161:2cc1468da177 4032 * @param TIMx Timer instance
<> 161:2cc1468da177 4033 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4034 */
<> 161:2cc1468da177 4035 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4036 {
<> 161:2cc1468da177 4037 return (READ_BIT(TIMx->DIER, TIM_DIER_UIE) == (TIM_DIER_UIE));
<> 161:2cc1468da177 4038 }
<> 161:2cc1468da177 4039
<> 161:2cc1468da177 4040 /**
<> 161:2cc1468da177 4041 * @brief Enable capture/compare 1 interrupt (CC1IE).
<> 161:2cc1468da177 4042 * @rmtoll DIER CC1IE LL_TIM_EnableIT_CC1
<> 161:2cc1468da177 4043 * @param TIMx Timer instance
<> 161:2cc1468da177 4044 * @retval None
<> 161:2cc1468da177 4045 */
<> 161:2cc1468da177 4046 __STATIC_INLINE void LL_TIM_EnableIT_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4047 {
<> 161:2cc1468da177 4048 SET_BIT(TIMx->DIER, TIM_DIER_CC1IE);
<> 161:2cc1468da177 4049 }
<> 161:2cc1468da177 4050
<> 161:2cc1468da177 4051 /**
<> 161:2cc1468da177 4052 * @brief Disable capture/compare 1 interrupt (CC1IE).
<> 161:2cc1468da177 4053 * @rmtoll DIER CC1IE LL_TIM_DisableIT_CC1
<> 161:2cc1468da177 4054 * @param TIMx Timer instance
<> 161:2cc1468da177 4055 * @retval None
<> 161:2cc1468da177 4056 */
<> 161:2cc1468da177 4057 __STATIC_INLINE void LL_TIM_DisableIT_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4058 {
<> 161:2cc1468da177 4059 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1IE);
<> 161:2cc1468da177 4060 }
<> 161:2cc1468da177 4061
<> 161:2cc1468da177 4062 /**
<> 161:2cc1468da177 4063 * @brief Indicates whether the capture/compare 1 interrupt (CC1IE) is enabled.
<> 161:2cc1468da177 4064 * @rmtoll DIER CC1IE LL_TIM_IsEnabledIT_CC1
<> 161:2cc1468da177 4065 * @param TIMx Timer instance
<> 161:2cc1468da177 4066 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4067 */
<> 161:2cc1468da177 4068 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4069 {
<> 161:2cc1468da177 4070 return (READ_BIT(TIMx->DIER, TIM_DIER_CC1IE) == (TIM_DIER_CC1IE));
<> 161:2cc1468da177 4071 }
<> 161:2cc1468da177 4072
<> 161:2cc1468da177 4073 /**
<> 161:2cc1468da177 4074 * @brief Enable capture/compare 2 interrupt (CC2IE).
<> 161:2cc1468da177 4075 * @rmtoll DIER CC2IE LL_TIM_EnableIT_CC2
<> 161:2cc1468da177 4076 * @param TIMx Timer instance
<> 161:2cc1468da177 4077 * @retval None
<> 161:2cc1468da177 4078 */
<> 161:2cc1468da177 4079 __STATIC_INLINE void LL_TIM_EnableIT_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4080 {
<> 161:2cc1468da177 4081 SET_BIT(TIMx->DIER, TIM_DIER_CC2IE);
<> 161:2cc1468da177 4082 }
<> 161:2cc1468da177 4083
<> 161:2cc1468da177 4084 /**
<> 161:2cc1468da177 4085 * @brief Disable capture/compare 2 interrupt (CC2IE).
<> 161:2cc1468da177 4086 * @rmtoll DIER CC2IE LL_TIM_DisableIT_CC2
<> 161:2cc1468da177 4087 * @param TIMx Timer instance
<> 161:2cc1468da177 4088 * @retval None
<> 161:2cc1468da177 4089 */
<> 161:2cc1468da177 4090 __STATIC_INLINE void LL_TIM_DisableIT_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4091 {
<> 161:2cc1468da177 4092 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2IE);
<> 161:2cc1468da177 4093 }
<> 161:2cc1468da177 4094
<> 161:2cc1468da177 4095 /**
<> 161:2cc1468da177 4096 * @brief Indicates whether the capture/compare 2 interrupt (CC2IE) is enabled.
<> 161:2cc1468da177 4097 * @rmtoll DIER CC2IE LL_TIM_IsEnabledIT_CC2
<> 161:2cc1468da177 4098 * @param TIMx Timer instance
<> 161:2cc1468da177 4099 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4100 */
<> 161:2cc1468da177 4101 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4102 {
<> 161:2cc1468da177 4103 return (READ_BIT(TIMx->DIER, TIM_DIER_CC2IE) == (TIM_DIER_CC2IE));
<> 161:2cc1468da177 4104 }
<> 161:2cc1468da177 4105
<> 161:2cc1468da177 4106 /**
<> 161:2cc1468da177 4107 * @brief Enable capture/compare 3 interrupt (CC3IE).
<> 161:2cc1468da177 4108 * @rmtoll DIER CC3IE LL_TIM_EnableIT_CC3
<> 161:2cc1468da177 4109 * @param TIMx Timer instance
<> 161:2cc1468da177 4110 * @retval None
<> 161:2cc1468da177 4111 */
<> 161:2cc1468da177 4112 __STATIC_INLINE void LL_TIM_EnableIT_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4113 {
<> 161:2cc1468da177 4114 SET_BIT(TIMx->DIER, TIM_DIER_CC3IE);
<> 161:2cc1468da177 4115 }
<> 161:2cc1468da177 4116
<> 161:2cc1468da177 4117 /**
<> 161:2cc1468da177 4118 * @brief Disable capture/compare 3 interrupt (CC3IE).
<> 161:2cc1468da177 4119 * @rmtoll DIER CC3IE LL_TIM_DisableIT_CC3
<> 161:2cc1468da177 4120 * @param TIMx Timer instance
<> 161:2cc1468da177 4121 * @retval None
<> 161:2cc1468da177 4122 */
<> 161:2cc1468da177 4123 __STATIC_INLINE void LL_TIM_DisableIT_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4124 {
<> 161:2cc1468da177 4125 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3IE);
<> 161:2cc1468da177 4126 }
<> 161:2cc1468da177 4127
<> 161:2cc1468da177 4128 /**
<> 161:2cc1468da177 4129 * @brief Indicates whether the capture/compare 3 interrupt (CC3IE) is enabled.
<> 161:2cc1468da177 4130 * @rmtoll DIER CC3IE LL_TIM_IsEnabledIT_CC3
<> 161:2cc1468da177 4131 * @param TIMx Timer instance
<> 161:2cc1468da177 4132 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4133 */
<> 161:2cc1468da177 4134 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4135 {
<> 161:2cc1468da177 4136 return (READ_BIT(TIMx->DIER, TIM_DIER_CC3IE) == (TIM_DIER_CC3IE));
<> 161:2cc1468da177 4137 }
<> 161:2cc1468da177 4138
<> 161:2cc1468da177 4139 /**
<> 161:2cc1468da177 4140 * @brief Enable capture/compare 4 interrupt (CC4IE).
<> 161:2cc1468da177 4141 * @rmtoll DIER CC4IE LL_TIM_EnableIT_CC4
<> 161:2cc1468da177 4142 * @param TIMx Timer instance
<> 161:2cc1468da177 4143 * @retval None
<> 161:2cc1468da177 4144 */
<> 161:2cc1468da177 4145 __STATIC_INLINE void LL_TIM_EnableIT_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4146 {
<> 161:2cc1468da177 4147 SET_BIT(TIMx->DIER, TIM_DIER_CC4IE);
<> 161:2cc1468da177 4148 }
<> 161:2cc1468da177 4149
<> 161:2cc1468da177 4150 /**
<> 161:2cc1468da177 4151 * @brief Disable capture/compare 4 interrupt (CC4IE).
<> 161:2cc1468da177 4152 * @rmtoll DIER CC4IE LL_TIM_DisableIT_CC4
<> 161:2cc1468da177 4153 * @param TIMx Timer instance
<> 161:2cc1468da177 4154 * @retval None
<> 161:2cc1468da177 4155 */
<> 161:2cc1468da177 4156 __STATIC_INLINE void LL_TIM_DisableIT_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4157 {
<> 161:2cc1468da177 4158 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4IE);
<> 161:2cc1468da177 4159 }
<> 161:2cc1468da177 4160
<> 161:2cc1468da177 4161 /**
<> 161:2cc1468da177 4162 * @brief Indicates whether the capture/compare 4 interrupt (CC4IE) is enabled.
<> 161:2cc1468da177 4163 * @rmtoll DIER CC4IE LL_TIM_IsEnabledIT_CC4
<> 161:2cc1468da177 4164 * @param TIMx Timer instance
<> 161:2cc1468da177 4165 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4166 */
<> 161:2cc1468da177 4167 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4168 {
<> 161:2cc1468da177 4169 return (READ_BIT(TIMx->DIER, TIM_DIER_CC4IE) == (TIM_DIER_CC4IE));
<> 161:2cc1468da177 4170 }
<> 161:2cc1468da177 4171
<> 161:2cc1468da177 4172 /**
<> 161:2cc1468da177 4173 * @brief Enable commutation interrupt (COMIE).
<> 161:2cc1468da177 4174 * @rmtoll DIER COMIE LL_TIM_EnableIT_COM
<> 161:2cc1468da177 4175 * @param TIMx Timer instance
<> 161:2cc1468da177 4176 * @retval None
<> 161:2cc1468da177 4177 */
<> 161:2cc1468da177 4178 __STATIC_INLINE void LL_TIM_EnableIT_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4179 {
<> 161:2cc1468da177 4180 SET_BIT(TIMx->DIER, TIM_DIER_COMIE);
<> 161:2cc1468da177 4181 }
<> 161:2cc1468da177 4182
<> 161:2cc1468da177 4183 /**
<> 161:2cc1468da177 4184 * @brief Disable commutation interrupt (COMIE).
<> 161:2cc1468da177 4185 * @rmtoll DIER COMIE LL_TIM_DisableIT_COM
<> 161:2cc1468da177 4186 * @param TIMx Timer instance
<> 161:2cc1468da177 4187 * @retval None
<> 161:2cc1468da177 4188 */
<> 161:2cc1468da177 4189 __STATIC_INLINE void LL_TIM_DisableIT_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4190 {
<> 161:2cc1468da177 4191 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMIE);
<> 161:2cc1468da177 4192 }
<> 161:2cc1468da177 4193
<> 161:2cc1468da177 4194 /**
<> 161:2cc1468da177 4195 * @brief Indicates whether the commutation interrupt (COMIE) is enabled.
<> 161:2cc1468da177 4196 * @rmtoll DIER COMIE LL_TIM_IsEnabledIT_COM
<> 161:2cc1468da177 4197 * @param TIMx Timer instance
<> 161:2cc1468da177 4198 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4199 */
<> 161:2cc1468da177 4200 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4201 {
<> 161:2cc1468da177 4202 return (READ_BIT(TIMx->DIER, TIM_DIER_COMIE) == (TIM_DIER_COMIE));
<> 161:2cc1468da177 4203 }
<> 161:2cc1468da177 4204
<> 161:2cc1468da177 4205 /**
<> 161:2cc1468da177 4206 * @brief Enable trigger interrupt (TIE).
<> 161:2cc1468da177 4207 * @rmtoll DIER TIE LL_TIM_EnableIT_TRIG
<> 161:2cc1468da177 4208 * @param TIMx Timer instance
<> 161:2cc1468da177 4209 * @retval None
<> 161:2cc1468da177 4210 */
<> 161:2cc1468da177 4211 __STATIC_INLINE void LL_TIM_EnableIT_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4212 {
<> 161:2cc1468da177 4213 SET_BIT(TIMx->DIER, TIM_DIER_TIE);
<> 161:2cc1468da177 4214 }
<> 161:2cc1468da177 4215
<> 161:2cc1468da177 4216 /**
<> 161:2cc1468da177 4217 * @brief Disable trigger interrupt (TIE).
<> 161:2cc1468da177 4218 * @rmtoll DIER TIE LL_TIM_DisableIT_TRIG
<> 161:2cc1468da177 4219 * @param TIMx Timer instance
<> 161:2cc1468da177 4220 * @retval None
<> 161:2cc1468da177 4221 */
<> 161:2cc1468da177 4222 __STATIC_INLINE void LL_TIM_DisableIT_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4223 {
<> 161:2cc1468da177 4224 CLEAR_BIT(TIMx->DIER, TIM_DIER_TIE);
<> 161:2cc1468da177 4225 }
<> 161:2cc1468da177 4226
<> 161:2cc1468da177 4227 /**
<> 161:2cc1468da177 4228 * @brief Indicates whether the trigger interrupt (TIE) is enabled.
<> 161:2cc1468da177 4229 * @rmtoll DIER TIE LL_TIM_IsEnabledIT_TRIG
<> 161:2cc1468da177 4230 * @param TIMx Timer instance
<> 161:2cc1468da177 4231 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4232 */
<> 161:2cc1468da177 4233 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4234 {
<> 161:2cc1468da177 4235 return (READ_BIT(TIMx->DIER, TIM_DIER_TIE) == (TIM_DIER_TIE));
<> 161:2cc1468da177 4236 }
<> 161:2cc1468da177 4237
<> 161:2cc1468da177 4238 /**
<> 161:2cc1468da177 4239 * @brief Enable break interrupt (BIE).
<> 161:2cc1468da177 4240 * @rmtoll DIER BIE LL_TIM_EnableIT_BRK
<> 161:2cc1468da177 4241 * @param TIMx Timer instance
<> 161:2cc1468da177 4242 * @retval None
<> 161:2cc1468da177 4243 */
<> 161:2cc1468da177 4244 __STATIC_INLINE void LL_TIM_EnableIT_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4245 {
<> 161:2cc1468da177 4246 SET_BIT(TIMx->DIER, TIM_DIER_BIE);
<> 161:2cc1468da177 4247 }
<> 161:2cc1468da177 4248
<> 161:2cc1468da177 4249 /**
<> 161:2cc1468da177 4250 * @brief Disable break interrupt (BIE).
<> 161:2cc1468da177 4251 * @rmtoll DIER BIE LL_TIM_DisableIT_BRK
<> 161:2cc1468da177 4252 * @param TIMx Timer instance
<> 161:2cc1468da177 4253 * @retval None
<> 161:2cc1468da177 4254 */
<> 161:2cc1468da177 4255 __STATIC_INLINE void LL_TIM_DisableIT_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4256 {
<> 161:2cc1468da177 4257 CLEAR_BIT(TIMx->DIER, TIM_DIER_BIE);
<> 161:2cc1468da177 4258 }
<> 161:2cc1468da177 4259
<> 161:2cc1468da177 4260 /**
<> 161:2cc1468da177 4261 * @brief Indicates whether the break interrupt (BIE) is enabled.
<> 161:2cc1468da177 4262 * @rmtoll DIER BIE LL_TIM_IsEnabledIT_BRK
<> 161:2cc1468da177 4263 * @param TIMx Timer instance
<> 161:2cc1468da177 4264 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4265 */
<> 161:2cc1468da177 4266 __STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4267 {
<> 161:2cc1468da177 4268 return (READ_BIT(TIMx->DIER, TIM_DIER_BIE) == (TIM_DIER_BIE));
<> 161:2cc1468da177 4269 }
<> 161:2cc1468da177 4270
<> 161:2cc1468da177 4271 /**
<> 161:2cc1468da177 4272 * @}
<> 161:2cc1468da177 4273 */
<> 161:2cc1468da177 4274
<> 161:2cc1468da177 4275 /** @defgroup TIM_LL_EF_DMA_Management DMA-Management
<> 161:2cc1468da177 4276 * @{
<> 161:2cc1468da177 4277 */
<> 161:2cc1468da177 4278 /**
<> 161:2cc1468da177 4279 * @brief Enable update DMA request (UDE).
<> 161:2cc1468da177 4280 * @rmtoll DIER UDE LL_TIM_EnableDMAReq_UPDATE
<> 161:2cc1468da177 4281 * @param TIMx Timer instance
<> 161:2cc1468da177 4282 * @retval None
<> 161:2cc1468da177 4283 */
<> 161:2cc1468da177 4284 __STATIC_INLINE void LL_TIM_EnableDMAReq_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4285 {
<> 161:2cc1468da177 4286 SET_BIT(TIMx->DIER, TIM_DIER_UDE);
<> 161:2cc1468da177 4287 }
<> 161:2cc1468da177 4288
<> 161:2cc1468da177 4289 /**
<> 161:2cc1468da177 4290 * @brief Disable update DMA request (UDE).
<> 161:2cc1468da177 4291 * @rmtoll DIER UDE LL_TIM_DisableDMAReq_UPDATE
<> 161:2cc1468da177 4292 * @param TIMx Timer instance
<> 161:2cc1468da177 4293 * @retval None
<> 161:2cc1468da177 4294 */
<> 161:2cc1468da177 4295 __STATIC_INLINE void LL_TIM_DisableDMAReq_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4296 {
<> 161:2cc1468da177 4297 CLEAR_BIT(TIMx->DIER, TIM_DIER_UDE);
<> 161:2cc1468da177 4298 }
<> 161:2cc1468da177 4299
<> 161:2cc1468da177 4300 /**
<> 161:2cc1468da177 4301 * @brief Indicates whether the update DMA request (UDE) is enabled.
<> 161:2cc1468da177 4302 * @rmtoll DIER UDE LL_TIM_IsEnabledDMAReq_UPDATE
<> 161:2cc1468da177 4303 * @param TIMx Timer instance
<> 161:2cc1468da177 4304 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4305 */
<> 161:2cc1468da177 4306 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4307 {
<> 161:2cc1468da177 4308 return (READ_BIT(TIMx->DIER, TIM_DIER_UDE) == (TIM_DIER_UDE));
<> 161:2cc1468da177 4309 }
<> 161:2cc1468da177 4310
<> 161:2cc1468da177 4311 /**
<> 161:2cc1468da177 4312 * @brief Enable capture/compare 1 DMA request (CC1DE).
<> 161:2cc1468da177 4313 * @rmtoll DIER CC1DE LL_TIM_EnableDMAReq_CC1
<> 161:2cc1468da177 4314 * @param TIMx Timer instance
<> 161:2cc1468da177 4315 * @retval None
<> 161:2cc1468da177 4316 */
<> 161:2cc1468da177 4317 __STATIC_INLINE void LL_TIM_EnableDMAReq_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4318 {
<> 161:2cc1468da177 4319 SET_BIT(TIMx->DIER, TIM_DIER_CC1DE);
<> 161:2cc1468da177 4320 }
<> 161:2cc1468da177 4321
<> 161:2cc1468da177 4322 /**
<> 161:2cc1468da177 4323 * @brief Disable capture/compare 1 DMA request (CC1DE).
<> 161:2cc1468da177 4324 * @rmtoll DIER CC1DE LL_TIM_DisableDMAReq_CC1
<> 161:2cc1468da177 4325 * @param TIMx Timer instance
<> 161:2cc1468da177 4326 * @retval None
<> 161:2cc1468da177 4327 */
<> 161:2cc1468da177 4328 __STATIC_INLINE void LL_TIM_DisableDMAReq_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4329 {
<> 161:2cc1468da177 4330 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1DE);
<> 161:2cc1468da177 4331 }
<> 161:2cc1468da177 4332
<> 161:2cc1468da177 4333 /**
<> 161:2cc1468da177 4334 * @brief Indicates whether the capture/compare 1 DMA request (CC1DE) is enabled.
<> 161:2cc1468da177 4335 * @rmtoll DIER CC1DE LL_TIM_IsEnabledDMAReq_CC1
<> 161:2cc1468da177 4336 * @param TIMx Timer instance
<> 161:2cc1468da177 4337 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4338 */
<> 161:2cc1468da177 4339 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4340 {
<> 161:2cc1468da177 4341 return (READ_BIT(TIMx->DIER, TIM_DIER_CC1DE) == (TIM_DIER_CC1DE));
<> 161:2cc1468da177 4342 }
<> 161:2cc1468da177 4343
<> 161:2cc1468da177 4344 /**
<> 161:2cc1468da177 4345 * @brief Enable capture/compare 2 DMA request (CC2DE).
<> 161:2cc1468da177 4346 * @rmtoll DIER CC2DE LL_TIM_EnableDMAReq_CC2
<> 161:2cc1468da177 4347 * @param TIMx Timer instance
<> 161:2cc1468da177 4348 * @retval None
<> 161:2cc1468da177 4349 */
<> 161:2cc1468da177 4350 __STATIC_INLINE void LL_TIM_EnableDMAReq_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4351 {
<> 161:2cc1468da177 4352 SET_BIT(TIMx->DIER, TIM_DIER_CC2DE);
<> 161:2cc1468da177 4353 }
<> 161:2cc1468da177 4354
<> 161:2cc1468da177 4355 /**
<> 161:2cc1468da177 4356 * @brief Disable capture/compare 2 DMA request (CC2DE).
<> 161:2cc1468da177 4357 * @rmtoll DIER CC2DE LL_TIM_DisableDMAReq_CC2
<> 161:2cc1468da177 4358 * @param TIMx Timer instance
<> 161:2cc1468da177 4359 * @retval None
<> 161:2cc1468da177 4360 */
<> 161:2cc1468da177 4361 __STATIC_INLINE void LL_TIM_DisableDMAReq_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4362 {
<> 161:2cc1468da177 4363 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2DE);
<> 161:2cc1468da177 4364 }
<> 161:2cc1468da177 4365
<> 161:2cc1468da177 4366 /**
<> 161:2cc1468da177 4367 * @brief Indicates whether the capture/compare 2 DMA request (CC2DE) is enabled.
<> 161:2cc1468da177 4368 * @rmtoll DIER CC2DE LL_TIM_IsEnabledDMAReq_CC2
<> 161:2cc1468da177 4369 * @param TIMx Timer instance
<> 161:2cc1468da177 4370 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4371 */
<> 161:2cc1468da177 4372 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4373 {
<> 161:2cc1468da177 4374 return (READ_BIT(TIMx->DIER, TIM_DIER_CC2DE) == (TIM_DIER_CC2DE));
<> 161:2cc1468da177 4375 }
<> 161:2cc1468da177 4376
<> 161:2cc1468da177 4377 /**
<> 161:2cc1468da177 4378 * @brief Enable capture/compare 3 DMA request (CC3DE).
<> 161:2cc1468da177 4379 * @rmtoll DIER CC3DE LL_TIM_EnableDMAReq_CC3
<> 161:2cc1468da177 4380 * @param TIMx Timer instance
<> 161:2cc1468da177 4381 * @retval None
<> 161:2cc1468da177 4382 */
<> 161:2cc1468da177 4383 __STATIC_INLINE void LL_TIM_EnableDMAReq_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4384 {
<> 161:2cc1468da177 4385 SET_BIT(TIMx->DIER, TIM_DIER_CC3DE);
<> 161:2cc1468da177 4386 }
<> 161:2cc1468da177 4387
<> 161:2cc1468da177 4388 /**
<> 161:2cc1468da177 4389 * @brief Disable capture/compare 3 DMA request (CC3DE).
<> 161:2cc1468da177 4390 * @rmtoll DIER CC3DE LL_TIM_DisableDMAReq_CC3
<> 161:2cc1468da177 4391 * @param TIMx Timer instance
<> 161:2cc1468da177 4392 * @retval None
<> 161:2cc1468da177 4393 */
<> 161:2cc1468da177 4394 __STATIC_INLINE void LL_TIM_DisableDMAReq_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4395 {
<> 161:2cc1468da177 4396 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3DE);
<> 161:2cc1468da177 4397 }
<> 161:2cc1468da177 4398
<> 161:2cc1468da177 4399 /**
<> 161:2cc1468da177 4400 * @brief Indicates whether the capture/compare 3 DMA request (CC3DE) is enabled.
<> 161:2cc1468da177 4401 * @rmtoll DIER CC3DE LL_TIM_IsEnabledDMAReq_CC3
<> 161:2cc1468da177 4402 * @param TIMx Timer instance
<> 161:2cc1468da177 4403 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4404 */
<> 161:2cc1468da177 4405 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4406 {
<> 161:2cc1468da177 4407 return (READ_BIT(TIMx->DIER, TIM_DIER_CC3DE) == (TIM_DIER_CC3DE));
<> 161:2cc1468da177 4408 }
<> 161:2cc1468da177 4409
<> 161:2cc1468da177 4410 /**
<> 161:2cc1468da177 4411 * @brief Enable capture/compare 4 DMA request (CC4DE).
<> 161:2cc1468da177 4412 * @rmtoll DIER CC4DE LL_TIM_EnableDMAReq_CC4
<> 161:2cc1468da177 4413 * @param TIMx Timer instance
<> 161:2cc1468da177 4414 * @retval None
<> 161:2cc1468da177 4415 */
<> 161:2cc1468da177 4416 __STATIC_INLINE void LL_TIM_EnableDMAReq_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4417 {
<> 161:2cc1468da177 4418 SET_BIT(TIMx->DIER, TIM_DIER_CC4DE);
<> 161:2cc1468da177 4419 }
<> 161:2cc1468da177 4420
<> 161:2cc1468da177 4421 /**
<> 161:2cc1468da177 4422 * @brief Disable capture/compare 4 DMA request (CC4DE).
<> 161:2cc1468da177 4423 * @rmtoll DIER CC4DE LL_TIM_DisableDMAReq_CC4
<> 161:2cc1468da177 4424 * @param TIMx Timer instance
<> 161:2cc1468da177 4425 * @retval None
<> 161:2cc1468da177 4426 */
<> 161:2cc1468da177 4427 __STATIC_INLINE void LL_TIM_DisableDMAReq_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4428 {
<> 161:2cc1468da177 4429 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4DE);
<> 161:2cc1468da177 4430 }
<> 161:2cc1468da177 4431
<> 161:2cc1468da177 4432 /**
<> 161:2cc1468da177 4433 * @brief Indicates whether the capture/compare 4 DMA request (CC4DE) is enabled.
<> 161:2cc1468da177 4434 * @rmtoll DIER CC4DE LL_TIM_IsEnabledDMAReq_CC4
<> 161:2cc1468da177 4435 * @param TIMx Timer instance
<> 161:2cc1468da177 4436 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4437 */
<> 161:2cc1468da177 4438 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4439 {
<> 161:2cc1468da177 4440 return (READ_BIT(TIMx->DIER, TIM_DIER_CC4DE) == (TIM_DIER_CC4DE));
<> 161:2cc1468da177 4441 }
<> 161:2cc1468da177 4442
<> 161:2cc1468da177 4443 /**
<> 161:2cc1468da177 4444 * @brief Enable commutation DMA request (COMDE).
<> 161:2cc1468da177 4445 * @rmtoll DIER COMDE LL_TIM_EnableDMAReq_COM
<> 161:2cc1468da177 4446 * @param TIMx Timer instance
<> 161:2cc1468da177 4447 * @retval None
<> 161:2cc1468da177 4448 */
<> 161:2cc1468da177 4449 __STATIC_INLINE void LL_TIM_EnableDMAReq_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4450 {
<> 161:2cc1468da177 4451 SET_BIT(TIMx->DIER, TIM_DIER_COMDE);
<> 161:2cc1468da177 4452 }
<> 161:2cc1468da177 4453
<> 161:2cc1468da177 4454 /**
<> 161:2cc1468da177 4455 * @brief Disable commutation DMA request (COMDE).
<> 161:2cc1468da177 4456 * @rmtoll DIER COMDE LL_TIM_DisableDMAReq_COM
<> 161:2cc1468da177 4457 * @param TIMx Timer instance
<> 161:2cc1468da177 4458 * @retval None
<> 161:2cc1468da177 4459 */
<> 161:2cc1468da177 4460 __STATIC_INLINE void LL_TIM_DisableDMAReq_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4461 {
<> 161:2cc1468da177 4462 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMDE);
<> 161:2cc1468da177 4463 }
<> 161:2cc1468da177 4464
<> 161:2cc1468da177 4465 /**
<> 161:2cc1468da177 4466 * @brief Indicates whether the commutation DMA request (COMDE) is enabled.
<> 161:2cc1468da177 4467 * @rmtoll DIER COMDE LL_TIM_IsEnabledDMAReq_COM
<> 161:2cc1468da177 4468 * @param TIMx Timer instance
<> 161:2cc1468da177 4469 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4470 */
<> 161:2cc1468da177 4471 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4472 {
<> 161:2cc1468da177 4473 return (READ_BIT(TIMx->DIER, TIM_DIER_COMDE) == (TIM_DIER_COMDE));
<> 161:2cc1468da177 4474 }
<> 161:2cc1468da177 4475
<> 161:2cc1468da177 4476 /**
<> 161:2cc1468da177 4477 * @brief Enable trigger interrupt (TDE).
<> 161:2cc1468da177 4478 * @rmtoll DIER TDE LL_TIM_EnableDMAReq_TRIG
<> 161:2cc1468da177 4479 * @param TIMx Timer instance
<> 161:2cc1468da177 4480 * @retval None
<> 161:2cc1468da177 4481 */
<> 161:2cc1468da177 4482 __STATIC_INLINE void LL_TIM_EnableDMAReq_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4483 {
<> 161:2cc1468da177 4484 SET_BIT(TIMx->DIER, TIM_DIER_TDE);
<> 161:2cc1468da177 4485 }
<> 161:2cc1468da177 4486
<> 161:2cc1468da177 4487 /**
<> 161:2cc1468da177 4488 * @brief Disable trigger interrupt (TDE).
<> 161:2cc1468da177 4489 * @rmtoll DIER TDE LL_TIM_DisableDMAReq_TRIG
<> 161:2cc1468da177 4490 * @param TIMx Timer instance
<> 161:2cc1468da177 4491 * @retval None
<> 161:2cc1468da177 4492 */
<> 161:2cc1468da177 4493 __STATIC_INLINE void LL_TIM_DisableDMAReq_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4494 {
<> 161:2cc1468da177 4495 CLEAR_BIT(TIMx->DIER, TIM_DIER_TDE);
<> 161:2cc1468da177 4496 }
<> 161:2cc1468da177 4497
<> 161:2cc1468da177 4498 /**
<> 161:2cc1468da177 4499 * @brief Indicates whether the trigger interrupt (TDE) is enabled.
<> 161:2cc1468da177 4500 * @rmtoll DIER TDE LL_TIM_IsEnabledDMAReq_TRIG
<> 161:2cc1468da177 4501 * @param TIMx Timer instance
<> 161:2cc1468da177 4502 * @retval State of bit (1 or 0).
<> 161:2cc1468da177 4503 */
<> 161:2cc1468da177 4504 __STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4505 {
<> 161:2cc1468da177 4506 return (READ_BIT(TIMx->DIER, TIM_DIER_TDE) == (TIM_DIER_TDE));
<> 161:2cc1468da177 4507 }
<> 161:2cc1468da177 4508
<> 161:2cc1468da177 4509 /**
<> 161:2cc1468da177 4510 * @}
<> 161:2cc1468da177 4511 */
<> 161:2cc1468da177 4512
<> 161:2cc1468da177 4513 /** @defgroup TIM_LL_EF_EVENT_Management EVENT-Management
<> 161:2cc1468da177 4514 * @{
<> 161:2cc1468da177 4515 */
<> 161:2cc1468da177 4516 /**
<> 161:2cc1468da177 4517 * @brief Generate an update event.
<> 161:2cc1468da177 4518 * @rmtoll EGR UG LL_TIM_GenerateEvent_UPDATE
<> 161:2cc1468da177 4519 * @param TIMx Timer instance
<> 161:2cc1468da177 4520 * @retval None
<> 161:2cc1468da177 4521 */
<> 161:2cc1468da177 4522 __STATIC_INLINE void LL_TIM_GenerateEvent_UPDATE(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4523 {
<> 161:2cc1468da177 4524 SET_BIT(TIMx->EGR, TIM_EGR_UG);
<> 161:2cc1468da177 4525 }
<> 161:2cc1468da177 4526
<> 161:2cc1468da177 4527 /**
<> 161:2cc1468da177 4528 * @brief Generate Capture/Compare 1 event.
<> 161:2cc1468da177 4529 * @rmtoll EGR CC1G LL_TIM_GenerateEvent_CC1
<> 161:2cc1468da177 4530 * @param TIMx Timer instance
<> 161:2cc1468da177 4531 * @retval None
<> 161:2cc1468da177 4532 */
<> 161:2cc1468da177 4533 __STATIC_INLINE void LL_TIM_GenerateEvent_CC1(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4534 {
<> 161:2cc1468da177 4535 SET_BIT(TIMx->EGR, TIM_EGR_CC1G);
<> 161:2cc1468da177 4536 }
<> 161:2cc1468da177 4537
<> 161:2cc1468da177 4538 /**
<> 161:2cc1468da177 4539 * @brief Generate Capture/Compare 2 event.
<> 161:2cc1468da177 4540 * @rmtoll EGR CC2G LL_TIM_GenerateEvent_CC2
<> 161:2cc1468da177 4541 * @param TIMx Timer instance
<> 161:2cc1468da177 4542 * @retval None
<> 161:2cc1468da177 4543 */
<> 161:2cc1468da177 4544 __STATIC_INLINE void LL_TIM_GenerateEvent_CC2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4545 {
<> 161:2cc1468da177 4546 SET_BIT(TIMx->EGR, TIM_EGR_CC2G);
<> 161:2cc1468da177 4547 }
<> 161:2cc1468da177 4548
<> 161:2cc1468da177 4549 /**
<> 161:2cc1468da177 4550 * @brief Generate Capture/Compare 3 event.
<> 161:2cc1468da177 4551 * @rmtoll EGR CC3G LL_TIM_GenerateEvent_CC3
<> 161:2cc1468da177 4552 * @param TIMx Timer instance
<> 161:2cc1468da177 4553 * @retval None
<> 161:2cc1468da177 4554 */
<> 161:2cc1468da177 4555 __STATIC_INLINE void LL_TIM_GenerateEvent_CC3(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4556 {
<> 161:2cc1468da177 4557 SET_BIT(TIMx->EGR, TIM_EGR_CC3G);
<> 161:2cc1468da177 4558 }
<> 161:2cc1468da177 4559
<> 161:2cc1468da177 4560 /**
<> 161:2cc1468da177 4561 * @brief Generate Capture/Compare 4 event.
<> 161:2cc1468da177 4562 * @rmtoll EGR CC4G LL_TIM_GenerateEvent_CC4
<> 161:2cc1468da177 4563 * @param TIMx Timer instance
<> 161:2cc1468da177 4564 * @retval None
<> 161:2cc1468da177 4565 */
<> 161:2cc1468da177 4566 __STATIC_INLINE void LL_TIM_GenerateEvent_CC4(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4567 {
<> 161:2cc1468da177 4568 SET_BIT(TIMx->EGR, TIM_EGR_CC4G);
<> 161:2cc1468da177 4569 }
<> 161:2cc1468da177 4570
<> 161:2cc1468da177 4571 /**
<> 161:2cc1468da177 4572 * @brief Generate commutation event.
<> 161:2cc1468da177 4573 * @rmtoll EGR COMG LL_TIM_GenerateEvent_COM
<> 161:2cc1468da177 4574 * @param TIMx Timer instance
<> 161:2cc1468da177 4575 * @retval None
<> 161:2cc1468da177 4576 */
<> 161:2cc1468da177 4577 __STATIC_INLINE void LL_TIM_GenerateEvent_COM(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4578 {
<> 161:2cc1468da177 4579 SET_BIT(TIMx->EGR, TIM_EGR_COMG);
<> 161:2cc1468da177 4580 }
<> 161:2cc1468da177 4581
<> 161:2cc1468da177 4582 /**
<> 161:2cc1468da177 4583 * @brief Generate trigger event.
<> 161:2cc1468da177 4584 * @rmtoll EGR TG LL_TIM_GenerateEvent_TRIG
<> 161:2cc1468da177 4585 * @param TIMx Timer instance
<> 161:2cc1468da177 4586 * @retval None
<> 161:2cc1468da177 4587 */
<> 161:2cc1468da177 4588 __STATIC_INLINE void LL_TIM_GenerateEvent_TRIG(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4589 {
<> 161:2cc1468da177 4590 SET_BIT(TIMx->EGR, TIM_EGR_TG);
<> 161:2cc1468da177 4591 }
<> 161:2cc1468da177 4592
<> 161:2cc1468da177 4593 /**
<> 161:2cc1468da177 4594 * @brief Generate break event.
<> 161:2cc1468da177 4595 * @rmtoll EGR BG LL_TIM_GenerateEvent_BRK
<> 161:2cc1468da177 4596 * @param TIMx Timer instance
<> 161:2cc1468da177 4597 * @retval None
<> 161:2cc1468da177 4598 */
<> 161:2cc1468da177 4599 __STATIC_INLINE void LL_TIM_GenerateEvent_BRK(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4600 {
<> 161:2cc1468da177 4601 SET_BIT(TIMx->EGR, TIM_EGR_BG);
<> 161:2cc1468da177 4602 }
<> 161:2cc1468da177 4603
<> 161:2cc1468da177 4604 /**
<> 161:2cc1468da177 4605 * @brief Generate break 2 event.
<> 161:2cc1468da177 4606 * @rmtoll EGR B2G LL_TIM_GenerateEvent_BRK2
<> 161:2cc1468da177 4607 * @param TIMx Timer instance
<> 161:2cc1468da177 4608 * @retval None
<> 161:2cc1468da177 4609 */
<> 161:2cc1468da177 4610 __STATIC_INLINE void LL_TIM_GenerateEvent_BRK2(TIM_TypeDef *TIMx)
<> 161:2cc1468da177 4611 {
<> 161:2cc1468da177 4612 SET_BIT(TIMx->EGR, TIM_EGR_B2G);
<> 161:2cc1468da177 4613 }
<> 161:2cc1468da177 4614
<> 161:2cc1468da177 4615 /**
<> 161:2cc1468da177 4616 * @}
<> 161:2cc1468da177 4617 */
<> 161:2cc1468da177 4618
<> 161:2cc1468da177 4619 #if defined(USE_FULL_LL_DRIVER)
<> 161:2cc1468da177 4620 /** @defgroup TIM_LL_EF_Init Initialisation and deinitialisation functions
<> 161:2cc1468da177 4621 * @{
<> 161:2cc1468da177 4622 */
<> 161:2cc1468da177 4623
<> 161:2cc1468da177 4624 ErrorStatus LL_TIM_DeInit(TIM_TypeDef *TIMx);
<> 161:2cc1468da177 4625 void LL_TIM_StructInit(LL_TIM_InitTypeDef *TIM_InitStruct);
<> 161:2cc1468da177 4626 ErrorStatus LL_TIM_Init(TIM_TypeDef *TIMx, LL_TIM_InitTypeDef *TIM_InitStruct);
<> 161:2cc1468da177 4627 void LL_TIM_OC_StructInit(LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
<> 161:2cc1468da177 4628 ErrorStatus LL_TIM_OC_Init(TIM_TypeDef *TIMx, uint32_t Channel, LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
<> 161:2cc1468da177 4629 void LL_TIM_IC_StructInit(LL_TIM_IC_InitTypeDef *TIM_ICInitStruct);
<> 161:2cc1468da177 4630 ErrorStatus LL_TIM_IC_Init(TIM_TypeDef *TIMx, uint32_t Channel, LL_TIM_IC_InitTypeDef *TIM_IC_InitStruct);
<> 161:2cc1468da177 4631 void LL_TIM_ENCODER_StructInit(LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
<> 161:2cc1468da177 4632 ErrorStatus LL_TIM_ENCODER_Init(TIM_TypeDef *TIMx, LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
<> 161:2cc1468da177 4633 void LL_TIM_HALLSENSOR_StructInit(LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
<> 161:2cc1468da177 4634 ErrorStatus LL_TIM_HALLSENSOR_Init(TIM_TypeDef *TIMx, LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
<> 161:2cc1468da177 4635 void LL_TIM_BDTR_StructInit(LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
<> 161:2cc1468da177 4636 ErrorStatus LL_TIM_BDTR_Init(TIM_TypeDef *TIMx, LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
<> 161:2cc1468da177 4637 /**
<> 161:2cc1468da177 4638 * @}
<> 161:2cc1468da177 4639 */
<> 161:2cc1468da177 4640 #endif /* USE_FULL_LL_DRIVER */
<> 161:2cc1468da177 4641
<> 161:2cc1468da177 4642 /**
<> 161:2cc1468da177 4643 * @}
<> 161:2cc1468da177 4644 */
<> 161:2cc1468da177 4645
<> 161:2cc1468da177 4646 /**
<> 161:2cc1468da177 4647 * @}
<> 161:2cc1468da177 4648 */
<> 161:2cc1468da177 4649
<> 161:2cc1468da177 4650 #endif /* TIM1 || TIM8 || TIM2 || TIM3 || TIM4 || TIM5 ||TIM9 || TIM10 || TIM11 || TIM12 || TIM13 || TIM14 || TIM6 || TIM7 */
<> 161:2cc1468da177 4651
<> 161:2cc1468da177 4652 /**
<> 161:2cc1468da177 4653 * @}
<> 161:2cc1468da177 4654 */
<> 161:2cc1468da177 4655
<> 161:2cc1468da177 4656 #ifdef __cplusplus
<> 161:2cc1468da177 4657 }
<> 161:2cc1468da177 4658 #endif
<> 161:2cc1468da177 4659
<> 161:2cc1468da177 4660 #endif /* __STM32F7xx_LL_TIM_H */
<> 161:2cc1468da177 4661 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/