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.
Synchronization management functions
[TIM_Private_Functions]
Synchronization management functions. More...
Functions | |
| void | TIM_SelectInputTrigger_mort (TIM_TypeDef_mort *TIMx, uint16_t TIM_InputTriggerSource) |
| Selects the Input Trigger source. | |
| void | TIM_SelectOutputTrigger_mort (TIM_TypeDef_mort *TIMx, uint16_t TIM_TRGOSource) |
| Selects the TIMx Trigger Output Mode. | |
| void | TIM_SelectSlaveMode_mort (TIM_TypeDef_mort *TIMx, uint16_t TIM_SlaveMode) |
| Selects the TIMx Slave Mode. | |
| void | TIM_SelectMasterSlaveMode_mort (TIM_TypeDef_mort *TIMx, uint16_t TIM_MasterSlaveMode) |
| Sets or Resets the TIMx Master/Slave Mode. | |
| void | TIM_ETRConfig_mort (TIM_TypeDef_mort *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter) |
| Configures the TIMx External Trigger (ETR). | |
Detailed Description
Synchronization management functions.
===============================================================================
##### Synchronization management functions #####
===============================================================================
##### TIM Driver: how to use it in synchronization Mode #####
===============================================================================
[..]
*** Case of two/several Timers ***
==================================
[..]
(#) Configure the Master Timers using the following functions:
(++) void TIM_SelectOutputTrigger_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_TRGOSource);
(++) void TIM_SelectMasterSlaveMode_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_MasterSlaveMode);
(#) Configure the Slave Timers using the following functions:
(++) void TIM_SelectInputTrigger_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_InputTriggerSource);
(++) void TIM_SelectSlaveMode_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_SlaveMode);
*** Case of Timers and external trigger(ETR pin) ***
====================================================
[..]
(#) Configure the External trigger using this function:
(++) void TIM_ETRConfig_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity,
uint16_t ExtTRGFilter);
(#) Configure the Slave Timers using the following functions:
(++) void TIM_SelectInputTrigger_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_InputTriggerSource);
(++) void TIM_SelectSlaveMode_mort(TIM_TypeDef_mort* TIMx, uint16_t TIM_SlaveMode);
Function Documentation
| void TIM_ETRConfig_mort | ( | TIM_TypeDef_mort * | TIMx, |
| uint16_t | TIM_ExtTRGPrescaler, | ||
| uint16_t | TIM_ExtTRGPolarity, | ||
| uint16_t | ExtTRGFilter | ||
| ) |
Configures the TIMx External Trigger (ETR).
- Parameters:
-
TIMx,: where x can be 1, 2, 3, 4, 5 or 8 to select the TIM peripheral. TIM_ExtTRGPrescaler,: The external Trigger Prescaler. This parameter can be one of the following values: - TIM_ExtTRGPSC_OFF_MORT: ETRP Prescaler OFF.
- TIM_ExtTRGPSC_DIV2_MORT: ETRP frequency divided by 2.
- TIM_ExtTRGPSC_DIV4_MORT: ETRP frequency divided by 4.
- TIM_ExtTRGPSC_DIV8_MORT: ETRP frequency divided by 8.
TIM_ExtTRGPolarity,: The external Trigger Polarity. This parameter can be one of the following values: - TIM_ExtTRGPolarity_Inverted_MORT: active low or falling edge active.
- TIM_ExtTRGPolarity_NonInverted_MORT: active high or rising edge active.
ExtTRGFilter,: External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
- Return values:
-
None
Definition at line 3012 of file stm32f4xx_tim_mort.c.
| void TIM_SelectInputTrigger_mort | ( | TIM_TypeDef_mort * | TIMx, |
| uint16_t | TIM_InputTriggerSource | ||
| ) |
Selects the Input Trigger source.
- Parameters:
-
TIMx,: where x can be 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13 or 14 to select the TIM peripheral. TIM_InputTriggerSource,: The Input Trigger source. This parameter can be one of the following values: - TIM_TS_ITR0_MORT: Internal Trigger 0
- TIM_TS_ITR1_MORT: Internal Trigger 1
- TIM_TS_ITR2_MORT: Internal Trigger 2
- TIM_TS_ITR3_MORT: Internal Trigger 3
- TIM_TS_TI1F_ED_MORT: TI1 Edge Detector
- TIM_TS_TI1FP1_MORT: Filtered Timer Input 1
- TIM_TS_TI2FP2_MORT: Filtered Timer Input 2
- TIM_TS_ETRF_MORT: External Trigger input
- Return values:
-
None
Definition at line 2892 of file stm32f4xx_tim_mort.c.
| void TIM_SelectMasterSlaveMode_mort | ( | TIM_TypeDef_mort * | TIMx, |
| uint16_t | TIM_MasterSlaveMode | ||
| ) |
Sets or Resets the TIMx Master/Slave Mode.
- Parameters:
-
TIMx,: where x can be 1, 2, 3, 4, 5, 8, 9 or 12 to select the TIM peripheral. TIM_MasterSlaveMode,: specifies the Timer Master Slave Mode. This parameter can be one of the following values: - TIM_MasterSlaveMode_Enable_MORT: synchronization between the current timer and its slaves (through TRGO)
- TIM_MasterSlaveMode_Disable_MORT: No action
- Return values:
-
None
Definition at line 2982 of file stm32f4xx_tim_mort.c.
| void TIM_SelectOutputTrigger_mort | ( | TIM_TypeDef_mort * | TIMx, |
| uint16_t | TIM_TRGOSource | ||
| ) |
Selects the TIMx Trigger Output Mode.
- Parameters:
-
TIMx,: where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the TIM peripheral. TIM_TRGOSource,: specifies the Trigger Output source. This parameter can be one of the following values:
- For all TIMx
- TIM_TRGOSource_Reset_MORT: The UG bit in the TIM_EGR register is used as the trigger output(TRGO)
- TIM_TRGOSource_Enable_MORT: The Counter Enable CEN is used as the trigger output(TRGO)
- TIM_TRGOSource_Update_MORT: The update event is selected as the trigger output(TRGO)
- For all TIMx except TIM6_MORT and TIM7_MORT
- TIM_TRGOSource_OC1_MORT: The trigger output sends a positive pulse when the CC1IF flag is to be set, as soon as a capture or compare match occurs(TRGO)
- TIM_TRGOSource_OC1Ref_MORT: OC1REF signal is used as the trigger output(TRGO)
- TIM_TRGOSource_OC2Ref_MORT: OC2REF signal is used as the trigger output(TRGO)
- TIM_TRGOSource_OC3Ref_MORT: OC3REF signal is used as the trigger output(TRGO)
- TIM_TRGOSource_OC4Ref_MORT: OC4REF signal is used as the trigger output(TRGO)
- Return values:
-
None
Definition at line 2935 of file stm32f4xx_tim_mort.c.
| void TIM_SelectSlaveMode_mort | ( | TIM_TypeDef_mort * | TIMx, |
| uint16_t | TIM_SlaveMode | ||
| ) |
Selects the TIMx Slave Mode.
- Parameters:
-
TIMx,: where x can be 1, 2, 3, 4, 5, 8, 9 or 12 to select the TIM peripheral. TIM_SlaveMode,: specifies the Timer Slave Mode. This parameter can be one of the following values: - TIM_SlaveMode_Reset_MORT: Rising edge of the selected trigger signal(TRGI) reinitialize the counter and triggers an update of the registers
- TIM_SlaveMode_Gated_MORT: The counter clock is enabled when the trigger signal (TRGI) is high
- TIM_SlaveMode_Trigger_MORT: The counter starts at a rising edge of the trigger TRGI
- TIM_SlaveMode_External1_MORT: Rising edges of the selected trigger (TRGI) clock the counter
- Return values:
-
None
Definition at line 2959 of file stm32f4xx_tim_mort.c.
Generated on Sat Oct 21 2023 04:38:55 by
1.7.2