STM32F4xx_HAL_Driver  1.8.3
Counter clock selection
+ Collaboration diagram for Counter clock selection:

Functions

__STATIC_INLINE void LL_TIM_EnableExternalClock (TIM_TypeDef *TIMx)
 Enable external clock mode 2. More...
 
__STATIC_INLINE void LL_TIM_DisableExternalClock (TIM_TypeDef *TIMx)
 Disable external clock mode 2. More...
 
__STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock (const TIM_TypeDef *TIMx)
 Indicate whether external clock mode 2 is enabled. More...
 
__STATIC_INLINE void LL_TIM_SetClockSource (TIM_TypeDef *TIMx, uint32_t ClockSource)
 Set the clock source of the counter clock. More...
 
__STATIC_INLINE void LL_TIM_SetEncoderMode (TIM_TypeDef *TIMx, uint32_t EncoderMode)
 Set the encoder interface mode. More...
 

Detailed Description

Function Documentation

◆ LL_TIM_DisableExternalClock()

__STATIC_INLINE void LL_TIM_DisableExternalClock ( TIM_TypeDef *  TIMx)

Disable external clock mode 2.

Note
Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check whether or not a timer instance supports external clock mode2. @rmtoll SMCR ECE LL_TIM_DisableExternalClock
Parameters
TIMxTimer instance
Return values
None

Definition at line 2657 of file stm32f4xx_ll_tim.h.

◆ LL_TIM_EnableExternalClock()

__STATIC_INLINE void LL_TIM_EnableExternalClock ( TIM_TypeDef *  TIMx)

Enable external clock mode 2.

Note
When external clock mode 2 is enabled the counter is clocked by any active edge on the ETRF signal.
Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check whether or not a timer instance supports external clock mode2. @rmtoll SMCR ECE LL_TIM_EnableExternalClock
Parameters
TIMxTimer instance
Return values
None

Definition at line 2644 of file stm32f4xx_ll_tim.h.

◆ LL_TIM_IsEnabledExternalClock()

__STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock ( const TIM_TypeDef *  TIMx)

Indicate whether external clock mode 2 is enabled.

Note
Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check whether or not a timer instance supports external clock mode2. @rmtoll SMCR ECE LL_TIM_IsEnabledExternalClock
Parameters
TIMxTimer instance
Return values
Stateof bit (1 or 0).

Definition at line 2670 of file stm32f4xx_ll_tim.h.

◆ LL_TIM_SetClockSource()

__STATIC_INLINE void LL_TIM_SetClockSource ( TIM_TypeDef *  TIMx,
uint32_t  ClockSource 
)

Set the clock source of the counter clock.

Note
when selected clock source is external clock mode 1, the timer input the external clock is applied is selected by calling the LL_TIM_SetTriggerInput() function. This timer input must be configured by calling the LL_TIM_IC_Config() function.
Macro IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(TIMx) can be used to check whether or not a timer instance supports external clock mode1.
Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check whether or not a timer instance supports external clock mode2. @rmtoll SMCR SMS LL_TIM_SetClockSource
SMCR ECE LL_TIM_SetClockSource
Parameters
TIMxTimer instance
ClockSourceThis parameter can be one of the following values:
  • LL_TIM_CLOCKSOURCE_INTERNAL
  • LL_TIM_CLOCKSOURCE_EXT_MODE1
  • LL_TIM_CLOCKSOURCE_EXT_MODE2
Return values
None

Definition at line 2694 of file stm32f4xx_ll_tim.h.

◆ LL_TIM_SetEncoderMode()

__STATIC_INLINE void LL_TIM_SetEncoderMode ( TIM_TypeDef *  TIMx,
uint32_t  EncoderMode 
)

Set the encoder interface mode.

Note
Macro IS_TIM_ENCODER_INTERFACE_INSTANCE(TIMx) can be used to check whether or not a timer instance supports the encoder mode. @rmtoll SMCR SMS LL_TIM_SetEncoderMode
Parameters
TIMxTimer instance
EncoderModeThis parameter can be one of the following values:
  • LL_TIM_ENCODERMODE_X2_TI1
  • LL_TIM_ENCODERMODE_X2_TI2
  • LL_TIM_ENCODERMODE_X4_TI12
Return values
None

Definition at line 2711 of file stm32f4xx_ll_tim.h.