Functions

Synchronization management functions. More...

Collaboration diagram for Synchronization management functions:

Functions

void TIM_ETRConfig (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the TIMx External Trigger (ETR). More...
 
void TIM_SelectInputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_InputTriggerSource)
 Selects the Input Trigger source. More...
 
void TIM_SelectMasterSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_MasterSlaveMode)
 Sets or Resets the TIMx Master/Slave Mode. More...
 
void TIM_SelectOutputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_TRGOSource)
 Selects the TIMx Trigger Output Mode. More...
 
void TIM_SelectOutputTrigger2 (TIM_TypeDef *TIMx, uint32_t TIM_TRGO2Source)
 Selects the TIMx Trigger Output Mode2 (TRGO2). More...
 
void TIM_SelectSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_SlaveMode)
 Selects the TIMx Slave Mode. More...
 
void TIM_SelectSlaveMode (TIM_TypeDef *TIMx, uint32_t TIM_SlaveMode)
 Selects the TIMx Slave Mode. More...
 

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(TIM_TypeDef* TIMx, uint16_t TIM_TRGOSource); 
        (++) void TIM_SelectMasterSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_MasterSlaveMode);  
      (#) Configure the Slave Timers using the following functions: 
        (++) void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource);  
        (++) void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode); 
          
    *** Case of Timers and external trigger(ETR pin) ***
    ====================================================
    [..]           
      (#) Configure the External trigger using this function:
        (++) void TIM_ETRConfig(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity,
                               uint16_t ExtTRGFilter);
      (#) Configure the Slave Timers using the following functions: 
        (++) void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource);  
        (++) void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode); 
 ===============================================================================
                 ##### 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(TIM_TypeDef* TIMx, uint16_t TIM_TRGOSource); 
           (++) void TIM_SelectMasterSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_MasterSlaveMode);  
       (#) Configure the Slave Timers using the following functions: 
           (++) void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource);  
           (++) void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode); 
          
  [..] Case of Timers and external trigger(ETR pin)
           
       (#) Configure the External trigger using this function:
           (++) void TIM_ETRConfig(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity,
                                   uint16_t ExtTRGFilter);
       (#) Configure the Slave Timers using the following functions: 
           (++) void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource);  
           (++) void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode); 

Function Documentation

void TIM_ETRConfig ( TIM_TypeDef TIMx,
uint16_t  TIM_ExtTRGPrescaler,
uint16_t  TIM_ExtTRGPolarity,
uint16_t  ExtTRGFilter 
)

Configures the TIMx External Trigger (ETR).

Parameters
TIMxwhere x can be 1, 2, 3, 4, 5 or 8 to select the TIM peripheral.
TIM_ExtTRGPrescalerThe external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ExtTRGPSC_OFF: ETRP Prescaler OFF.
  • TIM_ExtTRGPSC_DIV2: ETRP frequency divided by 2.
  • TIM_ExtTRGPSC_DIV4: ETRP frequency divided by 4.
  • TIM_ExtTRGPSC_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarityThe external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ExtTRGPolarity_Inverted: active low or falling edge active.
  • TIM_ExtTRGPolarity_NonInverted: active high or rising edge active.
ExtTRGFilterExternal Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None
Parameters
TIMxwhere x can be 1, 2, 3, 4 or 8 to select the TIM peripheral.
TIM_ExtTRGPrescalerThe external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ExtTRGPSC_OFF: ETRP Prescaler OFF.
  • TIM_ExtTRGPSC_DIV2: ETRP frequency divided by 2.
  • TIM_ExtTRGPSC_DIV4: ETRP frequency divided by 4.
  • TIM_ExtTRGPSC_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarityThe external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ExtTRGPolarity_Inverted: active low or falling edge active.
  • TIM_ExtTRGPolarity_NonInverted: active high or rising edge active.
ExtTRGFilterExternal Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None

Definition at line 3012 of file stm32f4xx_tim.c.

void TIM_SelectInputTrigger ( TIM_TypeDef TIMx,
uint16_t  TIM_InputTriggerSource 
)

Selects the Input Trigger source.

Parameters
TIMxwhere x can be 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13 or 14 to select the TIM peripheral.
TIM_InputTriggerSourceThe Input Trigger source. This parameter can be one of the following values:
  • TIM_TS_ITR0: Internal Trigger 0
  • TIM_TS_ITR1: Internal Trigger 1
  • TIM_TS_ITR2: Internal Trigger 2
  • TIM_TS_ITR3: Internal Trigger 3
  • TIM_TS_TI1F_ED: TI1 Edge Detector
  • TIM_TS_TI1FP1: Filtered Timer Input 1
  • TIM_TS_TI2FP2: Filtered Timer Input 2
  • TIM_TS_ETRF: External Trigger input
Return values
None
Parameters
TIMxwhere x can be 1, 2, 3, 4, 8 or 15 to select the TIM peripheral.
TIM_InputTriggerSourceThe Input Trigger source. This parameter can be one of the following values:
  • TIM_TS_ITR0: Internal Trigger 0
  • TIM_TS_ITR1: Internal Trigger 1
  • TIM_TS_ITR2: Internal Trigger 2
  • TIM_TS_ITR3: Internal Trigger 3
  • TIM_TS_TI1F_ED: TI1 Edge Detector
  • TIM_TS_TI1FP1: Filtered Timer Input 1
  • TIM_TS_TI2FP2: Filtered Timer Input 2
  • TIM_TS_ETRF: External Trigger input
Return values
None

Definition at line 2892 of file stm32f4xx_tim.c.

void TIM_SelectMasterSlaveMode ( TIM_TypeDef TIMx,
uint16_t  TIM_MasterSlaveMode 
)

Sets or Resets the TIMx Master/Slave Mode.

Parameters
TIMxwhere x can be 1, 2, 3, 4, 5, 8, 9 or 12 to select the TIM peripheral.
TIM_MasterSlaveModespecifies the Timer Master Slave Mode. This parameter can be one of the following values:
  • TIM_MasterSlaveMode_Enable: synchronization between the current timer and its slaves (through TRGO)
  • TIM_MasterSlaveMode_Disable: No action
Return values
None
Parameters
TIMxwhere x can be 1, 2, 3, 4, 8 or 15 to select the TIM peripheral.
TIM_MasterSlaveModespecifies the Timer Master Slave Mode. This parameter can be one of the following values:
  • TIM_MasterSlaveMode_Enable: synchronization between the current timer and its slaves (through TRGO)
  • TIM_MasterSlaveMode_Disable: No action
Return values
None

Definition at line 2982 of file stm32f4xx_tim.c.

void TIM_SelectOutputTrigger ( TIM_TypeDef TIMx,
uint16_t  TIM_TRGOSource 
)

Selects the TIMx Trigger Output Mode.

Parameters
TIMxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the TIM peripheral.
TIM_TRGOSourcespecifies the Trigger Output source. This parameter can be one of the following values:
  • For all TIMx
    • TIM_TRGOSource_Reset: The UG bit in the TIM_EGR register is used as the trigger output(TRGO)
    • TIM_TRGOSource_Enable: The Counter Enable CEN is used as the trigger output(TRGO)
    • TIM_TRGOSource_Update: The update event is selected as the trigger output(TRGO)
  • For all TIMx except TIM6 and TIM7
    • TIM_TRGOSource_OC1: 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: OC1REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC2Ref: OC2REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC3Ref: OC3REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC4Ref: OC4REF signal is used as the trigger output(TRGO)
    Return values
    None
    Parameters
    TIMxwhere x can be 1, 2, 3, 4, 5, 6, 7, 8 or 15 to select the TIM peripheral.
    TIM_TRGOSourcespecifies the Trigger Output source. This parameter can be one of the following values:
  • For all TIMx
    • TIM_TRGOSource_Reset: The UG bit in the TIM_EGR register is used as the trigger output(TRGO)
    • TIM_TRGOSource_Enable: The Counter Enable CEN is used as the trigger output(TRGO)
    • TIM_TRGOSource_Update: The update event is selected as the trigger output(TRGO)
  • For all TIMx except TIM6 and TIM7
    • TIM_TRGOSource_OC1: 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: OC1REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC2Ref: OC2REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC3Ref: OC3REF signal is used as the trigger output(TRGO)
    • TIM_TRGOSource_OC4Ref: OC4REF signal is used as the trigger output(TRGO)
    Return values
    None

Definition at line 2935 of file stm32f4xx_tim.c.

void TIM_SelectOutputTrigger2 ( TIM_TypeDef TIMx,
uint32_t  TIM_TRGO2Source 
)

Selects the TIMx Trigger Output Mode2 (TRGO2).

Parameters
TIMxwhere x can be 1 or 8 to select the TIM peripheral.
TIM_TRGO2Sourcespecifies the Trigger Output source. This parameter can be one of the following values:
  • For all TIMx
    • TIM_TRGOSource_Reset: The UG bit in the TIM_EGR register is used as the trigger output(TRGO2)
    • TIM_TRGOSource_Enable: The Counter Enable CEN is used as the trigger output(TRGO2)
    • TIM_TRGOSource_Update: The update event is selected as the trigger output(TRGO2)
    • TIM_TRGOSource_OC1: The trigger output sends a positive pulse when the CC1IF flag is to be set, as soon as a capture or compare match occurs(TRGO2)
    • TIM_TRGOSource_OC1Ref: OC1REF signal is used as the trigger output(TRGO2)
    • TIM_TRGOSource_OC2Ref: OC2REF signal is used as the trigger output(TRGO2)
    • TIM_TRGOSource_OC3Ref: OC3REF signal is used as the trigger output(TRGO2)
    • TIM_TRGOSource_OC4Ref: OC4REF signal is used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC4Ref_RisingFalling: OC4Ref Rising and Falling are used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC6Ref_RisingFalling: OC6Ref Rising and Falling are used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC4RefRising_OC6RefRising: OC4Ref Rising and OC6Ref Rising are used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC4RefRising_OC6RefFalling: OC4Ref Rising and OC6Ref Falling are used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC5RefRising_OC6RefRising: OC5Ref Rising and OC6Ref Rising are used as the trigger output(TRGO2)
    • TIM_TRGO2Source_OC5RefRising_OC6RefFalling: OC5Ref Rising and OC6Ref Falling are used as the trigger output(TRGO2)
    Return values
    None

Definition at line 3557 of file stm32f30x_tim.c.

void TIM_SelectSlaveMode ( TIM_TypeDef TIMx,
uint16_t  TIM_SlaveMode 
)

Selects the TIMx Slave Mode.

Parameters
TIMxwhere x can be 1, 2, 3, 4, 5, 8, 9 or 12 to select the TIM peripheral.
TIM_SlaveModespecifies the Timer Slave Mode. This parameter can be one of the following values:
  • TIM_SlaveMode_Reset: Rising edge of the selected trigger signal(TRGI) reinitialize the counter and triggers an update of the registers
  • TIM_SlaveMode_Gated: The counter clock is enabled when the trigger signal (TRGI) is high
  • TIM_SlaveMode_Trigger: The counter starts at a rising edge of the trigger TRGI
  • TIM_SlaveMode_External1: Rising edges of the selected trigger (TRGI) clock the counter
Return values
None

Definition at line 2959 of file stm32f4xx_tim.c.

void TIM_SelectSlaveMode ( TIM_TypeDef TIMx,
uint32_t  TIM_SlaveMode 
)

Selects the TIMx Slave Mode.

Parameters
TIMxwhere x can be 1, 2, 3, 4, 8 or 15 to select the TIM peripheral.
TIM_SlaveModespecifies the Timer Slave Mode. This parameter can be one of the following values:
  • TIM_SlaveMode_Reset: Rising edge of the selected trigger signal(TRGI) reinitialize the counter and triggers an update of the registers
  • TIM_SlaveMode_Gated: The counter clock is enabled when the trigger signal (TRGI) is high
  • TIM_SlaveMode_Trigger: The counter starts at a rising edge of the trigger TRGI
  • TIM_SlaveMode_External1: Rising edges of the selected trigger (TRGI) clock the counter
  • TIM_SlaveMode_Combined_ResetTrigger: Rising edge of the selected trigger input (TRGI) reinitializes the counter, generates an update of the registers and starts the counter.
Return values
None

Definition at line 3584 of file stm32f30x_tim.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:29