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 TIM1_ClearFlag (TIM1_FLAG_TypeDef TIM1_FLAG)
 Clears the TIM1�s pending flags.
void TIM1_ClearITPendingBit (TIM1_IT_TypeDef TIM1_IT)
 Clears the TIM1's interrupt pending bits.
void TIM1_DMACmd (TIM1_DMASource_TypeDef TIM1_DMASource, FunctionalState NewState)
 Enables or disables the TIM�s DMA Requests.
void TIM1_DMAConfig (TIM1_DMABase_TypeDef TIM1_DMABase, TIM1_DMABurstLength_TypeDef TIM1_DMABurstLength)
 Configures the TIM1�s DMA interface.
void TIM1_GenerateEvent (TIM1_EventSource_TypeDef TIM1_EventSource)
 Configures the TIM1 event to be generated by software.
FlagStatus TIM1_GetFlagStatus (TIM1_FLAG_TypeDef TIM1_FLAG)
 Checks whether the specified TIM1 flag is set or not.
ITStatus TIM1_GetITStatus (TIM1_IT_TypeDef TIM1_IT)
 Checks whether the TIM1 interrupt has occurred or not.
void TIM1_ITConfig (TIM1_IT_TypeDef TIM1_IT, FunctionalState NewState)
 Enables or disables the specified TIM1 interrupts.
void TIM1_SelectCCDMA (FunctionalState NewState)
 Selects the TIM1 peripheral Capture Compare DMA source.

Detailed Description

Interrupts, DMA and flags management functions.

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


Function Documentation

void TIM1_ClearFlag ( TIM1_FLAG_TypeDef  TIM1_FLAG)

Clears the TIM1�s pending flags.

Parameters:
TIM1_FLAGspecifies the flag to clear. This parameter can be one of the following values:
  • TIM1_FLAG_Update: TIM1 update Flag
  • TIM1_FLAG_CC1: TIM1 Capture Compare 1 Flag
  • TIM1_FLAG_CC2: TIM1 Capture Compare 2 Flag
  • TIM1_FLAG_CC3: TIM1 Capture Compare 3 Flag
  • TIM1_FLAG_CC4: TIM1 Capture Compare 4 Flag
  • TIM1_FLAG_COM: TIM1 Commutation Flag
  • TIM1_FLAG_Trigger: TIM1 Trigger Flag
  • TIM1_FLAG_Break: TIM1 Break Flag
  • TIM1_FLAG_CC1OF: TIM1 Capture Compare 1 overcapture Flag
  • TIM1_FLAG_CC2OF: TIM1 Capture Compare 2 overcapture Flag
  • TIM1_FLAG_CC3OF: TIM1 Capture Compare 3 overcapture Flag
  • TIM1_FLAG_CC4OF: TIM1 Capture Compare 4 overcapture Flag
Return values:
None.

Definition at line 2083 of file stm8l15x_tim1.c.

References IS_TIM1_CLEAR_FLAG, and TIM1.

void TIM1_ClearITPendingBit ( TIM1_IT_TypeDef  TIM1_IT)

Clears the TIM1's interrupt pending bits.

Parameters:
TIM1_ITspecifies the pending bit to clear. This parameter can be any combination of the following values:
  • TIM1_IT_Update: Update
  • TIM1_IT_CC1: Capture Compare Channel1
  • TIM1_IT_CC2: Capture Compare Channel2
  • TIM1_IT_CC3: Capture Compare Channel3
  • TIM1_IT_CC4: Capture Compare Channel4
  • TIM1_IT_COM: Commutation
  • TIM1_IT_Trigger: Trigger
  • TIM1_IT_Break: Break
Return values:
None.

Definition at line 2146 of file stm8l15x_tim1.c.

References IS_TIM1_IT, and TIM1.

void TIM1_DMACmd ( TIM1_DMASource_TypeDef  TIM1_DMASource,
FunctionalState  NewState 
)

Enables or disables the TIM�s DMA Requests.

Parameters:
TIM1_DMASources,:specifies the DMA Request sources. This parameter can be any combination of the following values:
  • TIM1_DMA_Update: TIM1 update Interrupt source
  • DMA_Trigger: TIM1 Trigger DMA source
NewStatenew state of the DMA Request sources. This parameter can be: ENABLE or DISABLE.
Return values:
None.

Definition at line 2183 of file stm8l15x_tim1.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM1_DMA_SOURCE, and TIM1.

void TIM1_DMAConfig ( TIM1_DMABase_TypeDef  TIM1_DMABase,
TIM1_DMABurstLength_TypeDef  TIM1_DMABurstLength 
)

Configures the TIM1�s DMA interface.

Parameters:
TIM1_DMABase,:DMA Base address.
TIM1_DMABurstLength,:DMA Burst length.
Return values:
None.

Definition at line 2161 of file stm8l15x_tim1.c.

References IS_TIM1_DMABase, IS_TIM1_DMABurstLength, and TIM1.

void TIM1_GenerateEvent ( TIM1_EventSource_TypeDef  TIM1_EventSource)

Configures the TIM1 event to be generated by software.

Parameters:
TIM1_EventSourcespecifies the event source. This parameter can be any combination of the following values:
  • TIM1_EventSource_Update: Update
  • TIM1_EventSource_CC1: Capture Compare Channel1
  • TIM1_EventSource_CC2: Capture Compare Channel2
  • TIM1_EventSource_CC3: Capture Compare Channel3
  • TIM1_EventSource_CC4: Capture Compare Channel4
  • TIM1_EventSource_COM: Commutation
  • TIM1_EventSource_Trigger: Trigger
  • TIM1_EventSource_Break: Break
Return values:
None

Definition at line 2017 of file stm8l15x_tim1.c.

References IS_TIM1_EVENT_SOURCE, and TIM1.

FlagStatus TIM1_GetFlagStatus ( TIM1_FLAG_TypeDef  TIM1_FLAG)

Checks whether the specified TIM1 flag is set or not.

Parameters:
TIM1_FLAGspecifies the flag to check. This parameter can be one of the following values:
  • TIM1_FLAG_Update: TIM1 update Flag
  • TIM1_FLAG_CC1: TIM1 Capture Compare 1 Flag
  • TIM1_FLAG_CC2: TIM1 Capture Compare 2 Flag
  • TIM1_FLAG_CC3: TIM1 Capture Compare 3 Flag
  • TIM1_FLAG_CC4: TIM1 Capture Compare 4 Flag
  • TIM1_FLAG_COM: TIM1 Commutation Flag
  • TIM1_FLAG_Trigger: TIM1 Trigger Flag
  • TIM1_FLAG_Break: TIM1 Break Flag
  • TIM1_FLAG_CC1OF: TIM1 Capture Compare 1 overcapture Flag
  • TIM1_FLAG_CC2OF: TIM1 Capture Compare 2 overcapture Flag
  • TIM1_FLAG_CC3OF: TIM1 Capture Compare 3 overcapture Flag
  • TIM1_FLAG_CC4OF: TIM1 Capture Compare 4 overcapture Flag
Return values:
FlagStatusThe new state of TIM1_FLAG (SET or RESET).

Definition at line 2043 of file stm8l15x_tim1.c.

References IS_TIM1_GET_FLAG, RESET, SET, and TIM1.

ITStatus TIM1_GetITStatus ( TIM1_IT_TypeDef  TIM1_IT)

Checks whether the TIM1 interrupt has occurred or not.

Parameters:
TIM1_ITspecifies the TIM1 interrupt source to check. This parameter can be any combination of the following values:
  • TIM1_IT_Update: Update
  • TIM1_IT_CC1: Capture Compare Channel1
  • TIM1_IT_CC2: Capture Compare Channel2
  • TIM1_IT_CC3: Capture Compare Channel3
  • TIM1_IT_CC4: Capture Compare Channel4
  • TIM1_IT_COM: Commutation
  • TIM1_IT_Trigger: Trigger
  • TIM1_IT_Break: Break
Return values:
ITStatusThe new state of the TIM1_IT(SET or RESET).

Definition at line 2108 of file stm8l15x_tim1.c.

References IS_TIM1_GET_IT, RESET, SET, and TIM1.

void TIM1_ITConfig ( TIM1_IT_TypeDef  TIM1_IT,
FunctionalState  NewState 
)

Enables or disables the specified TIM1 interrupts.

Parameters:
NewStatenew state of the TIM1 peripheral. This parameter can be: ENABLE or DISABLE.
TIM1_ITspecifies the TIM1 interrupts sources to be enabled or disabled. This parameter can be any combination of the following values:
  • TIM1_IT_Update: Update
  • TIM1_IT_CC1: Capture Compare Channel1
  • TIM1_IT_CC2: Capture Compare Channel2
  • TIM1_IT_CC3: Capture Compare Channel3
  • TIM1_IT_CC4: Capture Compare Channel4
  • TIM1_IT_COM: Commutation
  • TIM1_IT_Trigger: Trigger
  • TIM1_IT_Break: Break
NewStatenew state of the TIM1 peripheral.
Return values:
None

Definition at line 1985 of file stm8l15x_tim1.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM1_IT, and TIM1.

void TIM1_SelectCCDMA ( FunctionalState  NewState)

Selects the TIM1 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 2207 of file stm8l15x_tim1.c.

References DISABLE, IS_FUNCTIONAL_STATE, TIM1, and TIM1_CR2_CCDS.

STM8S Firmware Library: Overview

 

 

 

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