STM8L15x Standard Peripherals Drivers: Synchronization management functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Synchronization management functions

Synchronization management functions. More...

Functions

void TIM4_SelectInputTrigger (TIM4_TRGSelection_TypeDef TIM4_InputTriggerSource)
 Selects the TIM4 Input Trigger source.
void TIM4_SelectMasterSlaveMode (FunctionalState NewState)
 Sets or Resets the TIM4 Master/Slave Mode.
void TIM4_SelectOutputTrigger (TIM4_TRGOSource_TypeDef TIM4_TRGOSource)
 Selects the TIM4 Trigger Output Mode.
void TIM4_SelectSlaveMode (TIM4_SlaveMode_TypeDef TIM4_SlaveMode)
 Selects the TIM4 Slave Mode.

Detailed Description

Synchronization management functions.

 ===============================================================================
                       Synchronization management functions
 ===============================================================================  
                   
       ===================================================================      
              TIM4 Driver: how to use it in synchronization Mode
       =================================================================== 
       Case of two/several Timers
       **************************
       1. If TIM4 is used as master to other timers use the following functions:
          - TIM4_SelectOutputTrigger()
          - TIM4_SelectMasterSlaveMode()
       2. If TIM4 is used as slave to other timers use the following functions:
          - TIM4_SelectInputTrigger()
          - TIM4_SelectSlaveMode()
          

Function Documentation

void TIM4_SelectInputTrigger ( TIM4_TRGSelection_TypeDef  TIM4_InputTriggerSource)

Selects the TIM4 Input Trigger source.

Parameters:
TIM4_InputTriggerSource,:Specifies Input Trigger source. This parameter can be one of the following values:
  • TIM4_TRGSelection_TIM5: TRIG Input source = TIM5 TRIG Output
  • TIM4_TRGSelection_TIM1: TRIG Input source = TIM1 TRIG Output
  • TIM4_TRGSelection_TIM3: TRIG Input source = TIM3 TRIG Output
  • TIM4_TRGSelection_TIM2: TRIG Input source = TIM2 TRIG Output
Return values:
None

Definition at line 645 of file stm8l15x_tim4.c.

References IS_TIM4_TRIGGER_SELECTION, TIM4, and TIM4_SMCR_TS.

void TIM4_SelectMasterSlaveMode ( FunctionalState  NewState)

Sets or Resets the TIM4 Master/Slave Mode.

Parameters:
NewState,:The new state of the synchronization between TIM4 and its slaves (through TRGO). This parameter can be ENABLE or DISABLE
Return values:
None

Definition at line 724 of file stm8l15x_tim4.c.

References DISABLE, IS_FUNCTIONAL_STATE, TIM4, and TIM4_SMCR_MSM.

void TIM4_SelectOutputTrigger ( TIM4_TRGOSource_TypeDef  TIM4_TRGOSource)

Selects the TIM4 Trigger Output Mode.

Parameters:
TIM4_TRGOSource,:Specifies the Trigger Output source. This parameter can be one of the following values:
  • TIM4_TRGOSource_Reset: Trigger Output source = Reset
  • TIM4_TRGOSource_Enable: Trigger Output source = TIM4 is enabled
  • TIM4_TRGOSource_Update: Trigger Output source = Update event
Return values:
None

Definition at line 670 of file stm8l15x_tim4.c.

References IS_TIM4_TRGO_SOURCE, TIM4, and TIM4_CR2_MMS.

void TIM4_SelectSlaveMode ( TIM4_SlaveMode_TypeDef  TIM4_SlaveMode)

Selects the TIM4 Slave Mode.

Parameters:
TIM4_SlaveMode,:Specifies the TIM4 Slave Mode. This parameter can be one of the following values:
  • TIM4_SlaveMode_Disable: Disable slave mode to clock the prescaler directly with the internal clock
  • TIM4_SlaveMode_Reset: Slave Mode Selection = Reset
  • TIM4_SlaveMode_Gated: Slave Mode Selection = Gated
  • TIM4_SlaveMode_Trigger: Slave Mode Selection = Trigger
  • TIM4_SlaveMode_External1: Slave Mode Selection = External 1
Return values:
None

Definition at line 700 of file stm8l15x_tim4.c.

References IS_TIM4_SLAVE_MODE, TIM4, and TIM4_SMCR_SMS.

STM8S Firmware Library: Overview

 

 

 

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