Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Output Compare management functions

Output Compare management functions
[TIM_Private_Functions]

Output Compare management functions. More...

Functions

void TIM_OC1Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel1 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC2Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel2 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC3Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel3 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC4Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel4 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC5Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel5 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC6Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel6 according to the specified parameters in the TIM_OCInitStruct.
void TIM_SelectGC5C1 (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIM Group Channel 5 and Channel 1, OC1REFC is the logical AND of OC1REFC and OC5REF.
void TIM_SelectGC5C2 (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIM Group Channel 5 and Channel 2, OC2REFC is the logical AND of OC2REFC and OC5REF.
void TIM_SelectGC5C3 (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIM Group Channel 5 and Channel 3, OC3REFC is the logical AND of OC3REFC and OC5REF.
void TIM_OCStructInit (TIM_OCInitTypeDef *TIM_OCInitStruct)
 Fills each TIM_OCInitStruct member with its default value.
void TIM_SelectOCxM (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint32_t TIM_OCMode)
 Selects the TIM Output Compare Mode.
void TIM_SetCompare1 (TIM_TypeDef *TIMx, uint32_t Compare1)
 Sets the TIMx Capture Compare1 Register value.
void TIM_SetCompare2 (TIM_TypeDef *TIMx, uint32_t Compare2)
 Sets the TIMx Capture Compare2 Register value.
void TIM_SetCompare3 (TIM_TypeDef *TIMx, uint32_t Compare3)
 Sets the TIMx Capture Compare3 Register value.
void TIM_SetCompare4 (TIM_TypeDef *TIMx, uint32_t Compare4)
 Sets the TIMx Capture Compare4 Register value.
void TIM_SetCompare5 (TIM_TypeDef *TIMx, uint32_t Compare5)
 Sets the TIMx Capture Compare5 Register value.
void TIM_SetCompare6 (TIM_TypeDef *TIMx, uint32_t Compare6)
 Sets the TIMx Capture Compare6 Register value.
void TIM_ForcedOC1Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 1 waveform to active or inactive level.
void TIM_ForcedOC2Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 2 waveform to active or inactive level.
void TIM_ForcedOC3Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 3 waveform to active or inactive level.
void TIM_ForcedOC4Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 4 waveform to active or inactive level.
void TIM_ForcedOC5Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 5 waveform to active or inactive level.
void TIM_ForcedOC6Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 6 waveform to active or inactive level.
void TIM_OC1PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR1.
void TIM_OC2PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR2.
void TIM_OC3PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR3.
void TIM_OC4PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR4.
void TIM_OC5PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR5.
void TIM_OC6PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR6.
void TIM_OC1FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 1 Fast feature.
void TIM_OC2FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 2 Fast feature.
void TIM_OC3FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 3 Fast feature.
void TIM_OC4FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 4 Fast feature.
void TIM_ClearOC1Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF1 signal on an external event.
void TIM_ClearOC2Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF2 signal on an external event.
void TIM_ClearOC3Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF3 signal on an external event.
void TIM_ClearOC4Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF4 signal on an external event.
void TIM_ClearOC5Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF5 signal on an external event.
void TIM_ClearOC6Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF6 signal on an external event.
void TIM_SelectOCREFClear (TIM_TypeDef *TIMx, uint16_t TIM_OCReferenceClear)
 Selects the OCReference Clear source.
void TIM_OC1PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 1 polarity.
void TIM_OC1NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 1N polarity.
void TIM_OC2PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 2 polarity.
void TIM_OC2NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 2N polarity.
void TIM_OC3PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 3 polarity.
void TIM_OC3NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 3N polarity.
void TIM_OC4PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 4 polarity.
void TIM_OC5PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 5 polarity.
void TIM_OC6PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 6 polarity.
void TIM_CCxCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCx)
 Enables or disables the TIM Capture Compare Channel x.
void TIM_CCxNCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCxN)
 Enables or disables the TIM Capture Compare Channel xN.

Detailed Description

Output Compare management functions.

 ===============================================================================
                ##### Output Compare management functions #####
 ===============================================================================  
       
  *** TIM Driver: how to use it in Output Compare Mode ***
  ======================================================== 
  [..] 
  To use the Timer in Output Compare mode, the following steps are mandatory:
       
       (#) Enable TIM clock using RCC_APBxPeriphClockCmd(RCC_APBxPeriph_TIMx, ENABLE) function
       
       (#) Configure the TIM pins by configuring the corresponding GPIO pins
       
       (#) Configure the Time base unit as described in the first part of this driver, 
           if needed, else the Timer will run with the default configuration:
           (++) Autoreload value = 0xFFFF
           (++) Prescaler value = 0x0000
           (++) Counter mode = Up counting
           (++) Clock Division = TIM_CKD_DIV1   
       (#) Fill the TIM_OCInitStruct with the desired parameters including:
           (++) The TIM Output Compare mode: TIM_OCMode
           (++) TIM Output State: TIM_OutputState
           (++) TIM Pulse value: TIM_Pulse
           (++) TIM Output Compare Polarity : TIM_OCPolarity
       
       (#) Call TIM_OCxInit(TIMx, &TIM_OCInitStruct) to configure the desired channel with the 
           corresponding configuration
       
       (#) Call the TIM_Cmd(ENABLE) function to enable the TIM counter.
 [..]      
       (@) All other functions can be used separately to modify, if needed,
           a specific feature of the Timer. 
          
       (@) In case of PWM mode, this function is mandatory:
           TIM_OCxPreloadConfig(TIMx, TIM_OCPreload_ENABLE); 
              
       (@) If the corresponding interrupt or DMA request are needed, the user should:
                (#@) Enable the NVIC (or the DMA) to use the TIM interrupts (or DMA requests). 
                (#@) Enable the corresponding interrupt (or DMA request) using the function 
                     TIM_ITConfig(TIMx, TIM_IT_CCx) (or TIM_DMA_Cmd(TIMx, TIM_DMA_CCx))   


Function Documentation

void TIM_CCxCmd ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint16_t  TIM_CCx 
)

Enables or disables the TIM Capture Compare Channel x.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parameter can be one of the following values:

  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
  • TIM_Channel_4: TIM Channel 4
  • TIM_Channel_5: TIM Channel 5
  • TIM_Channel_6: TIM Channel 6
TIM_CCx,:specifies the TIM Channel CCxE bit new state. This parameter can be: TIM_CCx_Enable or TIM_CCx_Disable.
Return values:
None

Definition at line 2284 of file stm32f30x_tim.c.

void TIM_CCxNCmd ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint16_t  TIM_CCxN 
)

Enables or disables the TIM Capture Compare Channel xN.

Parameters:
TIMx,:where x can be 1, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parameter can be one of the following values:

  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
TIM_CCxN,:specifies the TIM Channel CCxNE bit new state. This parameter can be: TIM_CCxN_Enable or TIM_CCxN_Disable.
Return values:
None

Definition at line 2314 of file stm32f30x_tim.c.

void TIM_ClearOC1Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF1 signal on an external event.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1840 of file stm32f30x_tim.c.

void TIM_ClearOC2Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF2 signal on an external event.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1870 of file stm32f30x_tim.c.

void TIM_ClearOC3Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF3 signal on an external event.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1899 of file stm32f30x_tim.c.

void TIM_ClearOC4Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF4 signal on an external event.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1928 of file stm32f30x_tim.c.

void TIM_ClearOC5Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF5 signal on an external event.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1957 of file stm32f30x_tim.c.

void TIM_ClearOC6Ref ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCClear 
)

Clears or safeguards the OCREF6 signal on an external event.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCClear,:new state of the Output Compare Clear Enable Bit. This parameter can be one of the following values:

  • TIM_OCClear_Enable: TIM Output clear enable
  • TIM_OCClear_Disable: TIM Output clear disable
Return values:
None

Definition at line 1986 of file stm32f30x_tim.c.

void TIM_ForcedOC1Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 1 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC1REF
  • TIM_ForcedAction_InActive: Force inactive level on OC1REF.
Return values:
None

Definition at line 1374 of file stm32f30x_tim.c.

void TIM_ForcedOC2Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 2 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC2REF
  • TIM_ForcedAction_InActive: Force inactive level on OC2REF.
Return values:
None

Definition at line 1403 of file stm32f30x_tim.c.

void TIM_ForcedOC3Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 3 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC3REF
  • TIM_ForcedAction_InActive: Force inactive level on OC3REF.
Return values:
None

Definition at line 1431 of file stm32f30x_tim.c.

void TIM_ForcedOC4Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 4 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC4REF
  • TIM_ForcedAction_InActive: Force inactive level on OC4REF.
Return values:
None

Definition at line 1460 of file stm32f30x_tim.c.

void TIM_ForcedOC5Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 5 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC5REF
  • TIM_ForcedAction_InActive: Force inactive level on OC5REF.
Return values:
None

Definition at line 1488 of file stm32f30x_tim.c.

void TIM_ForcedOC6Config ( TIM_TypeDef *  TIMx,
uint16_t  TIM_ForcedAction 
)

Forces the TIMx output 6 waveform to active or inactive level.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_ForcedAction,:specifies the forced Action to be set to the output waveform. This parameter can be one of the following values:

  • TIM_ForcedAction_Active: Force active level on OC5REF
  • TIM_ForcedAction_InActive: Force inactive level on OC5REF.
Return values:
None

Definition at line 1516 of file stm32f30x_tim.c.

void TIM_OC1FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 1 Fast feature.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:

  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values:
None

Definition at line 1719 of file stm32f30x_tim.c.

void TIM_OC1Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel1 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17, to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 681 of file stm32f30x_tim.c.

void TIM_OC1NPolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCNPolarity 
)

Configures the TIMx Channel 1N polarity.

Parameters:
TIMx,:where x can be 1, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCNPolarity,:specifies the OC1N Polarity This parameter can be one of the following values:

  • TIM_OCNPolarity_High: Output Compare active high
  • TIM_OCNPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2062 of file stm32f30x_tim.c.

void TIM_OC1PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 1 polarity.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC1 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2035 of file stm32f30x_tim.c.

void TIM_OC1PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR1.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1544 of file stm32f30x_tim.c.

void TIM_OC2FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 2 Fast feature.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:

  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values:
None

Definition at line 1750 of file stm32f30x_tim.c.

void TIM_OC2Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel2 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 761 of file stm32f30x_tim.c.

void TIM_OC2NPolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCNPolarity 
)

Configures the TIMx Channel 2N polarity.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCNPolarity,:specifies the OC2N Polarity This parameter can be one of the following values:

  • TIM_OCNPolarity_High: Output Compare active high
  • TIM_OCNPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2116 of file stm32f30x_tim.c.

void TIM_OC2PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 2 polarity.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC2 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2089 of file stm32f30x_tim.c.

void TIM_OC2PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR2.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1574 of file stm32f30x_tim.c.

void TIM_OC3FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 3 Fast feature.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:

  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values:
None

Definition at line 1780 of file stm32f30x_tim.c.

void TIM_OC3Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel3 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 842 of file stm32f30x_tim.c.

void TIM_OC3NPolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCNPolarity 
)

Configures the TIMx Channel 3N polarity.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCNPolarity,:specifies the OC3N Polarity This parameter can be one of the following values:

  • TIM_OCNPolarity_High: Output Compare active high
  • TIM_OCNPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2170 of file stm32f30x_tim.c.

void TIM_OC3PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 3 polarity.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC3 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2143 of file stm32f30x_tim.c.

void TIM_OC3PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR3.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1603 of file stm32f30x_tim.c.

void TIM_OC4FastConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCFast 
)

Configures the TIMx Output Compare 4 Fast feature.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCFast,:new state of the Output Compare Fast Enable Bit. This parameter can be one of the following values:

  • TIM_OCFast_Enable: TIM output compare fast enable
  • TIM_OCFast_Disable: TIM output compare fast disable
Return values:
None

Definition at line 1810 of file stm32f30x_tim.c.

void TIM_OC4Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel4 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 922 of file stm32f30x_tim.c.

void TIM_OC4PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 4 polarity.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC4 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2197 of file stm32f30x_tim.c.

void TIM_OC4PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR4.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 20 or 8 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1632 of file stm32f30x_tim.c.

void TIM_OC5Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel5 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 987 of file stm32f30x_tim.c.

void TIM_OC5PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 5 polarity.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC5 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2224 of file stm32f30x_tim.c.

void TIM_OC5PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR5.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1661 of file stm32f30x_tim.c.

void TIM_OC6Init ( TIM_TypeDef *  TIMx,
TIM_OCInitTypeDef *  TIM_OCInitStruct 
)

Initializes the TIMx Channel6 according to the specified parameters in the TIM_OCInitStruct.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure that contains the configuration information for the specified TIM peripheral.
Return values:
None

Definition at line 1051 of file stm32f30x_tim.c.

void TIM_OC6PolarityConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPolarity 
)

Configures the TIMx channel 6 polarity.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCPolarity,:specifies the OC6 Polarity This parameter can be one of the following values:

  • TIM_OCPolarity_High: Output Compare active high
  • TIM_OCPolarity_Low: Output Compare active low
Return values:
None

Definition at line 2251 of file stm32f30x_tim.c.

void TIM_OC6PreloadConfig ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCPreload 
)

Enables or disables the TIMx peripheral Preload register on CCR6.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
TIM_OCPreload,:new state of the TIMx peripheral Preload register This parameter can be one of the following values:

  • TIM_OCPreload_Enable
  • TIM_OCPreload_Disable
Return values:
None

Definition at line 1690 of file stm32f30x_tim.c.

void TIM_OCStructInit ( TIM_OCInitTypeDef *  TIM_OCInitStruct )

Fills each TIM_OCInitStruct member with its default value.

Parameters:
TIM_OCInitStruct,:pointer to a TIM_OCInitTypeDef structure which will be initialized.
Return values:
None

Definition at line 1192 of file stm32f30x_tim.c.

void TIM_SelectGC5C1 ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Selects the TIM Group Channel 5 and Channel 1, OC1REFC is the logical AND of OC1REFC and OC5REF.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIMx peripheral
NewState,:new state of the Commutation event. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1115 of file stm32f30x_tim.c.

void TIM_SelectGC5C2 ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Selects the TIM Group Channel 5 and Channel 2, OC2REFC is the logical AND of OC2REFC and OC5REF.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIMx peripheral
NewState,:new state of the Commutation event. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1141 of file stm32f30x_tim.c.

void TIM_SelectGC5C3 ( TIM_TypeDef *  TIMx,
FunctionalState  NewState 
)

Selects the TIM Group Channel 5 and Channel 3, OC3REFC is the logical AND of OC3REFC and OC5REF.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIMx peripheral
NewState,:new state of the Commutation event. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1168 of file stm32f30x_tim.c.

void TIM_SelectOCREFClear ( TIM_TypeDef *  TIMx,
uint16_t  TIM_OCReferenceClear 
)

Selects the OCReference Clear source.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_OCReferenceClear,:specifies the OCReference Clear source. This parameter can be one of the following values:

  • TIM_OCReferenceClear_ETRF: The internal OCreference clear input is connected to ETRF.
  • TIM_OCReferenceClear_OCREFCLR: The internal OCreference clear input is connected to OCREF_CLR input.
Return values:
None

Definition at line 2015 of file stm32f30x_tim.c.

void TIM_SelectOCxM ( TIM_TypeDef *  TIMx,
uint16_t  TIM_Channel,
uint32_t  TIM_OCMode 
)

Selects the TIM Output Compare Mode.

Note:
This function disables the selected channel before changing the Output Compare Mode. If needed, user has to enable this channel using TIM_CCxCmd() and TIM_CCxNCmd() functions.
Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
TIM_Channel,:specifies the TIM Channel This parameter can be one of the following values:

  • TIM_Channel_1: TIM Channel 1
  • TIM_Channel_2: TIM Channel 2
  • TIM_Channel_3: TIM Channel 3
  • TIM_Channel_4: TIM Channel 4
TIM_OCMode,:specifies the TIM Output Compare Mode. This parameter can be one of the following values:

  • TIM_OCMode_Timing
  • TIM_OCMode_Active
  • TIM_OCMode_Toggle
  • TIM_OCMode_PWM1
  • TIM_OCMode_PWM2
  • TIM_ForcedAction_Active
  • TIM_ForcedAction_InActive
  • TIM_OCMode_Retrigerrable_OPM1
  • TIM_OCMode_Retrigerrable_OPM2
  • TIM_OCMode_Combined_PWM1
  • TIM_OCMode_Combined_PWM2
  • TIM_OCMode_Asymmetric_PWM1
  • TIM_OCMode_Asymmetric_PWM2
Return values:
None

Definition at line 1234 of file stm32f30x_tim.c.

void TIM_SetCompare1 ( TIM_TypeDef *  TIMx,
uint32_t  Compare1 
)

Sets the TIMx Capture Compare1 Register value.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 15, 16, 20 or 17 to select the TIM peripheral.
Compare1,:specifies the Capture Compare1 register new value.
Return values:
None

Definition at line 1280 of file stm32f30x_tim.c.

void TIM_SetCompare2 ( TIM_TypeDef *  TIMx,
uint32_t  Compare2 
)

Sets the TIMx Capture Compare2 Register value.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 8, 20 or 15 to select the TIM peripheral.
Compare2,:specifies the Capture Compare2 register new value.
Return values:
None

Definition at line 1296 of file stm32f30x_tim.c.

void TIM_SetCompare3 ( TIM_TypeDef *  TIMx,
uint32_t  Compare3 
)

Sets the TIMx Capture Compare3 Register value.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 5, 20 or 8 to select the TIM peripheral.
Compare3,:specifies the Capture Compare3 register new value.
Return values:
None

Definition at line 1311 of file stm32f30x_tim.c.

void TIM_SetCompare4 ( TIM_TypeDef *  TIMx,
uint32_t  Compare4 
)

Sets the TIMx Capture Compare4 Register value.

Parameters:
TIMx,:where x can be 1, 2, 3, 4, 5, 20 or 8 to select the TIM peripheral.
Compare4,:specifies the Capture Compare4 register new value.
Return values:
None

Definition at line 1326 of file stm32f30x_tim.c.

void TIM_SetCompare5 ( TIM_TypeDef *  TIMx,
uint32_t  Compare5 
)

Sets the TIMx Capture Compare5 Register value.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
Compare5,:specifies the Capture Compare5 register new value.
Return values:
None

Definition at line 1341 of file stm32f30x_tim.c.

void TIM_SetCompare6 ( TIM_TypeDef *  TIMx,
uint32_t  Compare6 
)

Sets the TIMx Capture Compare6 Register value.

Parameters:
TIMx,:where x can be 1 or 8 or 20 to select the TIM peripheral.
Compare6,:specifies the Capture Compare5 register new value.
Return values:
None

Definition at line 1356 of file stm32f30x_tim.c.