STM8L15x Standard Peripherals Drivers: Clocks management functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Clocks management functions

Clocks management functions. More...

Functions

void TIM3_ETRClockMode1Config (TIM3_ExtTRGPSC_TypeDef TIM3_ExtTRGPrescaler, TIM3_ExtTRGPolarity_TypeDef TIM3_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM3 External clock Mode1.
void TIM3_ETRClockMode2Config (TIM3_ExtTRGPSC_TypeDef TIM3_ExtTRGPrescaler, TIM3_ExtTRGPolarity_TypeDef TIM3_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM3 External clock Mode2.
void TIM3_InternalClockConfig (void)
 Enables the TIM3 internal Clock.
void TIM3_TIxExternalClockConfig (TIM3_TIxExternalCLK1Source_TypeDef TIM3_TIxExternalCLKSource, TIM3_ICPolarity_TypeDef TIM3_ICPolarity, uint8_t ICFilter)
 Configures the TIM3 Trigger as External Clock.

Detailed Description

Clocks management functions.

 ===============================================================================
                         Clocks management functions
 ===============================================================================  


Function Documentation

void TIM3_ETRClockMode1Config ( TIM3_ExtTRGPSC_TypeDef  TIM3_ExtTRGPrescaler,
TIM3_ExtTRGPolarity_TypeDef  TIM3_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM3 External clock Mode1.

Parameters:
TIM3_ExtTRGPrescaler,:Specifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM3_ExtTRGPSC_OFF: No External Trigger prescaler
  • TIM3_ExtTRGPSC_DIV2: External Trigger prescaler = 2 (ETRP frequency divided by 2)
  • TIM3_ExtTRGPSC_DIV4: External Trigger prescaler = 4 (ETRP frequency divided by 4)
  • TIM3_ExtTRGPSC_DIV8: External Trigger prescaler = 8 (ETRP frequency divided by 8)
TIM3_ExtTRGPolarity,:Specifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM3_ExtTRGPolarity_Inverted: External Trigger Polarity = inverted
  • TIM3_ExtTRGPolarity_NonInverted: External Trigger Polarity = non inverted
ExtTRGFilter,:Specifies the External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 1701 of file stm8l15x_tim3.c.

References TIM3, TIM3_ETRConfig(), TIM3_SlaveMode_External1, TIM3_TRGSelection_ETRF, TIM_SMCR_SMS, and TIM_SMCR_TS.

void TIM3_ETRClockMode2Config ( TIM3_ExtTRGPSC_TypeDef  TIM3_ExtTRGPrescaler,
TIM3_ExtTRGPolarity_TypeDef  TIM3_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM3 External clock Mode2.

Parameters:
TIM3_ExtTRGPrescaler,:Specifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM3_ExtTRGPSC_OFF: No External Trigger prescaler
  • TIM3_ExtTRGPSC_DIV2: External Trigger prescaler = 2 (ETRP frequency divided by 2)
  • TIM3_ExtTRGPSC_DIV4: External Trigger prescaler = 4 (ETRP frequency divided by 4)
  • TIM3_ExtTRGPSC_DIV8: External Trigger prescaler = 8 (ETRP frequency divided by 8)
TIM3_ExtTRGPolarity,:Specifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM3_ExtTRGPolarity_Inverted: External Trigger Polarity = inverted
  • TIM3_ExtTRGPolarity_NonInverted: External Trigger Polarity = non inverted
ExtTRGFilter,:Specifies the External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 1733 of file stm8l15x_tim3.c.

References TIM3, TIM3_ETRConfig(), and TIM_ETR_ECE.

void TIM3_InternalClockConfig ( void  )

Enables the TIM3 internal Clock.

Parameters:
None
Return values:
None

Definition at line 1638 of file stm8l15x_tim3.c.

References TIM3, and TIM_SMCR_SMS.

void TIM3_TIxExternalClockConfig ( TIM3_TIxExternalCLK1Source_TypeDef  TIM3_TIxExternalCLKSource,
TIM3_ICPolarity_TypeDef  TIM3_ICPolarity,
uint8_t  ICFilter 
)

Configures the TIM3 Trigger as External Clock.

Parameters:
TIM3_TIxExternalCLKSource,:Specifies Trigger source. This parameter can be one of the following values:
  • TIM3_TIxExternalCLK1Source_TI1ED: External Clock mode 1 source = TI1ED
  • TIM3_TIxExternalCLK1Source_TI1: External Clock mode 1 source = TI1
  • TIM3_TIxExternalCLK1Source_TI2: External Clock mode 1 source = TI2
TIM3_ICPolarity,:Specifies the TIx Polarity. This parameter can be one of the following values:
  • TIM3_ICPolarity_Rising: Input Capture on Rising Edge
  • TIM3_ICPolarity_Falling: Input Capture on Falling Edge
ICFilter,:Specifies the filter value. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 1659 of file stm8l15x_tim3.c.

References IS_TIM3_IC_FILTER, IS_TIM3_IC_POLARITY, IS_TIM3_TIXCLK_SOURCE, TI1_Config(), TI2_Config(), TIM3, TIM3_ICSelection_DirectTI, TIM3_SelectInputTrigger(), TIM3_SlaveMode_External1, and TIM3_TIxExternalCLK1Source_TI2.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com