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
Timer synchronisation configuration
[TIM Exported Functions]
Functions | |
__STATIC_INLINE void | LL_TIM_SetTriggerOutput (TIM_TypeDef *TIMx, uint32_t TimerSynchronization) |
Set the trigger output (TRGO) used for timer synchronization . | |
__STATIC_INLINE void | LL_TIM_SetTriggerOutput2 (TIM_TypeDef *TIMx, uint32_t ADCSynchronization) |
Set the trigger output 2 (TRGO2) used for ADC synchronization . | |
__STATIC_INLINE void | LL_TIM_SetSlaveMode (TIM_TypeDef *TIMx, uint32_t SlaveMode) |
Set the synchronization mode of a slave timer. | |
__STATIC_INLINE void | LL_TIM_SetTriggerInput (TIM_TypeDef *TIMx, uint32_t TriggerInput) |
Set the selects the trigger input to be used to synchronize the counter. | |
__STATIC_INLINE void | LL_TIM_EnableMasterSlaveMode (TIM_TypeDef *TIMx) |
Enable the Master/Slave mode. | |
__STATIC_INLINE void | LL_TIM_DisableMasterSlaveMode (TIM_TypeDef *TIMx) |
Disable the Master/Slave mode. | |
__STATIC_INLINE uint32_t | LL_TIM_IsEnabledMasterSlaveMode (TIM_TypeDef *TIMx) |
Indicates whether the Master/Slave mode is enabled. | |
__STATIC_INLINE void | LL_TIM_ConfigETR (TIM_TypeDef *TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler, uint32_t ETRFilter) |
Configure the external trigger (ETR) input. | |
__STATIC_INLINE void | LL_TIM_SetETRSource (TIM_TypeDef *TIMx, uint32_t ETRSource) |
Select the external trigger (ETR) input source. |
Function Documentation
__STATIC_INLINE void LL_TIM_ConfigETR | ( | TIM_TypeDef * | TIMx, |
uint32_t | ETRPolarity, | ||
uint32_t | ETRPrescaler, | ||
uint32_t | ETRFilter | ||
) |
Configure the external trigger (ETR) input.
- Note:
- Macro IS_TIM_ETR_INSTANCE(TIMx) can be used to check whether or not a timer instance provides an external trigger input. SMCR ETP LL_TIM_ConfigETR
SMCR ETPS LL_TIM_ConfigETR
SMCR ETF LL_TIM_ConfigETR
- Parameters:
-
TIMx Timer instance ETRPolarity This parameter can be one of the following values: - LL_TIM_ETR_POLARITY_NONINVERTED
- LL_TIM_ETR_POLARITY_INVERTED
ETRPrescaler This parameter can be one of the following values: - LL_TIM_ETR_PRESCALER_DIV1
- LL_TIM_ETR_PRESCALER_DIV2
- LL_TIM_ETR_PRESCALER_DIV4
- LL_TIM_ETR_PRESCALER_DIV8
ETRFilter This parameter can be one of the following values: - LL_TIM_ETR_FILTER_FDIV1
- LL_TIM_ETR_FILTER_FDIV1_N2
- LL_TIM_ETR_FILTER_FDIV1_N4
- LL_TIM_ETR_FILTER_FDIV1_N8
- LL_TIM_ETR_FILTER_FDIV2_N6
- LL_TIM_ETR_FILTER_FDIV2_N8
- LL_TIM_ETR_FILTER_FDIV4_N6
- LL_TIM_ETR_FILTER_FDIV4_N8
- LL_TIM_ETR_FILTER_FDIV8_N6
- LL_TIM_ETR_FILTER_FDIV8_N8
- LL_TIM_ETR_FILTER_FDIV16_N5
- LL_TIM_ETR_FILTER_FDIV16_N6
- LL_TIM_ETR_FILTER_FDIV16_N8
- LL_TIM_ETR_FILTER_FDIV32_N5
- LL_TIM_ETR_FILTER_FDIV32_N6
- LL_TIM_ETR_FILTER_FDIV32_N8
- Return values:
-
None
Definition at line 3259 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_DisableMasterSlaveMode | ( | TIM_TypeDef * | TIMx ) |
Disable the Master/Slave mode.
- Note:
- Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR MSM LL_TIM_DisableMasterSlaveMode
- Parameters:
-
TIMx Timer instance
- Return values:
-
None
Definition at line 3206 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_EnableMasterSlaveMode | ( | TIM_TypeDef * | TIMx ) |
Enable the Master/Slave mode.
- Note:
- Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR MSM LL_TIM_EnableMasterSlaveMode
- Parameters:
-
TIMx Timer instance
- Return values:
-
None
Definition at line 3193 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE uint32_t LL_TIM_IsEnabledMasterSlaveMode | ( | TIM_TypeDef * | TIMx ) |
Indicates whether the Master/Slave mode is enabled.
- Note:
- Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR MSM LL_TIM_IsEnabledMasterSlaveMode
- Parameters:
-
TIMx Timer instance
- Return values:
-
State of bit (1 or 0).
Definition at line 3219 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_SetETRSource | ( | TIM_TypeDef * | TIMx, |
uint32_t | ETRSource | ||
) |
Select the external trigger (ETR) input source.
- Note:
- Macro IS_TIM_ETRSEL_INSTANCE(TIMx) can be used to check whether or not a timer instance supports ETR source selection. OR2 ETRSEL LL_TIM_SetETRSource
- Parameters:
-
TIMx Timer instance ETRSource This parameter can be one of the following values: - LL_TIM_ETRSOURCE_LEGACY
- LL_TIM_ETRSOURCE_COMP1
- LL_TIM_ETRSOURCE_COMP2
- Return values:
-
None
Definition at line 3276 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_SetSlaveMode | ( | TIM_TypeDef * | TIMx, |
uint32_t | SlaveMode | ||
) |
Set the synchronization mode of a slave timer.
- Note:
- Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR SMS LL_TIM_SetSlaveMode
- Parameters:
-
TIMx Timer instance SlaveMode This parameter can be one of the following values: - LL_TIM_SLAVEMODE_DISABLED
- LL_TIM_SLAVEMODE_RESET
- LL_TIM_SLAVEMODE_GATED
- LL_TIM_SLAVEMODE_TRIGGER
- LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER
- Return values:
-
None
Definition at line 3158 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_SetTriggerInput | ( | TIM_TypeDef * | TIMx, |
uint32_t | TriggerInput | ||
) |
Set the selects the trigger input to be used to synchronize the counter.
- Note:
- Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR TS LL_TIM_SetTriggerInput
- Parameters:
-
TIMx Timer instance TriggerInput This parameter can be one of the following values: - LL_TIM_TS_ITR0
- LL_TIM_TS_ITR1
- LL_TIM_TS_ITR2
- LL_TIM_TS_ITR3
- LL_TIM_TS_TI1F_ED
- LL_TIM_TS_TI1FP1
- LL_TIM_TS_TI2FP2
- LL_TIM_TS_ETRF
- Return values:
-
None
Definition at line 3180 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_SetTriggerOutput | ( | TIM_TypeDef * | TIMx, |
uint32_t | TimerSynchronization | ||
) |
Set the trigger output (TRGO) used for timer synchronization .
- Note:
- Macro IS_TIM_MASTER_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a master timer. CR2 MMS LL_TIM_SetTriggerOutput
- Parameters:
-
TIMx Timer instance TimerSynchronization This parameter can be one of the following values: - LL_TIM_TRGO_RESET
- LL_TIM_TRGO_ENABLE
- LL_TIM_TRGO_UPDATE
- LL_TIM_TRGO_CC1IF
- LL_TIM_TRGO_OC1REF
- LL_TIM_TRGO_OC2REF
- LL_TIM_TRGO_OC3REF
- LL_TIM_TRGO_OC4REF
- Return values:
-
None
Definition at line 3109 of file stm32l4xx_ll_tim.h.
__STATIC_INLINE void LL_TIM_SetTriggerOutput2 | ( | TIM_TypeDef * | TIMx, |
uint32_t | ADCSynchronization | ||
) |
Set the trigger output 2 (TRGO2) used for ADC synchronization .
- Note:
- Macro IS_TIM_TRGO2_INSTANCE(TIMx) can be used to check whether or not a timer instance can be used for ADC synchronization. CR2 MMS2 LL_TIM_SetTriggerOutput2
- Parameters:
-
TIMx Timer Instance ADCSynchronization This parameter can be one of the following values: - LL_TIM_TRGO2_RESET
- LL_TIM_TRGO2_ENABLE
- LL_TIM_TRGO2_UPDATE
- LL_TIM_TRGO2_CC1F
- LL_TIM_TRGO2_OC1
- LL_TIM_TRGO2_OC2
- LL_TIM_TRGO2_OC3
- LL_TIM_TRGO2_OC4
- LL_TIM_TRGO2_OC5
- LL_TIM_TRGO2_OC6
- LL_TIM_TRGO2_OC4_RISINGFALLING
- LL_TIM_TRGO2_OC6_RISINGFALLING
- LL_TIM_TRGO2_OC4_RISING_OC6_RISING
- LL_TIM_TRGO2_OC4_RISING_OC6_FALLING
- LL_TIM_TRGO2_OC5_RISING_OC6_RISING
- LL_TIM_TRGO2_OC5_RISING_OC6_FALLING
- Return values:
-
None
Definition at line 3139 of file stm32l4xx_ll_tim.h.
Generated on Tue Jul 12 2022 17:38:59 by
