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.
Fork of TUKS-COURSE-TIMER by
Counter clock selection
[TIM Exported Functions]
Functions | |
__STATIC_INLINE void | LL_TIM_EnableExternalClock (TIM_TypeDef *TIMx) |
Enable external clock mode 2. | |
__STATIC_INLINE void | LL_TIM_DisableExternalClock (TIM_TypeDef *TIMx) |
Disable external clock mode 2. | |
__STATIC_INLINE uint32_t | LL_TIM_IsEnabledExternalClock (TIM_TypeDef *TIMx) |
Indicate whether external clock mode 2 is enabled. | |
__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_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. SMCR ECE LL_TIM_DisableExternalClock
- Parameters:
-
TIMx Timer instance
- Return values:
-
None
Definition at line 3026 of file stm32l4xx_ll_tim.h.
__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. SMCR ECE LL_TIM_EnableExternalClock
- Parameters:
-
TIMx Timer instance
- Return values:
-
None
Definition at line 3013 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock | ( | 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. SMCR ECE LL_TIM_IsEnabledExternalClock
- Parameters:
-
TIMx Timer instance
- Return values:
-
State of bit (1 or 0).
Definition at line 3039 of file stm32l4xx_ll_tim.h.
__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. SMCR SMS LL_TIM_SetClockSource
SMCR ECE LL_TIM_SetClockSource
- Parameters:
-
TIMx Timer instance ClockSource This 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 3063 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:
-
TIMx Timer instance EncoderMode This 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 3080 of file stm32l4xx_ll_tim.h.
Generated on Tue Jul 12 2022 17:38:59 by
