Modules | Classes | Macros | Functions

TIM driver modules. More...

Collaboration diagram for TIM:

Modules

 TIM_Exported_constants
 
 TIM_Private_Functions
 
 TIM_Exported_Types
 
 TIM_Exported_Macros
 
 TIM_Exported_Functions
 
 TIM_Private_TypesDefinitions
 
 TIM_Private_Defines
 
 TIM_Private_Macros
 
 TIM_Private_Variables
 
 TIM_Private_FunctionPrototypes
 

Classes

struct  TIM_BDTRInitTypeDef
 BDTR structure definition. More...
 
struct  TIM_ICInitTypeDef
 TIM Input Capture Init structure definition. More...
 
struct  TIM_OCInitTypeDef
 TIM Output Compare Init structure definition. More...
 
struct  TIM_TimeBaseInitTypeDef
 TIM Time Base Init structure definition. More...
 

Macros

#define CCER_CCE_SET   ((uint16_t)0x0001)
 
#define CCER_CCE_SET   ((uint16_t)0x0001)
 
#define CCER_CCNE_SET   ((uint16_t)0x0004)
 
#define CCER_CCNE_SET   ((uint16_t)0x0004)
 
#define CCMR_OC13M_MASK   ((uint16_t)0xFF8F)
 
#define CCMR_OC13M_MASK   ((uint32_t)0xFFFEFF8F)
 
#define CCMR_OC24M_MASK   ((uint16_t)0x8FFF)
 
#define CCMR_OC24M_MASK   ((uint32_t)0xFEFF8FFF)
 
#define CCMR_OFFSET   ((uint16_t)0x0018)
 
#define CCMR_OFFSET   ((uint16_t)0x0018)
 
#define SMCR_ETR_MASK   ((uint16_t)0x00FF)
 
#define SMCR_ETR_MASK   ((uint16_t)0x00FF)
 

Functions

FlagStatus TIM_GetFlagStatus (TIM_TypeDef *TIMx, uint16_t TIM_FLAG)
 Checks whether the specified TIM flag is set or not. More...
 
void TIM_SelectOCxM (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_OCMode)
 Selects the TIM Output Compare Mode. More...
 
void TIM_SelectSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_SlaveMode)
 Selects the TIMx Slave Mode. More...
 

Detailed Description

TIM driver modules.

Macro Definition Documentation

#define CCER_CCE_SET   ((uint16_t)0x0001)

Definition at line 137 of file stm32f4xx_tim.c.

#define CCER_CCE_SET   ((uint16_t)0x0001)

Definition at line 138 of file stm32f30x_tim.c.

#define CCER_CCNE_SET   ((uint16_t)0x0004)

Definition at line 138 of file stm32f4xx_tim.c.

#define CCER_CCNE_SET   ((uint16_t)0x0004)

Definition at line 139 of file stm32f30x_tim.c.

#define CCMR_OC13M_MASK   ((uint16_t)0xFF8F)

Definition at line 139 of file stm32f4xx_tim.c.

#define CCMR_OC13M_MASK   ((uint32_t)0xFFFEFF8F)

Definition at line 140 of file stm32f30x_tim.c.

#define CCMR_OC24M_MASK   ((uint16_t)0x8FFF)

Definition at line 140 of file stm32f4xx_tim.c.

#define CCMR_OC24M_MASK   ((uint32_t)0xFEFF8FFF)

Definition at line 141 of file stm32f30x_tim.c.

#define CCMR_OFFSET   ((uint16_t)0x0018)

Definition at line 136 of file stm32f4xx_tim.c.

#define CCMR_OFFSET   ((uint16_t)0x0018)

Definition at line 137 of file stm32f30x_tim.c.

#define SMCR_ETR_MASK   ((uint16_t)0x00FF)

Definition at line 135 of file stm32f4xx_tim.c.

#define SMCR_ETR_MASK   ((uint16_t)0x00FF)

Definition at line 136 of file stm32f30x_tim.c.

Function Documentation

FlagStatus TIM_GetFlagStatus ( TIM_TypeDef TIMx,
uint16_t  TIM_FLAG 
)

Checks whether the specified TIM flag is set or not.

Parameters
TIMxwhere x can be 1 to 14 to select the TIM peripheral.
TIM_FLAGspecifies the flag to check. This parameter can be one of the following values:
  • TIM_FLAG_Update: TIM update Flag
  • TIM_FLAG_CC1: TIM Capture Compare 1 Flag
  • TIM_FLAG_CC2: TIM Capture Compare 2 Flag
  • TIM_FLAG_CC3: TIM Capture Compare 3 Flag
  • TIM_FLAG_CC4: TIM Capture Compare 4 Flag
  • TIM_FLAG_COM: TIM Commutation Flag
  • TIM_FLAG_Trigger: TIM Trigger Flag
  • TIM_FLAG_Break: TIM Break Flag
  • TIM_FLAG_CC1OF: TIM Capture Compare 1 over capture Flag
  • TIM_FLAG_CC2OF: TIM Capture Compare 2 over capture Flag
  • TIM_FLAG_CC3OF: TIM Capture Compare 3 over capture Flag
  • TIM_FLAG_CC4OF: TIM Capture Compare 4 over capture Flag
Note
TIM6 and TIM7 can have only one update flag.
TIM_FLAG_COM and TIM_FLAG_Break are used only with TIM1 and TIM8.
Return values
Thenew state of TIM_FLAG (SET or RESET).
Parameters
TIMxwhere x can be 1 to 17 to select the TIM peripheral.
TIM_FLAGspecifies the flag to check. This parameter can be one of the following values:
  • TIM_FLAG_Update: TIM update Flag
  • TIM_FLAG_CC1: TIM Capture Compare 1 Flag
  • TIM_FLAG_CC2: TIM Capture Compare 2 Flag
  • TIM_FLAG_CC3: TIM Capture Compare 3 Flag
  • TIM_FLAG_CC4: TIM Capture Compare 4 Flag
  • TIM_FLAG_COM: TIM Commutation Flag
  • TIM_FLAG_Trigger: TIM Trigger Flag
  • TIM_FLAG_Break: TIM Break Flag
  • TIM_FLAG_CC1OF: TIM Capture Compare 1 overcapture Flag
  • TIM_FLAG_CC2OF: TIM Capture Compare 2 overcapture Flag
  • TIM_FLAG_CC3OF: TIM Capture Compare 3 overcapture Flag
  • TIM_FLAG_CC4OF: TIM Capture Compare 4 overcapture Flag
Note
  • TIM6 and TIM7 can have only one update flag.
  • TIM9, TIM12 and TIM15 can have only TIM_FLAG_Update, TIM_FLAG_CC1, TIM_FLAG_CC2 or TIM_FLAG_Trigger.
  • TIM10, TIM11, TIM13, TIM14, TIM16 and TIM17 can have TIM_FLAG_Update or TIM_FLAG_CC1.
  • TIM_FLAG_Break is used only with TIM1, TIM8 and TIM15.
  • TIM_FLAG_COM is used only with TIM1, TIM8, TIM15, TIM16 and TIM17.
Return values
Thenew state of TIM_FLAG (SET or RESET).

Definition at line 2443 of file stm32f4xx_tim.c.

void TIM_SelectOCxM ( TIM_TypeDef TIMx,
uint16_t  TIM_Channel,
uint16_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
TIMxwhere x can be 1 to 14 except 6 and 7, to select the TIM peripheral.
TIM_Channelspecifies 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_OCModespecifies 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
Return values
None
Note
This function disables the selected channel before changing the Output Compare Mode. User has to enable this channel using TIM_CCxCmd and TIM_CCxNCmd functions.
Parameters
TIMxwhere x can be 1 to 17 except 6 and 7 to select the TIM peripheral.
TIM_Channelspecifies 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_OCModespecifies 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
Return values
None

Definition at line 1014 of file stm32f4xx_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
Parameters
TIMxwhere x can be 1, 2, 3, 4, 5, 8, 9, 12 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) re-initializes 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.



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