Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Modules | |
Time Base functions | |
Time Base functions. | |
Time Output Compare functions | |
Time Output Compare functions. | |
Time PWM functions | |
Time PWM functions. | |
Time Input Capture functions | |
Time Input Capture functions. | |
Time One Pulse functions | |
Time One Pulse functions. | |
Time Encoder functions | |
Time Encoder functions. | |
TIM IRQ handler management | |
IRQ handler management. | |
Peripheral Control functions | |
Peripheral Control functions. | |
TIM Callbacks functions | |
TIM Callbacks functions. | |
Peripheral State functions | |
Peripheral State functions. | |
Functions | |
void | TIM_DMAError (DMA_HandleTypeDef *hdma) |
TIM DMA error callback. | |
void | TIM_DMADelayPulseCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Delay Pulse complete callback. | |
void | TIM_DMACaptureCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Capture complete callback. | |
void | TIM_Base_SetConfig (TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure) |
Time Base configuration. | |
void | TIM_OC2_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Time Ouput Compare 2 configuration. | |
void | TIM_TI1_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter) |
Configure the TI1 as Input. | |
void | TIM_ETR_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler, uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter) |
Configures the TIMx External Trigger (ETR). | |
void | TIM_CCxChannelCmd (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState) |
Enables or disables the TIM Capture Compare Channel x. | |
static void | TIM_DMAPeriodElapsedCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Period Elapse complete callback. | |
static void | TIM_DMATriggerCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Trigger callback. | |
static void | TIM_OC1_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Time Ouput Compare 1 configuration. | |
static void | TIM_OC3_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Time Ouput Compare 3 configuration. | |
static void | TIM_OC4_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Time Ouput Compare 4 configuration. | |
static void | TIM_OC5_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Timer Ouput Compare 5 configuration. | |
static void | TIM_OC6_SetConfig (TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config) |
Timer Ouput Compare 6 configuration. | |
static void | TIM_TI1_ConfigInputStage (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) |
Configure the Polarity and Filter for TI1. | |
static void | TIM_TI2_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter) |
Configure the TI2 as Input. | |
static void | TIM_TI2_ConfigInputStage (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) |
Configure the Polarity and Filter for TI2. | |
static void | TIM_TI3_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter) |
Configure the TI3 as Input. | |
static void | TIM_TI4_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter) |
Configure the TI4 as Input. | |
static void | TIM_ITRx_SetConfig (TIM_TypeDef *TIMx, uint16_t InputTriggerSource) |
Selects the Input Trigger source. |
Function Documentation
void TIM_Base_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_Base_InitTypeDef * | Structure | ||
) |
Time Base configuration.
- Parameters:
-
TIMx,: TIM peripheral Structure,: TIM Base configuration structure
- Return values:
-
None
Definition at line 4714 of file stm32l4xx_hal_tim.c.
void TIM_CCxChannelCmd | ( | TIM_TypeDef * | TIMx, |
uint32_t | Channel, | ||
uint32_t | ChannelState | ||
) |
Enables or disables the TIM Capture Compare Channel x.
- Parameters:
-
TIMx to select the TIM peripheral 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
ChannelState,: specifies the TIM Channel CCxE bit new state. This parameter can be: TIM_CCx_ENABLE or TIM_CCx_Disable.
- Return values:
-
None
Definition at line 5610 of file stm32l4xx_hal_tim.c.
void TIM_DMACaptureCplt | ( | DMA_HandleTypeDef * | hdma ) |
TIM DMA Capture complete callback.
- Parameters:
-
hdma : pointer to DMA handle.
- Return values:
-
None
Definition at line 4652 of file stm32l4xx_hal_tim.c.
void TIM_DMADelayPulseCplt | ( | DMA_HandleTypeDef * | hdma ) |
TIM DMA Delay Pulse complete callback.
- Parameters:
-
hdma : pointer to DMA handle.
- Return values:
-
None
Definition at line 4620 of file stm32l4xx_hal_tim.c.
void TIM_DMAError | ( | DMA_HandleTypeDef * | hdma ) |
TIM DMA error callback.
- Parameters:
-
hdma : pointer to DMA handle.
- Return values:
-
None
Definition at line 4606 of file stm32l4xx_hal_tim.c.
static void TIM_DMAPeriodElapsedCplt | ( | DMA_HandleTypeDef * | hdma ) | [static] |
TIM DMA Period Elapse complete callback.
- Parameters:
-
hdma : pointer to DMA handle.
- Return values:
-
None
Definition at line 4685 of file stm32l4xx_hal_tim.c.
static void TIM_DMATriggerCplt | ( | DMA_HandleTypeDef * | hdma ) | [static] |
TIM DMA Trigger callback.
- Parameters:
-
hdma : pointer to DMA handle.
- Return values:
-
None
Definition at line 4699 of file stm32l4xx_hal_tim.c.
void TIM_ETR_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ExtTRGPrescaler, | ||
uint32_t | TIM_ExtTRGPolarity, | ||
uint32_t | ExtTRGFilter | ||
) |
Configures the TIMx External Trigger (ETR).
- Parameters:
-
TIMx to select the TIM peripheral TIM_ExtTRGPrescaler,: The external Trigger Prescaler. This parameter can be one of the following values: - TIM_ETRPRESCALER_DIV1 : ETRP Prescaler OFF.
- TIM_ETRPRESCALER_DIV2 : ETRP frequency divided by 2.
- TIM_ETRPRESCALER_DIV4 : ETRP frequency divided by 4.
- TIM_ETRPRESCALER_DIV8 : ETRP frequency divided by 8.
TIM_ExtTRGPolarity,: The external Trigger Polarity. This parameter can be one of the following values: - TIM_ETRPOLARITY_INVERTED : active low or falling edge active.
- TIM_ETRPOLARITY_NONINVERTED : active high or rising edge active.
ExtTRGFilter,: External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
- Return values:
-
None
Definition at line 5580 of file stm32l4xx_hal_tim.c.
static void TIM_ITRx_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint16_t | InputTriggerSource | ||
) | [static] |
Selects the Input Trigger source.
- Parameters:
-
TIMx to select the TIM peripheral 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
Definition at line 5550 of file stm32l4xx_hal_tim.c.
static void TIM_OC1_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) | [static] |
Time Ouput Compare 1 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 4759 of file stm32l4xx_hal_tim.c.
void TIM_OC2_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) |
Time Ouput Compare 2 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 4833 of file stm32l4xx_hal_tim.c.
static void TIM_OC3_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) | [static] |
Time Ouput Compare 3 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 4909 of file stm32l4xx_hal_tim.c.
static void TIM_OC4_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) | [static] |
Time Ouput Compare 4 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 4983 of file stm32l4xx_hal_tim.c.
static void TIM_OC5_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) | [static] |
Timer Ouput Compare 5 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 5041 of file stm32l4xx_hal_tim.c.
static void TIM_OC6_SetConfig | ( | TIM_TypeDef * | TIMx, |
TIM_OC_InitTypeDef * | OC_Config | ||
) | [static] |
Timer Ouput Compare 6 configuration.
- Parameters:
-
TIMx to select the TIM peripheral OC_Config,: The ouput configuration structure
- Return values:
-
None
Definition at line 5094 of file stm32l4xx_hal_tim.c.
static void TIM_TI1_ConfigInputStage | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICFilter | ||
) | [static] |
Configure the Polarity and Filter for TI1.
- Parameters:
-
TIMx to select the TIM peripheral. TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Return values:
-
None
Definition at line 5333 of file stm32l4xx_hal_tim.c.
void TIM_TI1_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICSelection, | ||
uint32_t | TIM_ICFilter | ||
) |
Configure the TI1 as Input.
- Parameters:
-
TIMx to select the TIM peripheral. TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICSelection,: specifies the input to be used. This parameter can be one of the following values: - TIM_ICSelection_DirectTI: TIM Input 1 is selected to be connected to IC1.
- TIM_ICSelection_IndirectTI: TIM Input 1 is selected to be connected to IC2.
- TIM_ICSelection_TRC: TIM Input 1 is selected to be connected to TRC.
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Return values:
-
None
- Note:
- TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI2FP1 (on channel2 path) is used as the input signal. Therefore CCMR1 must be protected against un-initialized filter and polarity values.
Definition at line 5286 of file stm32l4xx_hal_tim.c.
static void TIM_TI2_ConfigInputStage | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICFilter | ||
) | [static] |
Configure the Polarity and Filter for TI2.
- Parameters:
-
TIMx to select the TIM peripheral. TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Return values:
-
None
Definition at line 5416 of file stm32l4xx_hal_tim.c.
static void TIM_TI2_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICSelection, | ||
uint32_t | TIM_ICFilter | ||
) | [static] |
Configure the TI2 as Input.
- Parameters:
-
TIMx to select the TIM peripheral TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICSelection,: specifies the input to be used. This parameter can be one of the following values: - TIM_ICSelection_DirectTI: TIM Input 2 is selected to be connected to IC2.
- TIM_ICSelection_IndirectTI: TIM Input 2 is selected to be connected to IC1.
- TIM_ICSelection_TRC: TIM Input 2 is selected to be connected to TRC.
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Return values:
-
None
- Note:
- TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI1FP2 (on channel1 path) is used as the input signal. Therefore CCMR1 must be protected against un-initialized filter and polarity values.
Definition at line 5376 of file stm32l4xx_hal_tim.c.
static void TIM_TI3_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICSelection, | ||
uint32_t | TIM_ICFilter | ||
) | [static] |
Configure the TI3 as Input.
- Parameters:
-
TIMx to select the TIM peripheral TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICSelection,: specifies the input to be used. This parameter can be one of the following values: - TIM_ICSelection_DirectTI: TIM Input 3 is selected to be connected to IC3.
- TIM_ICSelection_IndirectTI: TIM Input 3 is selected to be connected to IC4.
- TIM_ICSelection_TRC: TIM Input 3 is selected to be connected to TRC.
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Return values:
-
None
- Note:
- TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI3FP4 (on channel1 path) is used as the input signal. Therefore CCMR2 must be protected against un-initialized filter and polarity values.
Definition at line 5459 of file stm32l4xx_hal_tim.c.
static void TIM_TI4_SetConfig | ( | TIM_TypeDef * | TIMx, |
uint32_t | TIM_ICPolarity, | ||
uint32_t | TIM_ICSelection, | ||
uint32_t | TIM_ICFilter | ||
) | [static] |
Configure the TI4 as Input.
- Parameters:
-
TIMx to select the TIM peripheral TIM_ICPolarity : The Input Polarity. This parameter can be one of the following values: - TIM_ICPolarity_Rising
- TIM_ICPolarity_Falling
- TIM_ICPolarity_BothEdge
TIM_ICSelection,: specifies the input to be used. This parameter can be one of the following values: - TIM_ICSelection_DirectTI: TIM Input 4 is selected to be connected to IC4.
- TIM_ICSelection_IndirectTI: TIM Input 4 is selected to be connected to IC3.
- TIM_ICSelection_TRC: TIM Input 4 is selected to be connected to TRC.
TIM_ICFilter,: Specifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
- Note:
- TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI4FP3 (on channel1 path) is used as the input signal. Therefore CCMR2 must be protected against un-initialized filter and polarity values.
- Return values:
-
None
Definition at line 5507 of file stm32l4xx_hal_tim.c.
Generated on Tue Jul 12 2022 11:00:05 by
