Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

Counter clock selection

Counter clock selection
[TIM Exported Functions]

Functions

__STATIC_INLINE void LL_TIM_SetClockSource (TIM_TypeDef *TIMx, uint32_t ClockSource)
 Set the clock source of the counter clock.
__STATIC_INLINE void LL_TIM_SetEncoderMode (TIM_TypeDef *TIMx, uint32_t EncoderMode)
 Set the encoder interface mode.

Function Documentation

__STATIC_INLINE void LL_TIM_SetClockSource ( TIM_TypeDef *  TIMx,
uint32_t  ClockSource 
)

Set the clock source of the counter clock.

@ 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.

Note:
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. 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 2689 of file stm32l4xx_ll_tim.h.

__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. 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 2706 of file stm32l4xx_ll_tim.h.