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 TIM5_ETRClockMode1Config (TIM5_ExtTRGPSC_TypeDef TIM5_ExtTRGPrescaler, TIM5_ExtTRGPolarity_TypeDef TIM5_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM5 External clock Mode1.
void TIM5_ETRClockMode2Config (TIM5_ExtTRGPSC_TypeDef TIM5_ExtTRGPrescaler, TIM5_ExtTRGPolarity_TypeDef TIM5_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM5 External clock Mode2.
void TIM5_InternalClockConfig (void)
 Enables the TIM5 internal Clock.
void TIM5_TIxExternalClockConfig (TIM5_TIxExternalCLK1Source_TypeDef TIM5_TIxExternalCLKSource, TIM5_ICPolarity_TypeDef TIM5_ICPolarity, uint8_t ICFilter)
 Configures the TIM5 Trigger as External Clock.

Detailed Description

Clocks management functions.

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


Function Documentation

void TIM5_ETRClockMode1Config ( TIM5_ExtTRGPSC_TypeDef  TIM5_ExtTRGPrescaler,
TIM5_ExtTRGPolarity_TypeDef  TIM5_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM5 External clock Mode1.

Parameters:
TIM5_ExtTRGPrescaler,:Specifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM5_ExtTRGPSC_OFF: No External Trigger prescaler
  • TIM5_ExtTRGPSC_DIV2: External Trigger prescaler = 2 (ETRP frequency divided by 2)
  • TIM5_ExtTRGPSC_DIV4: External Trigger prescaler = 4 (ETRP frequency divided by 4)
  • TIM5_ExtTRGPSC_DIV8: External Trigger prescaler = 8 (ETRP frequency divided by 8)
TIM5_ExtTRGPolarity,:Specifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM5_ExtTRGPolarity_Inverted: External Trigger Polarity = inverted
  • TIM5_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_tim5.c.

References TIM5, TIM5_ETRConfig(), TIM5_SlaveMode_External1, TIM5_TRGSelection_ETRF, TIM_SMCR_SMS, and TIM_SMCR_TS.

void TIM5_ETRClockMode2Config ( TIM5_ExtTRGPSC_TypeDef  TIM5_ExtTRGPrescaler,
TIM5_ExtTRGPolarity_TypeDef  TIM5_ExtTRGPolarity,
uint8_t  ExtTRGFilter 
)

Configures the TIM5 External clock Mode2.

Parameters:
TIM5_ExtTRGPrescaler,:Specifies the external Trigger Prescaler. This parameter can be one of the following values:
  • TIM5_ExtTRGPSC_OFF: No External Trigger prescaler
  • TIM5_ExtTRGPSC_DIV2: External Trigger prescaler = 2 (ETRP frequency divided by 2)
  • TIM5_ExtTRGPSC_DIV4: External Trigger prescaler = 4 (ETRP frequency divided by 4)
  • TIM5_ExtTRGPSC_DIV8: External Trigger prescaler = 8 (ETRP frequency divided by 8)
TIM5_ExtTRGPolarity,:Specifies the external Trigger Polarity. This parameter can be one of the following values:
  • TIM5_ExtTRGPolarity_Inverted: External Trigger Polarity = inverted
  • TIM5_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_tim5.c.

References TIM5, TIM5_ETRConfig(), and TIM_ETR_ECE.

void TIM5_InternalClockConfig ( void  )

Enables the TIM5 internal Clock.

Parameters:
None
Return values:
None

Definition at line 1638 of file stm8l15x_tim5.c.

References TIM5, and TIM_SMCR_SMS.

void TIM5_TIxExternalClockConfig ( TIM5_TIxExternalCLK1Source_TypeDef  TIM5_TIxExternalCLKSource,
TIM5_ICPolarity_TypeDef  TIM5_ICPolarity,
uint8_t  ICFilter 
)

Configures the TIM5 Trigger as External Clock.

Parameters:
TIM5_TIxExternalCLKSource,:Specifies Trigger source. This parameter can be one of the following values:
  • TIM5_TIxExternalCLK1Source_TI1ED: External Clock mode 1 source = TI1ED
  • TIM5_TIxExternalCLK1Source_TI1: External Clock mode 1 source = TI1
  • TIM5_TIxExternalCLK1Source_TI2: External Clock mode 1 source = TI2
TIM5_ICPolarity,:Specifies the TIx Polarity. This parameter can be one of the following values:
  • TIM5_ICPolarity_Rising: Input Capture on Rising Edge
  • TIM5_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_tim5.c.

References IS_TIM5_IC_FILTER, IS_TIM5_IC_POLARITY, IS_TIM5_TIXCLK_SOURCE, TI1_Config(), TI2_Config(), TIM5, TIM5_ICSelection_DirectTI, TIM5_SelectInputTrigger(), TIM5_SlaveMode_External1, and TIM5_TIxExternalCLK1Source_TI2.

STM8S Firmware Library: Overview

 

 

 

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