STM8L15x Standard Peripherals Drivers: Interrupts DMA and flags management functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Interrupts DMA and flags management functions

Interrupts, DMA and flags management functions. More...

Functions

void TIM2_ClearFlag (TIM2_FLAG_TypeDef TIM2_FLAG)
 Clears the TIM�s pending flags.
void TIM2_ClearITPendingBit (TIM2_IT_TypeDef TIM2_IT)
 Clears the TIM's interrupt pending bits.
void TIM2_DMACmd (TIM2_DMASource_TypeDef TIM2_DMASource, FunctionalState NewState)
 Enables or disables the TIM2 DMA Requests.
void TIM2_GenerateEvent (TIM2_EventSource_TypeDef TIM2_EventSource)
 Configures the TIM2 event to be generated by software.
FlagStatus TIM2_GetFlagStatus (TIM2_FLAG_TypeDef TIM2_FLAG)
 Checks whether the specified TIM2 flag is set or not.
ITStatus TIM2_GetITStatus (TIM2_IT_TypeDef TIM2_IT)
 Checks whether the TIM2 interrupt has occurred or not.
void TIM2_ITConfig (TIM2_IT_TypeDef TIM2_IT, FunctionalState NewState)
 Enables or disables the specified TIM2 interrupts.
void TIM2_SelectCCDMA (FunctionalState NewState)
 Selects the TIM2 peripheral Capture Compare DMA source.

Detailed Description

Interrupts, DMA and flags management functions.

 ===============================================================================
                 Interrupts, DMA and flags management functions
 ===============================================================================  


Function Documentation

void TIM2_ClearFlag ( TIM2_FLAG_TypeDef  TIM2_FLAG)

Clears the TIM�s pending flags.

Parameters:
TIM2_FLAG,:Specifies the flag to clear. This parameter can be any combination of the following values:
  • TIM2_FLAG_Update: Update
  • TIM2_FLAG_CC1: Capture Compare Channel1
  • TIM2_FLAG_CC2: Capture Compare Channel2
  • TIM2_FLAG_Trigger: Trigger
  • TIM2_FLAG_Break: Break
Return values:
None

Definition at line 1500 of file stm8l15x_tim2.c.

References IS_TIM2_CLEAR_FLAG, and TIM2.

void TIM2_ClearITPendingBit ( TIM2_IT_TypeDef  TIM2_IT)

Clears the TIM's interrupt pending bits.

Parameters:
TIM2_IT,:Specifies the pending bit to clear. This parameter can be any combination of the following values:
  • TIM2_IT_Update: Update
  • TIM2_IT_CC1: Capture Compare Channel1
  • TIM2_IT_CC2: Capture Compare Channel2
  • TIM2_IT_Trigger: Trigger
  • TIM2_IT_Break: Break
Return values:
None

Definition at line 1555 of file stm8l15x_tim2.c.

References IS_TIM2_IT, and TIM2.

void TIM2_DMACmd ( TIM2_DMASource_TypeDef  TIM2_DMASource,
FunctionalState  NewState 
)

Enables or disables the TIM2 DMA Requests.

Parameters:
TIM2_DMASource,:specifies the DMA Request sources. This parameter can be any combination of the following values:
  • TIM2_DMASource_Update: TIM2 DMA Update Request
  • TIM2_DMASource_CC1: TIM2 DMA CC1 Request
  • TIM2_DMASource_CC2: TIM2 DMA CC2 Request
NewState,:new state of the DMA Request sources. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1575 of file stm8l15x_tim2.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM2_DMA_SOURCE, and TIM2.

void TIM2_GenerateEvent ( TIM2_EventSource_TypeDef  TIM2_EventSource)

Configures the TIM2 event to be generated by software.

Parameters:
TIM2_EventSource,:Specifies the event source. This parameter can be any combination of the following values:
  • TIM2_EventSource_Update: Update
  • TIM2_EventSource_CC1: Capture Compare Channel1
  • TIM2_EventSource_CC2: Capture Compare Channel2
  • TIM2_EventSource_Trigger: Trigger
  • TIM2_EventSource_Break: Break
Return values:
None

Definition at line 1445 of file stm8l15x_tim2.c.

References IS_TIM2_EVENT_SOURCE, and TIM2.

FlagStatus TIM2_GetFlagStatus ( TIM2_FLAG_TypeDef  TIM2_FLAG)

Checks whether the specified TIM2 flag is set or not.

Parameters:
TIM2_FLAG,:Specifies the flag to check. This parameter can be any combination of the following values:
  • TIM2_FLAG_Update: Update
  • TIM2_FLAG_CC1: Capture Compare Channel1
  • TIM2_FLAG_CC2: Capture Compare Channel2
  • TIM2_FLAG_Trigger: Trigger
  • TIM2_FLAG_Break: Break
  • TIM2_FLAG_CC1OF: Capture compare 1 over capture
  • TIM2_FLAG_CC2OF: Capture compare 2 over capture
Return values:
FlagStatus,:The new state of TIM2_FLAG (SET or RESET)

Definition at line 1467 of file stm8l15x_tim2.c.

References IS_TIM2_GET_FLAG, RESET, SET, and TIM2.

ITStatus TIM2_GetITStatus ( TIM2_IT_TypeDef  TIM2_IT)

Checks whether the TIM2 interrupt has occurred or not.

Parameters:
TIM2_IT,:Specifies the TIM2 interrupt source to check. This parameter can be any combination of the following values:
  • TIM2_IT_Update: Update
  • TIM2_IT_CC1: Capture Compare Channel1
  • TIM2_IT_CC2: Capture Compare Channel2
  • TIM2_IT_Trigger: Trigger
  • TIM2_IT_Break: Break
Return values:
ITStatus,:The new state of the TIM2_IT (SET or RESET)

Definition at line 1520 of file stm8l15x_tim2.c.

References IS_TIM2_GET_IT, RESET, SET, and TIM2.

void TIM2_ITConfig ( TIM2_IT_TypeDef  TIM2_IT,
FunctionalState  NewState 
)

Enables or disables the specified TIM2 interrupts.

Parameters:
TIM2_IT,:Specifies the TIM2 interrupts sources to be enabled or disabled. This parameter can be any combination of the following values:
  • TIM2_IT_Update: Update
  • TIM2_IT_CC1: Capture Compare Channel1
  • TIM2_IT_CC2: Capture Compare Channel2
  • TIM2_IT_Trigger: Trigger
  • TIM2_IT_Break: Break
NewState,:The new state of the TIM2 peripheral. This parameter can be ENABLE or DISABLE
Return values:
None

Definition at line 1416 of file stm8l15x_tim2.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM2_IT, and TIM2.

void TIM2_SelectCCDMA ( FunctionalState  NewState)

Selects the TIM2 peripheral Capture Compare DMA source.

Parameters:
NewState,:new state of the Capture Compare DMA source. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1599 of file stm8l15x_tim2.c.

References DISABLE, IS_FUNCTIONAL_STATE, TIM2, and TIM_CR2_CCDS.

STM8S Firmware Library: Overview

 

 

 

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