|
STM8L15x Standard Peripherals Drivers
|
Synchronization management functions. More...
Functions | |
| void | TIM2_ETRConfig (TIM2_ExtTRGPSC_TypeDef TIM2_ExtTRGPrescaler, TIM2_ExtTRGPolarity_TypeDef TIM2_ExtTRGPolarity, uint8_t ExtTRGFilter) |
| Configures the TIM2 External Trigger. | |
| void | TIM2_SelectInputTrigger (TIM2_TRGSelection_TypeDef TIM2_InputTriggerSource) |
| Selects the TIM2 Input Trigger source. | |
| void | TIM2_SelectMasterSlaveMode (FunctionalState NewState) |
| Sets or Resets the TIM2 Master/Slave Mode. | |
| void | TIM2_SelectOutputTrigger (TIM2_TRGOSource_TypeDef TIM2_TRGOSource) |
| Selects the TIM2 Trigger Output Mode. | |
| void | TIM2_SelectSlaveMode (TIM2_SlaveMode_TypeDef TIM2_SlaveMode) |
| Selects the TIM2 Slave Mode. | |
Detailed Description
Synchronization management functions.
===============================================================================
Synchronization management functions
===============================================================================
===================================================================
TIM2 Driver: how to use it in synchronization Mode
===================================================================
Case of two/several Timers
**************************
1. If TIM2 is used as master to other timers use the following functions:
- TIM2_SelectOutputTrigger()
- TIM2_SelectMasterSlaveMode()
2. If TIM2 is used as slave to other timers use the following functions:
- TIM2_SelectInputTrigger()
- TIM2_SelectSlaveMode()
Case of Timers and external trigger (TRIG pin)
********************************************
1. Configure the External trigger using TIM2_ETRConfig()
2. Configure the Slave Timer using the following functions:
- TIM2_SelectInputTrigger()
- TIM2_SelectSlaveMode()
Function Documentation
| void TIM2_ETRConfig | ( | TIM2_ExtTRGPSC_TypeDef | TIM2_ExtTRGPrescaler, |
| TIM2_ExtTRGPolarity_TypeDef | TIM2_ExtTRGPolarity, | ||
| uint8_t | ExtTRGFilter | ||
| ) |
Configures the TIM2 External Trigger.
Definition at line 1905 of file stm8l15x_tim2.c.
References IS_TIM2_EXT_FILTER, IS_TIM2_EXT_POLARITY, IS_TIM2_EXT_PRESCALER, and TIM2.
Referenced by TIM2_ETRClockMode1Config(), and TIM2_ETRClockMode2Config().
| void TIM2_SelectInputTrigger | ( | TIM2_TRGSelection_TypeDef | TIM2_InputTriggerSource | ) |
Selects the TIM2 Input Trigger source.
Definition at line 1793 of file stm8l15x_tim2.c.
References IS_TIM2_TRIGGER_SELECTION, TIM2, and TIM_SMCR_TS.
Referenced by TIM2_TIxExternalClockConfig().
| void TIM2_SelectMasterSlaveMode | ( | FunctionalState | NewState | ) |
Sets or Resets the TIM2 Master/Slave Mode.
Definition at line 1873 of file stm8l15x_tim2.c.
References DISABLE, IS_FUNCTIONAL_STATE, TIM2, and TIM_SMCR_MSM.
| void TIM2_SelectOutputTrigger | ( | TIM2_TRGOSource_TypeDef | TIM2_TRGOSource | ) |
Selects the TIM2 Trigger Output Mode.
Definition at line 1821 of file stm8l15x_tim2.c.
References IS_TIM2_TRGO_SOURCE, TIM2, and TIM_CR2_MMS.
| void TIM2_SelectSlaveMode | ( | TIM2_SlaveMode_TypeDef | TIM2_SlaveMode | ) |
Selects the TIM2 Slave Mode.
Definition at line 1849 of file stm8l15x_tim2.c.
References IS_TIM2_SLAVE_MODE, TIM2, and TIM_SMCR_SMS.