STM32F37 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
STM32F37x_StdPeriph_Driver

Modules

 ADC_Exported_Constants
 
 ADC
 ADC driver modules.
 
 CAN
 CAN driver modules.
 
 CEC
 CEC driver modules.
 
 COMP
 COMP driver modules.
 
 CRC
 CRC driver modules.
 
 DAC
 DAC driver modules.
 
 DBGMCU
 DBGMCU driver modules.
 
 DMA
 DMA driver modules.
 
 EXTI
 EXTI driver modules.
 
 FLASH
 FLASH driver modules.
 
 GPIO
 GPIO driver modules.
 
 I2C
 I2C driver modules.
 
 IWDG
 IWDG driver modules.
 
 MISC
 MISC driver modules.
 
 PWR
 PWR driver modules.
 
 RCC
 RCC driver modules.
 
 RTC
 RTC driver modules.
 
 SDADC
 SDADC driver modules.
 
 SPI
 SPI driver modules.
 
 SYSCFG
 SYSCFG driver modules.
 
 TIM
 TIM driver modules.
 
 USART
 USART driver modules.
 
 WWDG
 WWDG driver modules.
 

Functions

void ADC_DeInit (ADC_TypeDef *ADCx)
 Deinitializes the ADCx peripheral registers to their default reset values. More...
 
void ADC_Init (ADC_TypeDef *ADCx, ADC_InitTypeDef *ADC_InitStruct)
 Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct. More...
 
void ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct)
 Fills each ADC_InitStruct member with its default value. More...
 
void ADC_Cmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the specified ADC peripheral. More...
 
void ADC_StartCalibration (ADC_TypeDef *ADCx)
 Starts the selected ADC calibration process. More...
 
void ADC_ResetCalibration (ADC_TypeDef *ADCx)
 Resets the selected ADC calibration registers. More...
 
void ADC_AnalogWatchdogCmd (ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog)
 Enables or disables the analog watchdog on single/all regular or injected channels. More...
 
void ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold)
 Configures the high and low thresholds of the analog watchdog. More...
 
void ADC_AnalogWatchdogSingleChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel)
 Configures the analog watchdog guarded single channel. More...
 
void ADC_TempSensorVrefintCmd (FunctionalState NewState)
 Enables or disables the temperature sensor and Vrefint channel. More...
 
void ADC_RegularChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
 Configures for the selected ADC regular channel its corresponding rank in the sequencer and its sample time. More...
 
void ADC_ExternalTrigConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the ADCx conversion through external trigger. More...
 
void ADC_SoftwareStartConv (ADC_TypeDef *ADCx)
 Enables or disables the selected ADC software start conversion . More...
 
FlagStatus ADC_GetSoftwareStartConvStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC Software start conversion Status. More...
 
void ADC_ContinuousModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the ADC continuous conversion mode. More...
 
void ADC_DiscModeChannelCountConfig (ADC_TypeDef *ADCx, uint8_t Number)
 Configures the discontinuous mode for the selected ADC regular group channel. More...
 
void ADC_DiscModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the discontinuous mode on regular group channel for the specified ADC. More...
 
uint16_t ADC_GetConversionValue (ADC_TypeDef *ADCx)
 Returns the last ADCx conversion result data for regular channel. More...
 
void ADC_DMACmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the specified ADC DMA request. More...
 
void ADC_InjectedChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
 Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time. More...
 
void ADC_InjectedSequencerLengthConfig (ADC_TypeDef *ADCx, uint8_t Length)
 Configures the sequencer length for injected channels. More...
 
void ADC_SetInjectedOffset (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel, uint16_t ADC_Offset)
 Set the injected channels conversion value offset. More...
 
void ADC_ExternalTrigInjectedConvConfig (ADC_TypeDef *ADCx, uint32_t ADC_ExternalTrigInjecConv)
 Configures the ADCx external trigger for injected channels conversion. More...
 
void ADC_ExternalTrigInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the ADCx injected channels conversion through external trigger. More...
 
void ADC_SoftwareStartInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the selected ADC start of the injected channels conversion. More...
 
FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC Software start injected conversion Status. More...
 
void ADC_AutoInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the selected ADC automatic injected group conversion after regular one. More...
 
void ADC_InjectedDiscModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the discontinuous mode for injected group channel for the specified ADC. More...
 
uint16_t ADC_GetInjectedConversionValue (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel)
 Returns the ADC injected channel conversion result. More...
 
void ADC_ITConfig (ADC_TypeDef *ADCx, uint16_t ADC_IT, FunctionalState NewState)
 Enables or disables the specified ADC interrupts. More...
 
FlagStatus ADC_GetFlagStatus (ADC_TypeDef *ADCx, uint8_t ADC_FLAG)
 Checks whether the specified ADC flag is set or not. More...
 
void ADC_ClearFlag (ADC_TypeDef *ADCx, uint8_t ADC_FLAG)
 Clears the ADCx's pending flags. More...
 
ITStatus ADC_GetITStatus (ADC_TypeDef *ADCx, uint16_t ADC_IT)
 Checks whether the specified ADC interrupt has occurred or not. More...
 
void ADC_ClearITPendingBit (ADC_TypeDef *ADCx, uint16_t ADC_IT)
 Clears the ADCx's interrupt pending bits. More...
 
FlagStatus ADC_GetCalibrationStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC calibration status. More...
 
FlagStatus ADC_GetResetCalibrationStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC reset calibration registers status. More...
 
void TIM_DeInit (TIM_TypeDef *TIMx)
 Deinitializes the TIMx peripheral registers to their default reset values. More...
 
void TIM_TimeBaseInit (TIM_TypeDef *TIMx, TIM_TimeBaseInitTypeDef *TIM_TimeBaseInitStruct)
 Initializes the TIMx Time Base Unit peripheral according to the specified parameters in the TIM_TimeBaseInitStruct. More...
 
void TIM_TimeBaseStructInit (TIM_TimeBaseInitTypeDef *TIM_TimeBaseInitStruct)
 Fills each TIM_TimeBaseInitStruct member with its default value. More...
 
void TIM_PrescalerConfig (TIM_TypeDef *TIMx, uint16_t Prescaler, uint16_t TIM_PSCReloadMode)
 Configures the TIMx Prescaler. More...
 
void TIM_CounterModeConfig (TIM_TypeDef *TIMx, uint16_t TIM_CounterMode)
 Specifies the TIMx Counter Mode to be used. More...
 
void TIM_SetCounter (TIM_TypeDef *TIMx, uint32_t Counter)
 Sets the TIMx Counter Register value. More...
 
void TIM_SetAutoreload (TIM_TypeDef *TIMx, uint32_t Autoreload)
 Sets the TIMx Autoreload Register value. More...
 
uint32_t TIM_GetCounter (TIM_TypeDef *TIMx)
 Gets the TIMx Counter value. More...
 
uint16_t TIM_GetPrescaler (TIM_TypeDef *TIMx)
 Gets the TIMx Prescaler value. More...
 
void TIM_UpdateDisableConfig (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or Disables the TIMx Update event. More...
 
void TIM_UpdateRequestConfig (TIM_TypeDef *TIMx, uint16_t TIM_UpdateSource)
 Configures the TIMx Update Request Interrupt source. More...
 
void TIM_ARRPreloadConfig (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables TIMx peripheral Preload register on ARR. More...
 
void TIM_SelectOnePulseMode (TIM_TypeDef *TIMx, uint16_t TIM_OPMode)
 Selects the TIMx's One Pulse Mode. More...
 
void TIM_SetClockDivision (TIM_TypeDef *TIMx, uint16_t TIM_CKD)
 Sets the TIMx Clock Division value. More...
 
void TIM_Cmd (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the specified TIM peripheral. More...
 
void TIM_BDTRConfig (TIM_TypeDef *TIMx, TIM_BDTRInitTypeDef *TIM_BDTRInitStruct)
 Configures the: Break feature, dead time, Lock level, the OSSI, the OSSR State and the AOE(automatic output enable). More...
 
void TIM_BDTRStructInit (TIM_BDTRInitTypeDef *TIM_BDTRInitStruct)
 Fills each TIM_BDTRInitStruct member with its default value. More...
 
void TIM_CtrlPWMOutputs (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the TIM peripheral Main Outputs. More...
 
void TIM_OC1Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel1 according to the specified parameters in the TIM_OCInitStruct. More...
 
void TIM_OC2Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel2 according to the specified parameters in the TIM_OCInitStruct. More...
 
void TIM_OC3Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel3 according to the specified parameters in the TIM_OCInitStruct. More...
 
void TIM_OC4Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel4 according to the specified parameters in the TIM_OCInitStruct. More...
 
void TIM_OCStructInit (TIM_OCInitTypeDef *TIM_OCInitStruct)
 Fills each TIM_OCInitStruct member with its default value. More...
 
void TIM_SelectOCxM (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_OCMode)
 Selects the TIM Output Compare Mode. More...
 
void TIM_SetCompare1 (TIM_TypeDef *TIMx, uint32_t Compare1)
 Sets the TIMx Capture Compare1 Register value. More...
 
void TIM_SetCompare2 (TIM_TypeDef *TIMx, uint32_t Compare2)
 Sets the TIMx Capture Compare2 Register value. More...
 
void TIM_SetCompare3 (TIM_TypeDef *TIMx, uint32_t Compare3)
 Sets the TIMx Capture Compare3 Register value. More...
 
void TIM_SetCompare4 (TIM_TypeDef *TIMx, uint32_t Compare4)
 Sets the TIMx Capture Compare4 Register value. More...
 
void TIM_ForcedOC1Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 1 waveform to active or inactive level. More...
 
void TIM_ForcedOC2Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 2 waveform to active or inactive level. More...
 
void TIM_ForcedOC3Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 3 waveform to active or inactive level. More...
 
void TIM_ForcedOC4Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 4 waveform to active or inactive level. More...
 
void TIM_CCPreloadControl (TIM_TypeDef *TIMx, FunctionalState NewState)
 Sets or Resets the TIM peripheral Capture Compare Preload Control bit. More...
 
void TIM_OC1PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR1. More...
 
void TIM_OC2PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR2. More...
 
void TIM_OC3PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR3. More...
 
void TIM_OC4PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR4. More...
 
void TIM_OC1FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 1 Fast feature. More...
 
void TIM_OC2FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 2 Fast feature. More...
 
void TIM_OC3FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 3 Fast feature. More...
 
void TIM_OC4FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 4 Fast feature. More...
 
void TIM_ClearOC1Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF1 signal on an external event. More...
 
void TIM_ClearOC2Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF2 signal on an external event. More...
 
void TIM_ClearOC3Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF3 signal on an external event. More...
 
void TIM_ClearOC4Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF4 signal on an external event. More...
 
void TIM_OC1PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 1 polarity. More...
 
void TIM_OC1NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 1N polarity. More...
 
void TIM_OC2PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 2 polarity. More...
 
void TIM_OC2NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 
void TIM_OC3PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 3 polarity. More...
 
void TIM_OC3NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 
void TIM_OC4PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 4 polarity. More...
 
void TIM_SelectOCREFClear (TIM_TypeDef *TIMx, uint16_t TIM_OCReferenceClear)
 Selects the OCReference Clear source. More...
 
void TIM_CCxCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCx)
 Enables or disables the TIM Capture Compare Channel x. More...
 
void TIM_CCxNCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCxN)
 Enables or disables the TIM Capture Compare Channel xN. More...
 
void TIM_SelectCOM (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIM peripheral Commutation event. More...
 
void TIM_ICInit (TIM_TypeDef *TIMx, TIM_ICInitTypeDef *TIM_ICInitStruct)
 Initializes the TIM peripheral according to the specified parameters in the TIM_ICInitStruct. More...
 
void TIM_ICStructInit (TIM_ICInitTypeDef *TIM_ICInitStruct)
 Fills each TIM_ICInitStruct member with its default value. More...
 
void TIM_PWMIConfig (TIM_TypeDef *TIMx, TIM_ICInitTypeDef *TIM_ICInitStruct)
 Configures the TIM peripheral according to the specified parameters in the TIM_ICInitStruct to measure an external PWM signal. More...
 
uint32_t TIM_GetCapture1 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 1 value. More...
 
uint32_t TIM_GetCapture2 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 2 value. More...
 
uint32_t TIM_GetCapture3 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 3 value. More...
 
uint32_t TIM_GetCapture4 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 4 value. More...
 
void TIM_SetIC1Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 1 prescaler. More...
 
void TIM_SetIC2Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 2 prescaler. More...
 
void TIM_SetIC3Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 3 prescaler. More...
 
void TIM_SetIC4Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 4 prescaler. More...
 
void TIM_ITConfig (TIM_TypeDef *TIMx, uint16_t TIM_IT, FunctionalState NewState)
 Enables or disables the specified TIM interrupts. More...
 
void TIM_GenerateEvent (TIM_TypeDef *TIMx, uint16_t TIM_EventSource)
 Configures the TIMx event to be generate by software. More...
 
FlagStatus TIM_GetFlagStatus (TIM_TypeDef *TIMx, uint16_t TIM_FLAG)
 Checks whether the specified TIM flag is set or not. More...
 
void TIM_ClearFlag (TIM_TypeDef *TIMx, uint16_t TIM_FLAG)
 Clears the TIMx's pending flags. More...
 
ITStatus TIM_GetITStatus (TIM_TypeDef *TIMx, uint16_t TIM_IT)
 Checks whether the TIM interrupt has occurred or not. More...
 
void TIM_ClearITPendingBit (TIM_TypeDef *TIMx, uint16_t TIM_IT)
 Clears the TIMx's interrupt pending bits. More...
 
void TIM_DMAConfig (TIM_TypeDef *TIMx, uint16_t TIM_DMABase, uint16_t TIM_DMABurstLength)
 Configures the TIMx's DMA interface. More...
 
void TIM_DMACmd (TIM_TypeDef *TIMx, uint16_t TIM_DMASource, FunctionalState NewState)
 Enables or disables the TIMx's DMA Requests. More...
 
void TIM_SelectCCDMA (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIMx peripheral Capture Compare DMA source. More...
 
void TIM_InternalClockConfig (TIM_TypeDef *TIMx)
 Configures the TIMx internal Clock. More...
 
void TIM_ITRxExternalClockConfig (TIM_TypeDef *TIMx, uint16_t TIM_InputTriggerSource)
 Configures the TIMx Internal Trigger as External Clock. More...
 
void TIM_TIxExternalClockConfig (TIM_TypeDef *TIMx, uint16_t TIM_TIxExternalCLKSource, uint16_t TIM_ICPolarity, uint16_t ICFilter)
 Configures the TIMx Trigger as External Clock. More...
 
void TIM_ETRClockMode1Config (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the External clock Mode1. More...
 
void TIM_ETRClockMode2Config (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the External clock Mode2. More...
 
void TIM_SelectInputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_InputTriggerSource)
 Selects the Input Trigger source. More...
 
void TIM_SelectOutputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_TRGOSource)
 Selects the TIMx Trigger Output Mode. More...
 
void TIM_SelectSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_SlaveMode)
 Selects the TIMx Slave Mode. More...
 
void TIM_SelectMasterSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_MasterSlaveMode)
 Sets or Resets the TIMx Master/Slave Mode. More...
 
void TIM_ETRConfig (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the TIMx External Trigger (ETR). More...
 
void TIM_EncoderInterfaceConfig (TIM_TypeDef *TIMx, uint16_t TIM_EncoderMode, uint16_t TIM_IC1Polarity, uint16_t TIM_IC2Polarity)
 Configures the TIMx Encoder Interface. More...
 
void TIM_SelectHallSensor (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the TIMx's Hall sensor interface. More...
 
void TIM_RemapConfig (TIM_TypeDef *TIMx, uint16_t TIM_Remap)
 Configures the TIM14 Remapping input Capabilities. More...
 

Detailed Description

< Includes ----------------------------------------------------------——

< Define to prevent recursive inclusion ----------------------------———

< Includes ------------------------------------------------------------——

Function Documentation

void ADC_AnalogWatchdogCmd ( ADC_TypeDef *  ADCx,
uint32_t  ADC_AnalogWatchdog 
)

Enables or disables the analog watchdog on single/all regular or injected channels.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_AnalogWatchdog,:the ADC analog watchdog configuration. This parameter can be one of the following values:
  • ADC_AnalogWatchdog_SingleRegEnable: Analog watchdog on a single regular channel
  • ADC_AnalogWatchdog_SingleInjecEnable: Analog watchdog on a single injected channel
  • ADC_AnalogWatchdog_SingleRegOrInjecEnable: Analog watchdog on a single regular or injected channel
  • ADC_AnalogWatchdog_AllRegEnable: Analog watchdog on all regular channel
  • ADC_AnalogWatchdog_AllInjecEnable: Analog watchdog on all injected channel
  • ADC_AnalogWatchdog_AllRegAllInjecEnable: Analog watchdog on all regular and injected channels
  • ADC_AnalogWatchdog_None: No channel guarded by the analog watchdog
Return values
None
void ADC_AnalogWatchdogSingleChannelConfig ( ADC_TypeDef *  ADCx,
uint8_t  ADC_Channel 
)

Configures the analog watchdog guarded single channel.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_Channel,:the ADC channel to configure for the analog watchdog. This parameter can be one of the following values:
  • ADC_Channel_0: ADC Channel0 selected
  • ADC_Channel_1: ADC Channel1 selected
  • ADC_Channel_2: ADC Channel2 selected
  • ADC_Channel_3: ADC Channel3 selected
  • ADC_Channel_4: ADC Channel4 selected
  • ADC_Channel_5: ADC Channel5 selected
  • ADC_Channel_6: ADC Channel6 selected
  • ADC_Channel_7: ADC Channel7 selected
  • ADC_Channel_8: ADC Channel8 selected
  • ADC_Channel_9: ADC Channel9 selected
  • ADC_Channel_10: ADC Channel10 selected
  • ADC_Channel_11: ADC Channel11 selected
  • ADC_Channel_12: ADC Channel12 selected
  • ADC_Channel_13: ADC Channel13 selected
  • ADC_Channel_14: ADC Channel14 selected
  • ADC_Channel_15: ADC Channel15 selected
  • ADC_Channel_16: ADC Channel16 selected
  • ADC_Channel_17: ADC Channel17 selected
Return values
None
void ADC_AnalogWatchdogThresholdsConfig ( ADC_TypeDef *  ADCx,
uint16_t  HighThreshold,
uint16_t  LowThreshold 
)

Configures the high and low thresholds of the analog watchdog.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
HighThreshold,:the ADC analog watchdog High threshold value. This parameter must be a 12bit value.
LowThreshold,:the ADC analog watchdog Low threshold value. This parameter must be a 12bit value.
Return values
None
void ADC_AutoInjectedConvCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the selected ADC automatic injected group conversion after regular one.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC auto injected conversion This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_ClearFlag ( ADC_TypeDef *  ADCx,
uint8_t  ADC_FLAG 
)

Clears the ADCx's pending flags.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_FLAG,:specifies the flag to clear. This parameter can be any combination of the following values:
  • ADC_FLAG_AWD: Analog watchdog flag
  • ADC_FLAG_EOC: End of conversion flag
  • ADC_FLAG_JEOC: End of injected group conversion flag
  • ADC_FLAG_JSTRT: Start of injected group conversion flag
  • ADC_FLAG_STRT: Start of regular group conversion flag
Return values
None
void ADC_ClearITPendingBit ( ADC_TypeDef *  ADCx,
uint16_t  ADC_IT 
)

Clears the ADCx's interrupt pending bits.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt pending bit to clear. This parameter can be any combination of the following values:
  • ADC_IT_EOC: End of conversion interrupt mask
  • ADC_IT_AWD: Analog watchdog interrupt mask
  • ADC_IT_JEOC: End of injected conversion interrupt mask
Return values
None
void ADC_Cmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the specified ADC peripheral.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the ADCx peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_ContinuousModeCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the ADC continuous conversion mode.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC continuous conversion mode This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_DeInit ( ADC_TypeDef *  ADCx)

Deinitializes the ADCx peripheral registers to their default reset values.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
None
void ADC_DiscModeChannelCountConfig ( ADC_TypeDef *  ADCx,
uint8_t  Number 
)

Configures the discontinuous mode for the selected ADC regular group channel.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Number,:specifies the discontinuous mode regular channel count value. This number must be between 1 and 8.
Return values
None
void ADC_DiscModeCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the discontinuous mode on regular group channel for the specified ADC.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC discontinuous mode on regular group channel. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_DMACmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the specified ADC DMA request.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC DMA transfer. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_ExternalTrigConvCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the ADCx conversion through external trigger.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC external trigger start of conversion. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_ExternalTrigInjectedConvCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the ADCx injected channels conversion through external trigger.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC external trigger start of injected conversion. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_ExternalTrigInjectedConvConfig ( ADC_TypeDef *  ADCx,
uint32_t  ADC_ExternalTrigInjecConv 
)

Configures the ADCx external trigger for injected channels conversion.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_ExternalTrigInjecConv,:specifies the ADC trigger to start injected conversion. This parameter can be one of the following values:
  • ADC_ExternalTrigInjecConv_T1_TRGO: Timer1 TRGO event selected (for ADC1, ADC2 and ADC3)
  • ADC_ExternalTrigInjecConv_T1_CC4: Timer1 capture compare4 selected (for ADC1, ADC2 and ADC3)
  • ADC_ExternalTrigInjecConv_T2_TRGO: Timer2 TRGO event selected (for ADC1 and ADC2)
  • ADC_ExternalTrigInjecConv_T2_CC1: Timer2 capture compare1 selected (for ADC1 and ADC2)
  • ADC_ExternalTrigInjecConv_T3_CC4: Timer3 capture compare4 selected (for ADC1 and ADC2)
  • ADC_ExternalTrigInjecConv_T4_TRGO: Timer4 TRGO event selected (for ADC1 and ADC2)
  • ADC_ExternalTrigInjecConv_Ext_IT15_TIM8_CC4: External interrupt line 15 or Timer8 capture compare4 event selected (for ADC1 and ADC2)
  • ADC_ExternalTrigInjecConv_T4_CC3: Timer4 capture compare3 selected (for ADC3 only)
  • ADC_ExternalTrigInjecConv_T8_CC2: Timer8 capture compare2 selected (for ADC3 only)
  • ADC_ExternalTrigInjecConv_T8_CC4: Timer8 capture compare4 selected (for ADC3 only)
  • ADC_ExternalTrigInjecConv_T5_TRGO: Timer5 TRGO event selected (for ADC3 only)
  • ADC_ExternalTrigInjecConv_T5_CC4: Timer5 capture compare4 selected (for ADC3 only)
  • ADC_ExternalTrigInjecConv_None: Injected conversion started by software and not by external trigger (for ADC1, ADC2 and ADC3)
Return values
None
FlagStatus ADC_GetCalibrationStatus ( ADC_TypeDef *  ADCx)

Gets the selected ADC calibration status.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
Thenew state of ADC calibration (SET or RESET).
uint16_t ADC_GetConversionValue ( ADC_TypeDef *  ADCx)

Returns the last ADCx conversion result data for regular channel.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
TheData conversion value.
FlagStatus ADC_GetFlagStatus ( ADC_TypeDef *  ADCx,
uint8_t  ADC_FLAG 
)

Checks whether the specified ADC flag is set or not.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_FLAG,:specifies the flag to check. This parameter can be one of the following values:
  • ADC_FLAG_AWD: Analog watchdog flag
  • ADC_FLAG_EOC: End of conversion flag
  • ADC_FLAG_JEOC: End of injected group conversion flag
  • ADC_FLAG_JSTRT: Start of injected group conversion flag
  • ADC_FLAG_STRT: Start of regular group conversion flag
Return values
Thenew state of ADC_FLAG (SET or RESET).
uint16_t ADC_GetInjectedConversionValue ( ADC_TypeDef *  ADCx,
uint8_t  ADC_InjectedChannel 
)

Returns the ADC injected channel conversion result.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_InjectedChannel,:the converted ADC injected channel. This parameter can be one of the following values:
  • ADC_InjectedChannel_1: Injected Channel1 selected
  • ADC_InjectedChannel_2: Injected Channel2 selected
  • ADC_InjectedChannel_3: Injected Channel3 selected
  • ADC_InjectedChannel_4: Injected Channel4 selected
Return values
TheData conversion value.
ITStatus ADC_GetITStatus ( ADC_TypeDef *  ADCx,
uint16_t  ADC_IT 
)

Checks whether the specified ADC interrupt has occurred or not.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt source to check. This parameter can be one of the following values:
  • ADC_IT_EOC: End of conversion interrupt mask
  • ADC_IT_AWD: Analog watchdog interrupt mask
  • ADC_IT_JEOC: End of injected conversion interrupt mask
Return values
Thenew state of ADC_IT (SET or RESET).
FlagStatus ADC_GetResetCalibrationStatus ( ADC_TypeDef *  ADCx)

Gets the selected ADC reset calibration registers status.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
Thenew state of ADC reset calibration registers (SET or RESET).
FlagStatus ADC_GetSoftwareStartConvStatus ( ADC_TypeDef *  ADCx)

Gets the selected ADC Software start conversion Status.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
Thenew state of ADC software start conversion (SET or RESET).
FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus ( ADC_TypeDef *  ADCx)

Gets the selected ADC Software start injected conversion Status.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
Thenew state of ADC software start injected conversion (SET or RESET).
void ADC_Init ( ADC_TypeDef *  ADCx,
ADC_InitTypeDef ADC_InitStruct 
)

Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_InitStruct,:pointer to an ADC_InitTypeDef structure that contains the configuration information for the specified ADC peripheral.
Return values
None
void ADC_InjectedChannelConfig ( ADC_TypeDef *  ADCx,
uint8_t  ADC_Channel,
uint8_t  Rank,
uint8_t  ADC_SampleTime 
)

Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_Channel,:the ADC channel to configure. This parameter can be one of the following values:
  • ADC_Channel_0: ADC Channel0 selected
  • ADC_Channel_1: ADC Channel1 selected
  • ADC_Channel_2: ADC Channel2 selected
  • ADC_Channel_3: ADC Channel3 selected
  • ADC_Channel_4: ADC Channel4 selected
  • ADC_Channel_5: ADC Channel5 selected
  • ADC_Channel_6: ADC Channel6 selected
  • ADC_Channel_7: ADC Channel7 selected
  • ADC_Channel_8: ADC Channel8 selected
  • ADC_Channel_9: ADC Channel9 selected
  • ADC_Channel_10: ADC Channel10 selected
  • ADC_Channel_11: ADC Channel11 selected
  • ADC_Channel_12: ADC Channel12 selected
  • ADC_Channel_13: ADC Channel13 selected
  • ADC_Channel_14: ADC Channel14 selected
  • ADC_Channel_15: ADC Channel15 selected
  • ADC_Channel_16: ADC Channel16 selected
  • ADC_Channel_17: ADC Channel17 selected
Rank,:The rank in the injected group sequencer. This parameter must be between 1 and 4.
ADC_SampleTime,:The sample time value to be set for the selected channel. This parameter can be one of the following values:
  • ADC_SampleTime_1Cycles5: Sample time equal to 1.5 cycles
  • ADC_SampleTime_7Cycles5: Sample time equal to 7.5 cycles
  • ADC_SampleTime_13Cycles5: Sample time equal to 13.5 cycles
  • ADC_SampleTime_28Cycles5: Sample time equal to 28.5 cycles
  • ADC_SampleTime_41Cycles5: Sample time equal to 41.5 cycles
  • ADC_SampleTime_55Cycles5: Sample time equal to 55.5 cycles
  • ADC_SampleTime_71Cycles5: Sample time equal to 71.5 cycles
  • ADC_SampleTime_239Cycles5: Sample time equal to 239.5 cycles
Return values
None
void ADC_InjectedDiscModeCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the discontinuous mode for injected group channel for the specified ADC.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC discontinuous mode on injected group channel. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_InjectedSequencerLengthConfig ( ADC_TypeDef *  ADCx,
uint8_t  Length 
)

Configures the sequencer length for injected channels.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Length,:The sequencer length. This parameter must be a number between 1 to 4.
Return values
None
void ADC_ITConfig ( ADC_TypeDef *  ADCx,
uint16_t  ADC_IT,
FunctionalState  NewState 
)

Enables or disables the specified ADC interrupts.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
  • ADC_IT_EOC: End of conversion interrupt mask
  • ADC_IT_AWD: Analog watchdog interrupt mask
  • ADC_IT_JEOC: End of injected conversion interrupt mask
NewState,:new state of the specified ADC interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_RegularChannelConfig ( ADC_TypeDef *  ADCx,
uint8_t  ADC_Channel,
uint8_t  Rank,
uint8_t  ADC_SampleTime 
)

Configures for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_Channel,:the ADC channel to configure. This parameter can be one of the following values:
  • ADC_Channel_0: ADC Channel0 selected
  • ADC_Channel_1: ADC Channel1 selected
  • ADC_Channel_2: ADC Channel2 selected
  • ADC_Channel_3: ADC Channel3 selected
  • ADC_Channel_4: ADC Channel4 selected
  • ADC_Channel_5: ADC Channel5 selected
  • ADC_Channel_6: ADC Channel6 selected
  • ADC_Channel_7: ADC Channel7 selected
  • ADC_Channel_8: ADC Channel8 selected
  • ADC_Channel_9: ADC Channel9 selected
  • ADC_Channel_10: ADC Channel10 selected
  • ADC_Channel_11: ADC Channel11 selected
  • ADC_Channel_12: ADC Channel12 selected
  • ADC_Channel_13: ADC Channel13 selected
  • ADC_Channel_14: ADC Channel14 selected
  • ADC_Channel_15: ADC Channel15 selected
  • ADC_Channel_16: ADC Channel16 selected
  • ADC_Channel_17: ADC Channel17 selected
Rank,:The rank in the regular group sequencer. This parameter must be between 1 to 16.
ADC_SampleTime,:The sample time value to be set for the selected channel. This parameter can be one of the following values:
  • ADC_SampleTime_1Cycles5: Sample time equal to 1.5 cycles
  • ADC_SampleTime_7Cycles5: Sample time equal to 7.5 cycles
  • ADC_SampleTime_13Cycles5: Sample time equal to 13.5 cycles
  • ADC_SampleTime_28Cycles5: Sample time equal to 28.5 cycles
  • ADC_SampleTime_41Cycles5: Sample time equal to 41.5 cycles
  • ADC_SampleTime_55Cycles5: Sample time equal to 55.5 cycles
  • ADC_SampleTime_71Cycles5: Sample time equal to 71.5 cycles
  • ADC_SampleTime_239Cycles5: Sample time equal to 239.5 cycles
Return values
None
void ADC_ResetCalibration ( ADC_TypeDef *  ADCx)

Resets the selected ADC calibration registers.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
None
void ADC_SetInjectedOffset ( ADC_TypeDef *  ADCx,
uint8_t  ADC_InjectedChannel,
uint16_t  ADC_Offset 
)

Set the injected channels conversion value offset.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
ADC_InjectedChannel,:the ADC injected channel to set its offset. This parameter can be one of the following values:
  • ADC_InjectedChannel_1: Injected Channel1 selected
  • ADC_InjectedChannel_2: Injected Channel2 selected
  • ADC_InjectedChannel_3: Injected Channel3 selected
  • ADC_InjectedChannel_4: Injected Channel4 selected
ADC_Offset,:the offset value for the selected ADC injected channel This parameter must be a 12bit value.
Return values
None
void ADC_SoftwareStartConv ( ADC_TypeDef *  ADCx)

Enables or disables the selected ADC software start conversion .

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
None
void ADC_SoftwareStartInjectedConvCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the selected ADC start of the injected channels conversion.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
NewState,:new state of the selected ADC software start injected conversion. This parameter can be: ENABLE or DISABLE.
Return values
None
void ADC_StartCalibration ( ADC_TypeDef *  ADCx)

Starts the selected ADC calibration process.

Parameters
ADCx,:where x can be 1 to select the ADC peripheral.
Return values
None
void ADC_StructInit ( ADC_InitTypeDef ADC_InitStruct)

Fills each ADC_InitStruct member with its default value.

Parameters
ADC_InitStruct: pointer to an ADC_InitTypeDef structure which will be initialized.
Return values
None
void ADC_TempSensorVrefintCmd ( FunctionalState  NewState)

Enables or disables the temperature sensor and Vrefint channel.

Parameters
NewState,:new state of the temperature sensor. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_ARRPreloadConfig ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Enables or disables TIMx peripheral Preload register on ARR.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
NewState,:new state of the TIMx peripheral Preload register This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_BDTRConfig ( TIM_TypeDef *  TIMx,
TIM_BDTRInitTypeDef TIM_BDTRInitStruct 
)

Configures the: Break feature, dead time, Lock level, the OSSI, the OSSR State and the AOE(automatic output enable).

Parameters
TIMx,:where x can be 15, 16 or 17 to select the TIM
TIM_BDTRInitStruct,:pointer to a TIM_BDTRInitTypeDef structure that contains the BDTR Register configuration information for the TIM peripheral.
Return values
None
void TIM_BDTRStructInit ( TIM_BDTRInitTypeDef TIM_BDTRInitStruct)

Fills each TIM_BDTRInitStruct member with its default value.

Parameters
TIM_BDTRInitStruct,:pointer to a TIM_BDTRInitTypeDef structure which will be initialized.
Return values
None
void TIM_CCPreloadControl ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Sets or Resets the TIM peripheral Capture Compare Preload Control bit.

Parameters
TIMx,:where x can be 2, 3 or 15 to select the TIMx peripheral
NewState,:new state of the Capture Compare Preload Control bit This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_CCxCmd ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint16_t  TIM_CCx 
)

Enables or disables the TIM Capture Compare Channel x.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parameter can be one of the following values:
  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
  • TIM_Channel_4: TIM Channel 4
TIM_CCx,:specifies the TIM Channel CCxE bit new state. This parameter can be: TIM_CCx_Enable or TIM_CCx_Disable.
Return values
None
void TIM_CCxNCmd ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint16_t  TIM_CCxN 
)

Enables or disables the TIM Capture Compare Channel xN.

Parameters
TIMx,:where x can be 15, 16 or 17 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parmeter can be one of the following values:
  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
TIM_CCxN,:specifies the TIM Channel CCxNE bit new state. This parameter can be: TIM_CCxN_Enable or TIM_CCxN_Disable.
Return values
None
void TIM_ClearFlag ( TIM_TypeDef *  TIMx,
uint16_t  TIM_FLAG 
)

Clears the TIMx's pending flags.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIM peripheral.
TIM_FLAG,:specifies the flag bit to clear. This parameter can be any combination of the following values:
  • TIM_FLAG_Update: TIM update Flag
  • TIM_FLAG_CC1: TIM Capture Compare 1 Flag
  • TIM_FLAG_CC2: TIM Capture Compare 2 Flag
  • TIM_FLAG_CC3: TIM Capture Compare 3 Flag
  • TIM_FLAG_CC4: TIM Capture Compare 4 Flag
  • TIM_FLAG_COM: TIM Commutation Flag
  • TIM_FLAG_Trigger: TIM Trigger Flag
  • TIM_FLAG_Break: TIM Break Flag
  • TIM_FLAG_CC1OF: TIM Capture Compare 1 overcapture Flag
  • TIM_FLAG_CC2OF: TIM Capture Compare 2 overcapture Flag
  • TIM_FLAG_CC3OF: TIM Capture Compare 3 overcapture Flag
  • TIM_FLAG_CC4OF: TIM Capture Compare 4 overcapture Flag
Note
TIM6can have only one update flag.
TIM15can have only TIM_FLAG_Update, TIM_FLAG_CC1,TIM_FLAG_CC2 or TIM_FLAG_Trigger.
TIM14, TIM16 and TIM17 can have TIM_FLAG_Update or TIM_FLAG_CC1.
TIM_FLAG_Break is used only with TIM15.
TIM_FLAG_COM is used only with TIM15, TIM16 and TIM17.
Return values
None
void TIM_ClearITPendingBit ( TIM_TypeDef *  TIMx,
uint16_t  TIM_IT 
)

Clears the TIMx's interrupt pending bits.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIM peripheral.
TIM_IT,:specifies the pending bit to clear. This parameter can be any combination of the following values:
  • TIM_IT_Update: TIM1 update Interrupt source
  • TIM_IT_CC1: TIM Capture Compare 1 Interrupt source
  • TIM_IT_CC2: TIM Capture Compare 2 Interrupt source
  • TIM_IT_CC3: TIM Capture Compare 3 Interrupt source
  • TIM_IT_CC4: TIM Capture Compare 4 Interrupt source
  • TIM_IT_COM: TIM Commutation Interrupt source
  • TIM_IT_Trigger: TIM Trigger Interrupt source
  • TIM_IT_Break: TIM Break Interrupt source
Note
TIM6 can generate only an update interrupt.
TIM15 can have only TIM_IT_Update, TIM_IT_CC1, TIM_IT_CC2 or TIM_IT_Trigger.
TIM14, TIM16 and TIM17 can have TIM_IT_Update or TIM_IT_CC1.
TIM_IT_Break is used only with TIM15.
TIM_IT_COM is used only with TIM15, TIM16 and TIM17.
Return values
None
void TIM_ClearOC1Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF1 signal on an external event.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:
  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values
None
void TIM_ClearOC2Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF2 signal on an external event.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit.
     This parameter can be one of the following values:
  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values
None
void TIM_ClearOC3Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF3 signal on an external event.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:
  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values
None
void TIM_ClearOC4Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF4 signal on an external event.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:
  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values
None
void TIM_Cmd ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Enables or disables the specified TIM peripheral.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIMx peripheral.
NewState,:new state of the TIMx peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_CounterModeConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_CounterMode 
)

Specifies the TIMx Counter Mode to be used.

Parameters
TIMx,:where x can be 2, 3, 4, 5, or 19 to select the TIM peripheral.
TIM_CounterMode,:specifies the Counter Mode to be used This parameter can be one of the following values:
  • TIM_CounterMode_Up: TIM Up Counting Mode
  • TIM_CounterMode_Down: TIM Down Counting Mode
  • TIM_CounterMode_CenterAligned1: TIM Center Aligned Mode1
  • TIM_CounterMode_CenterAligned2: TIM Center Aligned Mode2
  • TIM_CounterMode_CenterAligned3: TIM Center Aligned Mode3
Return values
None
void TIM_CtrlPWMOutputs ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Enables or disables the TIM peripheral Main Outputs.

Parameters
TIMx,:where x can be 15, 16 or 17 to select the TIMx peripheral.
NewState,:new state of the TIM peripheral Main Outputs. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_DeInit ( TIM_TypeDef *  TIMx)

Deinitializes the TIMx peripheral registers to their default reset values.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Return values
None
void TIM_DMACmd ( TIM_TypeDef *  TIMx,
uint16_t  TIM_DMASource,
FunctionalState  NewState 
)

Enables or disables the TIMx's DMA Requests.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 15, 16, 17, 18 and 19 to select the TIM peripheral.
TIM_DMASource,:specifies the DMA Request sources. This parameter can be any combination of the following values:
  • TIM_DMA_Update: TIM update Interrupt source
  • TIM_DMA_CC1: TIM Capture Compare 1 DMA source
  • TIM_DMA_CC2: TIM Capture Compare 2 DMA source
  • TIM_DMA_CC3: TIM Capture Compare 3 DMA source
  • TIM_DMA_CC4: TIM Capture Compare 4 DMA source
  • TIM_DMA_COM: TIM Commutation DMA source
  • TIM_DMA_Trigger: TIM Trigger DMA source
NewState,:new state of the DMA Request sources. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_DMAConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_DMABase,
uint16_t  TIM_DMABurstLength 
)

Configures the TIMx's DMA interface.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_DMABase,:DMA Base address. This parameter can be one of the following values:
  • TIM_DMABase_CR1
  • TIM_DMABase_CR2
  • TIM_DMABase_SMCR
  • TIM_DMABase_DIER
  • TIM_DMABase_SR
  • TIM_DMABase_EGR
  • TIM_DMABase_CCMR1
  • TIM_DMABase_CCMR2
  • TIM_DMABase_CCER
  • TIM_DMABase_CNT
  • TIM_DMABase_PSC
  • TIM_DMABase_ARR
  • TIM_DMABase_CCR1
  • TIM_DMABase_CCR2
  • TIM_DMABase_CCR3
  • TIM_DMABase_CCR4
  • TIM_DMABase_DCR
  • TIM_DMABase_OR
TIM_DMABurstLength,:DMA Burst length. This parameter can be one value between: TIM_DMABurstLength_1Transfer and TIM_DMABurstLength_18Transfers.
Return values
None
void TIM_EncoderInterfaceConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_EncoderMode,
uint16_t  TIM_IC1Polarity,
uint16_t  TIM_IC2Polarity 
)

Configures the TIMx Encoder Interface.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 15 and 19 to select the TIM peripheral.
TIM_EncoderMode,:specifies the TIMx Encoder Mode. This parameter can be one of the following values:
  • TIM_EncoderMode_TI1: Counter counts on TI1FP1 edge depending on TI2FP2 level.
  • TIM_EncoderMode_TI2: Counter counts on TI2FP2 edge depending on TI1FP1 level.
  • TIM_EncoderMode_TI12: Counter counts on both TI1FP1 and TI2FP2 edges depending on the level of the other input.
TIM_IC1Polarity,:specifies the IC1 Polarity This parmeter can be one of the following values:
  • TIM_ICPolarity_Falling: IC Falling edge.
  • TIM_ICPolarity_Rising: IC Rising edge.
TIM_IC2Polarity,:specifies the IC2 Polarity This parmeter can be one of the following values:
  • TIM_ICPolarity_Falling: IC Falling edge.
  • TIM_ICPolarity_Rising: IC Rising edge.
Return values
None
void TIM_ETRClockMode1Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ExtTRGPrescaler,
uint16_t  TIM_ExtTRGPolarity,
uint16_t  ExtTRGFilter 
)

Configures the External clock Mode1.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_ExtTRGPrescaler,:The external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ExtTRGPSC_OFF: ETRP Prescaler OFF.
  • TIM_ExtTRGPSC_DIV2: ETRP frequency divided by 2.
  • TIM_ExtTRGPSC_DIV4: ETRP frequency divided by 4.
  • TIM_ExtTRGPSC_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarity,:The external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ExtTRGPolarity_Inverted: active low or falling edge active.
  • TIM_ExtTRGPolarity_NonInverted: active high or rising edge active.
ExtTRGFilter,:External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None
void TIM_ETRClockMode2Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ExtTRGPrescaler,
uint16_t  TIM_ExtTRGPolarity,
uint16_t  ExtTRGFilter 
)

Configures the External clock Mode2.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_ExtTRGPrescaler,:The external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ExtTRGPSC_OFF: ETRP Prescaler OFF.
  • TIM_ExtTRGPSC_DIV2: ETRP frequency divided by 2.
  • TIM_ExtTRGPSC_DIV4: ETRP frequency divided by 4.
  • TIM_ExtTRGPSC_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarity,:The external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ExtTRGPolarity_Inverted: active low or falling edge active.
  • TIM_ExtTRGPolarity_NonInverted: active high or rising edge active.
ExtTRGFilter,:External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None
void TIM_ETRConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ExtTRGPrescaler,
uint16_t  TIM_ExtTRGPolarity,
uint16_t  ExtTRGFilter 
)

Configures the TIMx External Trigger (ETR).

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_ExtTRGPrescaler,:The external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ExtTRGPSC_OFF: ETRP Prescaler OFF.
  • TIM_ExtTRGPSC_DIV2: ETRP frequency divided by 2.
  • TIM_ExtTRGPSC_DIV4: ETRP frequency divided by 4.
  • TIM_ExtTRGPSC_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarity,:The external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ExtTRGPolarity_Inverted: active low or falling edge active.
  • TIM_ExtTRGPolarity_NonInverted: active high or rising edge active.
ExtTRGFilter,:External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None
void TIM_ForcedOC1Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 1 waveform to active or inactive level.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 or 19 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:
  • TIM_ForcedAction_Active: Force active level on OC1REF
  • TIM_ForcedAction_InActive: Force inactive level on OC1REF.
Return values
None
void TIM_ForcedOC2Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 2 waveform to active or inactive level.

Parameters
TIMx,:where x can be2, 3, 4, 5, 12, 15 or 19 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:
  • TIM_ForcedAction_Active: Force active level on OC2REF
  • TIM_ForcedAction_InActive: Force inactive level on OC2REF.
Return values
None
void TIM_ForcedOC3Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 3 waveform to active or inactive level.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:
  • TIM_ForcedAction_Active: Force active level on OC3REF
  • TIM_ForcedAction_InActive: Force inactive level on OC3REF.
Return values
None
void TIM_ForcedOC4Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 4 waveform to active or inactive level.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:
  • TIM_ForcedAction_Active: Force active level on OC4REF
  • TIM_ForcedAction_InActive: Force inactive level on OC4REF.
Return values
None
void TIM_GenerateEvent ( TIM_TypeDef *  TIMx,
uint16_t  TIM_EventSource 
)

Configures the TIMx event to be generate by software.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIM peripheral.
TIM_EventSource,:specifies the event source. This parameter can be one or more of the following values:
  • TIM_EventSource_Update: Timer update Event source
  • TIM_EventSource_CC1: Timer Capture Compare 1 Event source
  • TIM_EventSource_CC2: Timer Capture Compare 2 Event source
  • TIM_EventSource_CC3: Timer Capture Compare 3 Event source
  • TIM_EventSource_CC4: Timer Capture Compare 4 Event source
  • TIM_EventSource_COM: Timer COM event source
  • TIM_EventSource_Trigger: Timer Trigger Event source
  • TIM_EventSource_Break: Timer Break event source
Note
TIM6 can only generate an update event.
TIM9 can only generate an update event, Capture Compare 1 event, Capture Compare 2 event and TIM_EventSource_Trigger.
TIM_EventSource_COM and TIM_EventSource_Break are used only with TIM15,TIM16 and TIM17.
Return values
None
uint32_t TIM_GetCapture1 ( TIM_TypeDef *  TIMx)

Gets the TIMx Input Capture 1 value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
Return values
CaptureCompare 1 Register value.
uint32_t TIM_GetCapture2 ( TIM_TypeDef *  TIMx)

Gets the TIMx Input Capture 2 value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
Return values
CaptureCompare 2 Register value.
uint32_t TIM_GetCapture3 ( TIM_TypeDef *  TIMx)

Gets the TIMx Input Capture 3 value.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
Return values
CaptureCompare 3 Register value.
uint32_t TIM_GetCapture4 ( TIM_TypeDef *  TIMx)

Gets the TIMx Input Capture 4 value.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
Return values
CaptureCompare 4 Register value.
uint32_t TIM_GetCounter ( TIM_TypeDef *  TIMx)

Gets the TIMx Counter value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Return values
CounterRegister value.
FlagStatus TIM_GetFlagStatus ( TIM_TypeDef *  TIMx,
uint16_t  TIM_FLAG 
)

Checks whether the specified TIM flag is set or not.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIM peripheral.
TIM_FLAG,:specifies the flag to check. This parameter can be one of the following values:
  • TIM_FLAG_Update: TIM update Flag
  • TIM_FLAG_CC1: TIM Capture Compare 1 Flag
  • TIM_FLAG_CC2: TIM Capture Compare 2 Flag
  • TIM_FLAG_CC3: TIM Capture Compare 3 Flag
  • TIM_FLAG_CC4: TIM Capture Compare 4 Flag
  • TIM_FLAG_COM: TIM Commutation Flag
  • TIM_FLAG_Trigger: TIM Trigger Flag
  • TIM_FLAG_Break: TIM Break Flag
  • TIM_FLAG_CC1OF: TIM Capture Compare 1 overcapture Flag
  • TIM_FLAG_CC2OF: TIM Capture Compare 2 overcapture Flag
  • TIM_FLAG_CC3OF: TIM Capture Compare 3 overcapture Flag
  • TIM_FLAG_CC4OF: TIM Capture Compare 4 overcapture Flag
Note
TIM6 can have only one update flag.
TIM15 can have only TIM_FLAG_Update, TIM_FLAG_CC1, TIM_FLAG_CC2 or TIM_FLAG_Trigger.
TIM14, TIM16 and TIM17 can have TIM_FLAG_Update or TIM_FLAG_CC1.
TIM_FLAG_Break is used only with TIM15.
TIM_FLAG_COM is used only with TIM15, TIM16 and TIM17.
Return values
Thenew state of TIM_FLAG (SET or RESET).
ITStatus TIM_GetITStatus ( TIM_TypeDef *  TIMx,
uint16_t  TIM_IT 
)

Checks whether the TIM interrupt has occurred or not.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIM peripheral.
TIM_IT,:specifies the TIM interrupt source to check. This parameter can be one of the following values:
  • TIM_IT_Update: TIM update Interrupt source
  • TIM_IT_CC1: TIM Capture Compare 1 Interrupt source
  • TIM_IT_CC2: TIM Capture Compare 2 Interrupt source
  • TIM_IT_CC3: TIM Capture Compare 3 Interrupt source
  • TIM_IT_CC4: TIM Capture Compare 4 Interrupt source
  • TIM_IT_COM: TIM Commutation Interrupt source
  • TIM_IT_Trigger: TIM Trigger Interrupt source
  • TIM_IT_Break: TIM Break Interrupt source
Note
TIM6 can generate only an update interrupt.
TIM15 can have only TIM_IT_Update, TIM_IT_CC1, TIM_IT_CC2 or TIM_IT_Trigger.
TIM14, TIM16 and TIM17 can have TIM_IT_Update or TIM_IT_CC1.
TIM_IT_Break is used only with TIM15.
TIM_IT_COM is used only with TIM15, TIM16 and TIM17.
Return values
Thenew state of the TIM_IT(SET or RESET).
uint16_t TIM_GetPrescaler ( TIM_TypeDef *  TIMx)

Gets the TIMx Prescaler value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Return values
PrescalerRegister value.
void TIM_ICInit ( TIM_TypeDef *  TIMx,
TIM_ICInitTypeDef TIM_ICInitStruct 
)

Initializes the TIM peripheral according to the specified parameters in the TIM_ICInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 15 and 19 to select the TIM peripheral.
TIM_ICInitStruct,:pointer to a TIM_ICInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_ICStructInit ( TIM_ICInitTypeDef TIM_ICInitStruct)

Fills each TIM_ICInitStruct member with its default value.

Parameters
TIM_ICInitStruct,:pointer to a TIM_ICInitTypeDef structure which will be initialized.
Return values
None
void TIM_InternalClockConfig ( TIM_TypeDef *  TIMx)

Configures the TIMx internal Clock.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
Return values
None
void TIM_ITConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_IT,
FunctionalState  NewState 
)

Enables or disables the specified TIM interrupts.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, or 19 to select the TIMx peripheral.
TIM_IT,:specifies the TIM interrupts sources to be enabled or disabled. This parameter can be any combination of the following values:
  • TIM_IT_Update: TIM update Interrupt source
  • TIM_IT_CC1: TIM Capture Compare 1 Interrupt source
  • TIM_IT_CC2: TIM Capture Compare 2 Interrupt source
  • TIM_IT_CC3: TIM Capture Compare 3 Interrupt source
  • TIM_IT_CC4: TIM Capture Compare 4 Interrupt source
  • TIM_IT_COM: TIM Commutation Interrupt source
  • TIM_IT_Trigger: TIM Trigger Interrupt source
  • TIM_IT_Break: TIM Break Interrupt source
Note
TIM6 can only generate an update interrupt.
TIM15 can have only TIM_IT_Update, TIM_IT_CC1, TIM_IT_CC2 or TIM_IT_Trigger.
TIM14, TIM16 and TIM17 can have TIM_IT_Update or TIM_IT_CC1.
TIM_IT_Break is used only with TIM15.
TIM_IT_COM is used only with TIM15, TIM16 and TIM17.
Parameters
NewState,:new state of the TIM interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_ITRxExternalClockConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_InputTriggerSource 
)

Configures the TIMx Internal Trigger as External Clock.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_ITRSource,:Trigger source. This parameter can be one of the following values:
  • TIM_TS_ITR0: Internal Trigger 0
  • TIM_TS_ITR1: Internal Trigger 1
  • TIM_TS_ITR2: Internal Trigger 2
  • TIM_TS_ITR3: Internal Trigger 3
Return values
None
void TIM_OC1FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 1 Fast feature.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 or 19 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:
  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values
None
void TIM_OC1Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef TIM_OCInitStruct 
)

Initializes the TIMx Channel1 according to the specified parameters in the TIM_OCInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_OC1NPolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCNPolarity 
)

Configures the TIMx Channel 1N polarity.

Parameters
TIMx,:where x can be 15, 16 or 17 to select the TIM peripheral.
TIM_OCNPolarity,:specifies the OC1N Polarity This parmeter can be one of the following values:
  • TIM_OCNPolarity_High: Output Compare active high
  • TIM_OCNPolarity_Low: Output Compare active low
Return values
None
void TIM_OC1PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 1 polarity.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC1 Polarity This parmeter can be one of the following values:
  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values
None
void TIM_OC1PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR1.

Parameters
TIMx,:where x can be 1, 2, 3, 14, 15, 16 and 17 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:
  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values
None
void TIM_OC2FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 2 Fast feature.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 or 19 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:
  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values
None
void TIM_OC2Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef TIM_OCInitStruct 
)

Initializes the TIMx Channel2 according to the specified parameters in the TIM_OCInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 or 19 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_OC2PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 2 polarity.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC2 Polarity This parmeter can be one of the following values:
  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values
None
void TIM_OC2PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR2.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:
  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values
None
void TIM_OC3FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 3 Fast feature.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:
  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values
None
void TIM_OC3Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef TIM_OCInitStruct 
)

Initializes the TIMx Channel3 according to the specified parameters in the TIM_OCInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_OC3PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 3 polarity.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC3 Polarity This parmeter can be one of the following values:
  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values
None
void TIM_OC3PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR3.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:
  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values
None
void TIM_OC4FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 4 Fast feature.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:
  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values
None
void TIM_OC4Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef TIM_OCInitStruct 
)

Initializes the TIMx Channel4 according to the specified parameters in the TIM_OCInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_OC4PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 4 polarity.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC4 Polarity This parmeter can be one of the following values:
  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values
None
void TIM_OC4PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR4.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:
  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values
None
void TIM_OCStructInit ( TIM_OCInitTypeDef TIM_OCInitStruct)

Fills each TIM_OCInitStruct member with its default value.

Parameters
TIM_OCInitStruct: pointer to a TIM_OCInitTypeDef structure which will be initialized.
Return values
None
void TIM_PrescalerConfig ( TIM_TypeDef *  TIMx,
uint16_t  Prescaler,
uint16_t  TIM_PSCReloadMode 
)

Configures the TIMx Prescaler.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Prescaler,:specifies the Prescaler Register value
TIM_PSCReloadMode,:specifies the TIM Prescaler Reload mode This parameter can be one of the following values:
  • TIM_PSCReloadMode_Update: The Prescaler is loaded at the update event.
  • TIM_PSCReloadMode_Immediate: The Prescaler is loaded immediatly.
Return values
None
void TIM_PWMIConfig ( TIM_TypeDef *  TIMx,
TIM_ICInitTypeDef TIM_ICInitStruct 
)

Configures the TIM peripheral according to the specified parameters in the TIM_ICInitStruct to measure an external PWM signal.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_ICInitStruct,:pointer to a TIM_ICInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_RemapConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Remap 
)

Configures the TIM14 Remapping input Capabilities.

Parameters
TIMx,:where x can be 14 to select the TIM peripheral.
TIM_Remap,:specifies the TIM input reampping source. This parameter can be one of the following values:
  • TIM14_GPIO: TIM14 Channel 1 is connected to GPIO.
  • TIM14_RTC_CLK: TIM14 Channel 1 is connected to RTC input clock. RTC input clock can be LSE, LSI or HSE/div128.
  • TIM14_HSE_DIV32: TIM14 Channel 1 is connected to HSE/32 clock.
  • TIM14_MCO: TIM14 Channel 1 is connected to MCO clock. MCO clock can be LSI, LSE, SYSCLK, HSI, HSE or PLL/2.
Return values
None
void TIM_SelectCCDMA ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Selects the TIMx peripheral Capture Compare DMA source.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 15, 16, 17 or 19 to select the TIM peripheral.
NewState,:new state of the Capture Compare DMA source This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_SelectCOM ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Selects the TIM peripheral Commutation event.

Parameters
TIMx,:where x can be 15, 16 or 17 to select the TIMx peripheral
NewState,:new state of the Commutation event. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_SelectHallSensor ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Enables or disables the TIMx's Hall sensor interface.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
NewState,:new state of the TIMx Hall sensor interface. This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_SelectInputTrigger ( TIM_TypeDef *  TIMx,
uint16_t  TIM_InputTriggerSource 
)

Selects the Input Trigger source.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_InputTriggerSource,:The Input Trigger source. This parameter can be one of the following values:
  • TIM_TS_ITR0: Internal Trigger 0
  • TIM_TS_ITR1: Internal Trigger 1
  • TIM_TS_ITR2: Internal Trigger 2
  • TIM_TS_ITR3: Internal Trigger 3
  • TIM_TS_TI1F_ED: TI1 Edge Detector
  • TIM_TS_TI1FP1: Filtered Timer Input 1
  • TIM_TS_TI2FP2: Filtered Timer Input 2
  • TIM_TS_ETRF: External Trigger input
Return values
None
void TIM_SelectMasterSlaveMode ( TIM_TypeDef *  TIMx,
uint16_t  TIM_MasterSlaveMode 
)

Sets or Resets the TIMx Master/Slave Mode.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_MasterSlaveMode,:specifies the Timer Master Slave Mode. This parameter can be one of the following values:
  • TIM_MasterSlaveMode_Enable: synchronization between the current timer and its slaves (through TRGO).
  • TIM_MasterSlaveMode_Disable: No action
Return values
None
void TIM_SelectOCREFClear ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCReferenceClear 
)

Selects the OCReference Clear source.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_OCReferenceClear,:specifies the OCReference Clear source. This parameter can be one of the following values:
  • TIM_OCReferenceClear_ETRF: The internal OCreference clear input is connected to ETRF.
  • TIM_OCReferenceClear_OCREFCLR: The internal OCreference clear input is connected to OCREF_CLR input.
Return values
None
void TIM_SelectOCxM ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint16_t  TIM_OCMode 
)

Selects the TIM Output Compare Mode.

Note
This function disables the selected channel before changing the Output Compare Mode. User has to enable this channel using TIM_CCxCmd and TIM_CCxNCmd functions.
Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 or 19 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parameter can be one of the following values:
  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
  • TIM_Channel_4: TIM Channel 4
TIM_OCMode,:specifies the TIM Output Compare Mode. This parameter can be one of the following values:
  • TIM_OCMode_Timing
  • TIM_OCMode_Active
  • TIM_OCMode_Toggle
  • TIM_OCMode_PWM1
  • TIM_OCMode_PWM2
  • TIM_ForcedAction_Active
  • TIM_ForcedAction_InActive
Return values
None
void TIM_SelectOnePulseMode ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OPMode 
)

Selects the TIMx's One Pulse Mode.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
TIM_OPMode,:specifies the OPM Mode to be used. This parameter can be one of the following values:
  • TIM_OPMode_Single
  • TIM_OPMode_Repetitive
Return values
None
void TIM_SelectOutputTrigger ( TIM_TypeDef *  TIMx,
uint16_t  TIM_TRGOSource 
)

Selects the TIMx Trigger Output Mode.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 15, 18 and 19 to select the TIM peripheral.
TIM_TRGOSource,:specifies the Trigger Output source. This parameter can be one of the following values:
  • For all TIMx
    • TIM_TRGOSource_Reset: The UG bit in the TIM_EGR register is used as the trigger output (TRGO).
    • TIM_TRGOSource_Enable: The Counter Enable CEN is used as the trigger output (TRGO).
    • TIM_TRGOSource_Update: The update event is selected as the trigger output (TRGO).
  • For all TIMx except TIM6
    • TIM_TRGOSource_OC1: The trigger output sends a positive pulse when the CC1IF flag is to be set, as soon as a capture or compare match occurs (TRGO).
    • TIM_TRGOSource_OC1Ref: OC1REF signal is used as the trigger output (TRGO).
    • TIM_TRGOSource_OC2Ref: OC2REF signal is used as the trigger output (TRGO).
    • TIM_TRGOSource_OC3Ref: OC3REF signal is used as the trigger output (TRGO).
    • TIM_TRGOSource_OC4Ref: OC4REF signal is used as the trigger output (TRGO).
    Return values
    None
void TIM_SelectSlaveMode ( TIM_TypeDef *  TIMx,
uint16_t  TIM_SlaveMode 
)

Selects the TIMx Slave Mode.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_SlaveMode,:specifies the Timer Slave Mode. This parameter can be one of the following values:
  • TIM_SlaveMode_Reset: Rising edge of the selected trigger signal (TRGI) re-initializes the counter and triggers an update of the registers.
  • TIM_SlaveMode_Gated: The counter clock is enabled when the trigger signal (TRGI) is high.
  • TIM_SlaveMode_Trigger: The counter starts at a rising edge of the trigger TRGI.
  • TIM_SlaveMode_External1: Rising edges of the selected trigger (TRGI) clock the counter.
Return values
None
void TIM_SetAutoreload ( TIM_TypeDef *  TIMx,
uint32_t  Autoreload 
)

Sets the TIMx Autoreload Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Autoreload,:specifies the Autoreload register new value.
Return values
None
void TIM_SetClockDivision ( TIM_TypeDef *  TIMx,
uint16_t  TIM_CKD 
)

Sets the TIMx Clock Division value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_CKD,:specifies the clock division value. This parameter can be one of the following value:
  • TIM_CKD_DIV1: TDTS = Tck_tim
  • TIM_CKD_DIV2: TDTS = 2*Tck_tim
  • TIM_CKD_DIV4: TDTS = 4*Tck_tim
Return values
None
void TIM_SetCompare1 ( TIM_TypeDef *  TIMx,
uint32_t  Compare1 
)

Sets the TIMx Capture Compare1 Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 or 19 to select the TIM peripheral.
Compare1,:specifies the Capture Compare1 register new value.
Return values
None
void TIM_SetCompare2 ( TIM_TypeDef *  TIMx,
uint32_t  Compare2 
)

Sets the TIMx Capture Compare2 Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 or 19 to select the TIM peripheral.
Compare2,:specifies the Capture Compare2 register new value.
Return values
None
void TIM_SetCompare3 ( TIM_TypeDef *  TIMx,
uint32_t  Compare3 
)

Sets the TIMx Capture Compare3 Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5 or 19 to select the TIM peripheral.
Compare3,:specifies the Capture Compare3 register new value.
Return values
None
void TIM_SetCompare4 ( TIM_TypeDef *  TIMx,
uint32_t  Compare4 
)

Sets the TIMx Capture Compare4 Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
Compare4,:specifies the Capture Compare4 register new value.
Return values
None
void TIM_SetCounter ( TIM_TypeDef *  TIMx,
uint32_t  Counter 
)

Sets the TIMx Counter Register value.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
Counter,:specifies the Counter register new value.
Return values
None
void TIM_SetIC1Prescaler ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ICPSC 
)

Sets the TIMx Input Capture 1 prescaler.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 13, 14, 15, 16, 17 and 19 to select the TIM peripheral.
TIM_ICPSC,:specifies the Input Capture1 prescaler new value. This parameter can be one of the following values:
  • TIM_ICPSC_DIV1: no prescaler
  • TIM_ICPSC_DIV2: capture is done once every 2 events
  • TIM_ICPSC_DIV4: capture is done once every 4 events
  • TIM_ICPSC_DIV8: capture is done once every 8 events
Return values
None
void TIM_SetIC2Prescaler ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ICPSC 
)

Sets the TIMx Input Capture 2 prescaler.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_ICPSC,:specifies the Input Capture2 prescaler new value. This parameter can be one of the following values:
  • TIM_ICPSC_DIV1: no prescaler
  • TIM_ICPSC_DIV2: capture is done once every 2 events
  • TIM_ICPSC_DIV4: capture is done once every 4 events
  • TIM_ICPSC_DIV8: capture is done once every 8 events
Return values
None
void TIM_SetIC3Prescaler ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ICPSC 
)

Sets the TIMx Input Capture 3 prescaler.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_ICPSC,:specifies the Input Capture3 prescaler new value. This parameter can be one of the following values:
  • TIM_ICPSC_DIV1: no prescaler
  • TIM_ICPSC_DIV2: capture is done once every 2 events
  • TIM_ICPSC_DIV4: capture is done once every 4 events
  • TIM_ICPSC_DIV8: capture is done once every 8 events
Return values
None
void TIM_SetIC4Prescaler ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ICPSC 
)

Sets the TIMx Input Capture 4 prescaler.

Parameters
TIMx,:where x can be 2, 3, 4, 5 and 19 to select the TIM peripheral.
TIM_ICPSC,:specifies the Input Capture4 prescaler new value. This parameter can be one of the following values:
  • TIM_ICPSC_DIV1: no prescaler
  • TIM_ICPSC_DIV2: capture is done once every 2 events
  • TIM_ICPSC_DIV4: capture is done once every 4 events
  • TIM_ICPSC_DIV8: capture is done once every 8 events
Return values
None
void TIM_TimeBaseInit ( TIM_TypeDef *  TIMx,
TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStruct 
)

Initializes the TIMx Time Base Unit peripheral according to the specified parameters in the TIM_TimeBaseInitStruct.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
TIM_TimeBaseInitStruct,:pointer to a TIM_TimeBaseInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values
None
void TIM_TimeBaseStructInit ( TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStruct)

Fills each TIM_TimeBaseInitStruct member with its default value.

Parameters
TIM_TimeBaseInitStruct,:pointer to a TIM_TimeBaseInitTypeDef structure which will be initialized.
Return values
None
void TIM_TIxExternalClockConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_TIxExternalCLKSource,
uint16_t  TIM_ICPolarity,
uint16_t  ICFilter 
)

Configures the TIMx Trigger as External Clock.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 12, 15 and 19 to select the TIM peripheral.
TIM_TIxExternalCLKSource,:Trigger source. This parameter can be one of the following values:
  • TIM_TIxExternalCLK1Source_TI1ED: TI1 Edge Detector
  • TIM_TIxExternalCLK1Source_TI1: Filtered Timer Input 1
  • TIM_TIxExternalCLK1Source_TI2: Filtered Timer Input 2
TIM_ICPolarity,:specifies the TIx Polarity. This parameter can be one of the following values:
  • TIM_ICPolarity_Rising
  • TIM_ICPolarity_Falling
ICFilter,:specifies the filter value. This parameter must be a value between 0x0 and 0xF.
Return values
None
void TIM_UpdateDisableConfig ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Enables or Disables the TIMx Update event.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
NewState,:new state of the TIMx UDIS bit This parameter can be: ENABLE or DISABLE.
Return values
None
void TIM_UpdateRequestConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_UpdateSource 
)

Configures the TIMx Update Request Interrupt source.

Parameters
TIMx,:where x can be 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18 and 19 to select the TIM peripheral.
TIM_UpdateSource,:specifies the Update source. This parameter can be one of the following values:
  • TIM_UpdateSource_Regular: Source of update is the counter overflow/underflow or the setting of UG bit, or an update generation through the slave mode controller.
  • TIM_UpdateSource_Global: Source of update is counter overflow/underflow.
Return values
None