Rajath Ravi / Mbed 2 deprecated ravi_blinkycode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Interrupts and flags management functions

Interrupts and flags management functions
[ADC_Private_Functions]

Interrupts and flags management functions. More...

Functions

void ADC_ITConfig_mort (ADC_TypeDef_mort *ADCx, uint16_t ADC_IT, FunctionalState NewState)
 Enables or disables the specified ADC interrupts.
FlagStatus ADC_GetFlagStatus_mort (ADC_TypeDef_mort *ADCx, uint8_t ADC_FLAG)
 Checks whether the specified ADC flag is set or not.
void ADC_ClearFlag_mort (ADC_TypeDef_mort *ADCx, uint8_t ADC_FLAG)
 Clears the ADCx's pending flags.
ITStatus ADC_GetITStatus_mort (ADC_TypeDef_mort *ADCx, uint16_t ADC_IT)
 Checks whether the specified ADC interrupt has occurred or not.
void ADC_ClearITPendingBit_mort (ADC_TypeDef_mort *ADCx, uint16_t ADC_IT)
 Clears the ADCx's interrupt pending bits.

Detailed Description

Interrupts and flags management functions.

 ===============================================================================
            ##### Interrupts and flags management functions #####
 ===============================================================================  

    [..] This section provides functions allowing to configure the ADC Interrupts 
         and to get the status and clear flags and Interrupts pending bits.
  
    [..] Each ADC provides 4 Interrupts sources and 6 Flags which can be divided
        into 3 groups:
  
  *** Flags and Interrupts for ADC regular channels ***
  =====================================================
    [..]
      (+) Flags :
        (##) ADC_FLAG_OVR_MORT : Overrun detection when regular converted data are lost

        (##) ADC_FLAG_EOC_MORT : Regular channel end of conversion ==> to indicate 
             (depending on EOCS bit, managed by ADC_EOCOnEachRegularChannelCmd() )
             the end of:
             (+++) a regular CHANNEL conversion 
             (+++) sequence of regular GROUP conversions .

        (##) ADC_FLAG_STRT_MORT: Regular channel start ==> to indicate when regular 
             CHANNEL conversion starts.
    [..]
      (+) Interrupts :
        (##) ADC_IT_OVR_MORT : specifies the interrupt source for Overrun detection 
             event.  
        (##) ADC_IT_EOC_MORT : specifies the interrupt source for Regular channel end
             of conversion event.
  
  
  *** Flags and Interrupts for ADC Injected channels ***
  ======================================================
    [..]
      (+) Flags :
        (##) ADC_FLAG_JEOC_MORT : Injected channel end of conversion ==> to indicate 
             at the end of injected GROUP conversion  
              
        (##) ADC_FLAG_JSTRT_MORT: Injected channel start ==> to indicate hardware when 
             injected GROUP conversion starts.
    [..]
      (+) Interrupts :
        (##) ADC_IT_JEOC_MORT : specifies the interrupt source for Injected channel 
             end of conversion event.     

  *** General Flags and Interrupts for the ADC ***
  ================================================ 
    [..]
      (+)Flags :
        (##) ADC_FLAG_AWD_MORT: Analog watchdog ==> to indicate if the converted voltage 
             crosses the programmed thresholds values.
    [..]          
      (+) Interrupts :
        (##) ADC_IT_AWD_MORT : specifies the interrupt source for Analog watchdog event. 

  
    [..] The user should identify which mode will be used in his application to 
         manage the ADC controller events: Polling mode or Interrupt mode.
  
    [..] In the Polling Mode it is advised to use the following functions:
      (+) ADC_GetFlagStatus() : to check if flags events occur. 
      (+) ADC_ClearFlag()     : to clear the flags events.
      
    [..] In the Interrupt Mode it is advised to use the following functions:
      (+) ADC_ITConfig()          : to enable or disable the interrupt source.
      (+) ADC_GetITStatus()       : to check if Interrupt occurs.
      (+) ADC_ClearITPendingBit() : to clear the Interrupt pending Bit 
                                   (corresponding Flag). 

Function Documentation

void ADC_ClearFlag_mort ( ADC_TypeDef_mort *  ADCx,
uint8_t  ADC_FLAG 
)

Clears the ADCx's pending flags.

Parameters:
ADCx,:where x can be 1, 2 or 3 to select the ADC peripheral.
ADC_FLAG,:specifies the flag to clear. This parameter can be any combination of the following values:

  • ADC_FLAG_AWD_MORT: Analog watchdog flag
  • ADC_FLAG_EOC_MORT: End of conversion flag
  • ADC_FLAG_JEOC_MORT: End of injected group conversion flag
  • ADC_FLAG_JSTRT_MORT: Start of injected group conversion flag
  • ADC_FLAG_STRT_MORT: Start of regular group conversion flag
  • ADC_FLAG_OVR_MORT: Overrun flag
Return values:
None

Definition at line 1656 of file stm32f4xx_adc_mort.c.

void ADC_ClearITPendingBit_mort ( ADC_TypeDef_mort *  ADCx,
uint16_t  ADC_IT 
)

Clears the ADCx's interrupt pending bits.

Parameters:
ADCx,:where x can be 1, 2 or 3 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt pending bit to clear. This parameter can be one of the following values:

  • ADC_IT_EOC_MORT: End of conversion interrupt mask
  • ADC_IT_AWD_MORT: Analog watchdog interrupt mask
  • ADC_IT_JEOC_MORT: End of injected conversion interrupt mask
  • ADC_IT_OVR_MORT: Overrun interrupt mask
Return values:
None

Definition at line 1718 of file stm32f4xx_adc_mort.c.

FlagStatus ADC_GetFlagStatus_mort ( ADC_TypeDef_mort *  ADCx,
uint8_t  ADC_FLAG 
)

Checks whether the specified ADC flag is set or not.

Parameters:
ADCx,:where x can be 1, 2 or 3 to select the ADC peripheral.
ADC_FLAG,:specifies the flag to check. This parameter can be one of the following values:

  • ADC_FLAG_AWD_MORT: Analog watchdog flag
  • ADC_FLAG_EOC_MORT: End of conversion flag
  • ADC_FLAG_JEOC_MORT: End of injected group conversion flag
  • ADC_FLAG_JSTRT_MORT: Start of injected group conversion flag
  • ADC_FLAG_STRT_MORT: Start of regular group conversion flag
  • ADC_FLAG_OVR_MORT: Overrun flag
Return values:
Thenew state of ADC_FLAG (SET or RESET).

Definition at line 1621 of file stm32f4xx_adc_mort.c.

ITStatus ADC_GetITStatus_mort ( ADC_TypeDef_mort *  ADCx,
uint16_t  ADC_IT 
)

Checks whether the specified ADC interrupt has occurred or not.

Parameters:
ADCx,:where x can be 1, 2 or 3 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt source to check. This parameter can be one of the following values:

  • ADC_IT_EOC_MORT: End of conversion interrupt mask
  • ADC_IT_AWD_MORT: Analog watchdog interrupt mask
  • ADC_IT_JEOC_MORT: End of injected conversion interrupt mask
  • ADC_IT_OVR_MORT: Overrun interrupt mask
Return values:
Thenew state of ADC_IT (SET or RESET).

Definition at line 1677 of file stm32f4xx_adc_mort.c.

void ADC_ITConfig_mort ( ADC_TypeDef_mort *  ADCx,
uint16_t  ADC_IT,
FunctionalState  NewState 
)

Enables or disables the specified ADC interrupts.

Parameters:
ADCx,:where x can be 1, 2 or 3 to select the ADC peripheral.
ADC_IT,:specifies the ADC interrupt sources to be enabled or disabled. This parameter can be one of the following values:

  • ADC_IT_EOC_MORT: End of conversion interrupt mask
  • ADC_IT_AWD_MORT: Analog watchdog interrupt mask
  • ADC_IT_JEOC_MORT: End of injected conversion interrupt mask
  • ADC_IT_OVR_MORT: Overrun interrupt enable
NewState,:new state of the specified ADC interrupts. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1584 of file stm32f4xx_adc_mort.c.