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 TIM1_ETRClockMode1Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM1 External clock Mode1.
void TIM1_ETRClockMode2Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM1 External clock Mode2.
void TIM1_InternalClockConfig (void)
 Configures the TIM1 internal Clock.
void TIM1_TIxExternalClockConfig (TIM1_TIxExternalCLK1Source_TypeDef TIM1_TIxExternalCLKSource, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, uint8_t ICFilter)
 Configures the TIM1 Trigger as External Clock.

Detailed Description

Clocks management functions.

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


Function Documentation

void TIM1_ETRClockMode1Config ( TIM1_ExtTRGPSC_TypeDef  TIM1_ExtTRGPrescaler,
TIM1_ExtTRGPolarity_TypeDef  TIM1_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM1 External clock Mode1.

Parameters:
TIM1_ExtTRGPrescalerspecifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM1_ExtTRGPSC_OFF
  • TIM1_ExtTRGPSC_DIV2
  • TIM1_ExtTRGPSC_DIV4
  • TIM1_ExtTRGPSC_DIV8.
TIM1_ExtTRGPolarityspecifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM1_ExtTRGPolarity_Inverted
  • TIM1_ExtTRGPolarity_NonInverted
ExtTRGFilterspecifies the External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 2308 of file stm8l15x_tim1.c.

References IS_TIM1_EXT_POLARITY, IS_TIM1_EXT_PRESCALER, IS_TIM1_EXT_TRG_FILTER, TIM1, TIM1_ETRConfig(), TIM1_SlaveMode_External1, TIM1_SMCR_SMS, TIM1_SMCR_TS, and TIM1_TRGSelection_ETRF.

void TIM1_ETRClockMode2Config ( TIM1_ExtTRGPSC_TypeDef  TIM1_ExtTRGPrescaler,
TIM1_ExtTRGPolarity_TypeDef  TIM1_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM1 External clock Mode2.

Parameters:
TIM1_ExtTRGPrescalerspecifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM1_ExtTRGPSC_OFF
  • TIM1_ExtTRGPSC_DIV2
  • TIM1_ExtTRGPSC_DIV4
  • TIM1_ExtTRGPSC_DIV8.
TIM1_ExtTRGPolarityspecifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM1_ExtTRGPolarity_Inverted
  • TIM1_ExtTRGPolarity_NonInverted
ExtTRGFilterspecifies the External Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 2341 of file stm8l15x_tim1.c.

References IS_TIM1_EXT_POLARITY, IS_TIM1_EXT_PRESCALER, TIM1, TIM1_ETR_ECE, and TIM1_ETRConfig().

void TIM1_InternalClockConfig ( void  )

Configures the TIM1 internal Clock.

Parameters:
None
Return values:
None

Definition at line 2245 of file stm8l15x_tim1.c.

References TIM1, and TIM1_SMCR_SMS.

void TIM1_TIxExternalClockConfig ( TIM1_TIxExternalCLK1Source_TypeDef  TIM1_TIxExternalCLKSource,
TIM1_ICPolarity_TypeDef  TIM1_ICPolarity,
uint8_t  ICFilter 
)

Configures the TIM1 Trigger as External Clock.

Parameters:
TIM1_TIxExternalCLKSourcespecifies Trigger source. This parameter can be one of the following values:
  • TIM1_TIxExternalCLK1Source_TI1: TI1 Edge Detector
  • TIM1_TIxExternalCLK1Source_TI2: Filtered TIM1 Input 1
  • TIM1_TIxExternalCLK1Source_TI1ED: Filtered TIM1 Input 2
TIM1_ICPolarityspecifies the TIx Polarity. This parameter can be one of the following values:
  • TIM1_ICPolarity_Rising: Input capture polarity rising
  • TIM1_ICPolarity_Falling: Input capture polarity falling
ICFilterspecifies the filter value. This parameter must be a value between 0x00 and 0x0F
Return values:
None

Definition at line 2266 of file stm8l15x_tim1.c.

References IS_TIM1_IC_FILTER, IS_TIM1_IC_POLARITY, IS_TIM1_TIXCLK_SOURCE, TI1_Config(), TI2_Config(), TIM1, TIM1_ICSelection_DirectTI, TIM1_SelectInputTrigger(), TIM1_SlaveMode_External1, and TIM1_TIxExternalCLK1Source_TI2.

STM8S Firmware Library: Overview

 

 

 

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