Functions

Injected channels Configuration functions. More...

Collaboration diagram for Injected channels Configuration functions:

Functions

void ADC_AutoInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the selected ADC automatic injected group conversion after regular one. More...
 
void ADC_ExternalTrigInjectedConvConfig (ADC_TypeDef *ADCx, uint32_t ADC_ExternalTrigInjecConv)
 Configures the ADCx external trigger for injected channels conversion. More...
 
void ADC_ExternalTrigInjectedConvEdgeConfig (ADC_TypeDef *ADCx, uint32_t ADC_ExternalTrigInjecConvEdge)
 Configures the ADCx external trigger edge for injected channels conversion. More...
 
uint16_t ADC_GetInjectedConversionValue (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel)
 Returns the ADC injected channel conversion result. More...
 
FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC Software start injected conversion Status. More...
 
FlagStatus ADC_GetStartInjectedConversionStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC Software start injected conversion Status. More...
 
void ADC_InjectedChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
 Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time. More...
 
void ADC_InjectedChannelSampleTimeConfig (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel, uint8_t ADC_SampleTime)
 Configures for the selected ADC injected channel its corresponding sample time. More...
 
void ADC_InjectedDiscModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the discontinuous mode for injected group channel for the specified ADC. More...
 
void ADC_InjectedSequencerLengthConfig (ADC_TypeDef *ADCx, uint8_t Length)
 Configures the sequencer length for injected channels. More...
 
void ADC_SetInjectedOffset (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel, uint16_t Offset)
 Set the injected channels conversion value offset. More...
 
void ADC_SoftwareStartInjectedConv (ADC_TypeDef *ADCx)
 Enables the selected ADC software start conversion of the injected channels. More...
 
void ADC_StartInjectedConversion (ADC_TypeDef *ADCx)
 Enables or disables the selected ADC start of the injected channels conversion. More...
 
void ADC_StopInjectedConversion (ADC_TypeDef *ADCx)
 Stops the selected ADC ongoing injected conversion. More...
 

Detailed Description

Injected channels Configuration functions.

 ===============================================================================
              ##### Injected channels Configuration functions #####
 ===============================================================================  

    [..] This section provide functions allowing to configure the ADC Injected channels,
         it is composed of 2 sub sections : 
    
      (#) Configuration functions for Injected channels: This subsection provides 
          functions allowing to configure the ADC injected channels :    
        (++) Configure the rank in the injected group sequencer for each channel
        (++) Configure the sampling time for each channel    
        (++) Activate the Auto injected Mode  
        (++) Activate the Discontinuous Mode 
        (++) scan mode activation  
        (++) External/software trigger source   
        (++) External trigger edge 
        (++) injected channels sequencer.
    
      (#) Get the Specified Injected channel conversion data: This subsection 
          provides an important function in the ADC peripheral since it returns the 
          converted data of the specific injected channel.
 ===============================================================================
                     ##### Injected channels Configuration functions #####
 ===============================================================================  

  [..] This section provide functions allowing to manage the ADC Injected channels,
  it is composed of : 
    
   (#) Configuration functions for Injected channels sample time
   (#) Functions to start and stop the injected conversion
   (#) unction to select the discontinuous mode    
   (#) Function to get the Specified Injected channel conversion data: This subsection 
      provides an important function in the ADC peripheral since it returns the 
      converted data of the specific injected channel.

Function Documentation

void ADC_AutoInjectedConvCmd ( ADC_TypeDef ADCx,
FunctionalState  NewState 
)

Enables or disables the selected ADC automatic injected group conversion after regular one.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
NewStatenew state of the selected ADC auto injected conversion This parameter can be: ENABLE or DISABLE.
Return values
None
Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewStatenew state of the selected ADC auto injected conversion This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1419 of file stm32f4xx_adc.c.

void ADC_ExternalTrigInjectedConvConfig ( ADC_TypeDef ADCx,
uint32_t  ADC_ExternalTrigInjecConv 
)

Configures the ADCx external trigger for injected channels conversion.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
ADC_ExternalTrigInjecConvspecifies the ADC trigger to start injected conversion. This parameter can be one of the following values:
  • ADC_ExternalTrigInjecConv_T1_CC4: Timer1 capture compare4 selected
  • ADC_ExternalTrigInjecConv_T1_TRGO: Timer1 TRGO event selected
  • ADC_ExternalTrigInjecConv_T2_CC1: Timer2 capture compare1 selected
  • ADC_ExternalTrigInjecConv_T2_TRGO: Timer2 TRGO event selected
  • ADC_ExternalTrigInjecConv_T3_CC2: Timer3 capture compare2 selected
  • ADC_ExternalTrigInjecConv_T3_CC4: Timer3 capture compare4 selected
  • ADC_ExternalTrigInjecConv_T4_CC1: Timer4 capture compare1 selected
  • ADC_ExternalTrigInjecConv_T4_CC2: Timer4 capture compare2 selected
  • ADC_ExternalTrigInjecConv_T4_CC3: Timer4 capture compare3 selected
  • ADC_ExternalTrigInjecConv_T4_TRGO: Timer4 TRGO event selected
  • ADC_ExternalTrigInjecConv_T5_CC4: Timer5 capture compare4 selected
  • ADC_ExternalTrigInjecConv_T5_TRGO: Timer5 TRGO event selected
  • ADC_ExternalTrigInjecConv_T8_CC2: Timer8 capture compare2 selected
  • ADC_ExternalTrigInjecConv_T8_CC3: Timer8 capture compare3 selected
  • ADC_ExternalTrigInjecConv_T8_CC4: Timer8 capture compare4 selected
  • ADC_ExternalTrigInjecConv_Ext_IT15: External interrupt line 15 event selected
Return values
None

Definition at line 1322 of file stm32f4xx_adc.c.

void ADC_ExternalTrigInjectedConvEdgeConfig ( ADC_TypeDef ADCx,
uint32_t  ADC_ExternalTrigInjecConvEdge 
)

Configures the ADCx external trigger edge for injected channels conversion.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
ADC_ExternalTrigInjecConvEdgespecifies the ADC external trigger edge to start injected conversion. This parameter can be one of the following values:
  • ADC_ExternalTrigInjecConvEdge_None: external trigger disabled for injected conversion
  • ADC_ExternalTrigInjecConvEdge_Rising: detection on rising edge
  • ADC_ExternalTrigInjecConvEdge_Falling: detection on falling edge
  • ADC_ExternalTrigInjecConvEdge_RisingFalling: detection on both rising and falling edge
Return values
None

Definition at line 1356 of file stm32f4xx_adc.c.

uint16_t ADC_GetInjectedConversionValue ( ADC_TypeDef ADCx,
uint8_t  ADC_InjectedSequence 
)

Returns the ADC injected channel conversion result.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
ADC_InjectedChannelthe converted ADC injected channel. This parameter can be one of the following values:
  • ADC_InjectedChannel_1: Injected Channel1 selected
  • ADC_InjectedChannel_2: Injected Channel2 selected
  • ADC_InjectedChannel_3: Injected Channel3 selected
  • ADC_InjectedChannel_4: Injected Channel4 selected
Return values
TheData conversion value.
Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_InjectedSequencethe converted ADC injected sequence. This parameter can be one of the following values:
  • ADC_InjectedSequence_1: Injected Sequence1 selected
  • ADC_InjectedSequence_2: Injected Sequence2 selected
  • ADC_InjectedSequence_3: Injected Sequence3 selected
  • ADC_InjectedSequence_4: Injected Sequence4 selected
Return values
TheData conversion value.

Definition at line 1473 of file stm32f4xx_adc.c.

FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus ( ADC_TypeDef ADCx)

Gets the selected ADC Software start injected conversion Status.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
Return values
Thenew state of ADC software start injected conversion (SET or RESET).

Definition at line 1390 of file stm32f4xx_adc.c.

FlagStatus ADC_GetStartInjectedConversionStatus ( ADC_TypeDef ADCx)

Gets the selected ADC Software start injected conversion Status.

Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
Return values
Thenew state of ADC start injected conversion (SET or RESET).

Definition at line 1921 of file stm32f30x_adc.c.

void ADC_InjectedChannelConfig ( ADC_TypeDef ADCx,
uint8_t  ADC_Channel,
uint8_t  Rank,
uint8_t  ADC_SampleTime 
)

Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
ADC_Channelthe ADC channel to configure. This parameter can be one of the following values:
  • ADC_Channel_0: ADC Channel0 selected
  • ADC_Channel_1: ADC Channel1 selected
  • ADC_Channel_2: ADC Channel2 selected
  • ADC_Channel_3: ADC Channel3 selected
  • ADC_Channel_4: ADC Channel4 selected
  • ADC_Channel_5: ADC Channel5 selected
  • ADC_Channel_6: ADC Channel6 selected
  • ADC_Channel_7: ADC Channel7 selected
  • ADC_Channel_8: ADC Channel8 selected
  • ADC_Channel_9: ADC Channel9 selected
  • ADC_Channel_10: ADC Channel10 selected
  • ADC_Channel_11: ADC Channel11 selected
  • ADC_Channel_12: ADC Channel12 selected
  • ADC_Channel_13: ADC Channel13 selected
  • ADC_Channel_14: ADC Channel14 selected
  • ADC_Channel_15: ADC Channel15 selected
  • ADC_Channel_16: ADC Channel16 selected
  • ADC_Channel_17: ADC Channel17 selected
  • ADC_Channel_18: ADC Channel18 selected
RankThe rank in the injected group sequencer. This parameter must be between 1 to 4.
ADC_SampleTimeThe sample time value to be set for the selected channel. This parameter can be one of the following values:
  • ADC_SampleTime_3Cycles: Sample time equal to 3 cycles
  • ADC_SampleTime_15Cycles: Sample time equal to 15 cycles
  • ADC_SampleTime_28Cycles: Sample time equal to 28 cycles
  • ADC_SampleTime_56Cycles: Sample time equal to 56 cycles
  • ADC_SampleTime_84Cycles: Sample time equal to 84 cycles
  • ADC_SampleTime_112Cycles: Sample time equal to 112 cycles
  • ADC_SampleTime_144Cycles: Sample time equal to 144 cycles
  • ADC_SampleTime_480Cycles: Sample time equal to 480 cycles
Return values
None

Definition at line 1186 of file stm32f4xx_adc.c.

void ADC_InjectedChannelSampleTimeConfig ( ADC_TypeDef ADCx,
uint8_t  ADC_InjectedChannel,
uint8_t  ADC_SampleTime 
)

Configures for the selected ADC injected channel its corresponding sample time.

Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_Channelthe ADC channel to configure. This parameter can be one of the following values:
  • ADC_InjectedChannel_1: ADC Channel1 selected
  • ADC_InjectedChannel_2: ADC Channel2 selected
  • ADC_InjectedChannel_3: ADC Channel3 selected
  • ADC_InjectedChannel_4: ADC Channel4 selected
  • ADC_InjectedChannel_5: ADC Channel5 selected
  • ADC_InjectedChannel_6: ADC Channel6 selected
  • ADC_InjectedChannel_7: ADC Channel7 selected
  • ADC_InjectedChannel_8: ADC Channel8 selected
  • ADC_InjectedChannel_9: ADC Channel9 selected
  • ADC_InjectedChannel_10: ADC Channel10 selected
  • ADC_InjectedChannel_11: ADC Channel11 selected
  • ADC_InjectedChannel_12: ADC Channel12 selected
  • ADC_InjectedChannel_13: ADC Channel13 selected
  • ADC_InjectedChannel_14: ADC Channel14 selected
  • ADC_InjectedChannel_15: ADC Channel15 selected
  • ADC_InjectedChannel_16: ADC Channel16 selected
  • ADC_InjectedChannel_17: ADC Channel17 selected
  • ADC_InjectedChannel_18: ADC Channel18 selected
ADC_SampleTimeThe sample time value to be set for the selected channel. This parameter can be one of the following values:
  • ADC_SampleTime_1Cycles5: Sample time equal to 1.5 cycles
  • ADC_SampleTime_2Cycles5: Sample time equal to 2.5 cycles
  • ADC_SampleTime_4Cycles5: Sample time equal to 4.5 cycles
  • ADC_SampleTime_7Cycles5: Sample time equal to 7.5 cycles
  • ADC_SampleTime_19Cycles5: Sample time equal to 19.5 cycles
  • ADC_SampleTime_61Cycles5: Sample time equal to 61.5 cycles
  • ADC_SampleTime_181Cycles5: Sample time equal to 181.5 cycles
  • ADC_SampleTime_601Cycles5: Sample time equal to 601.5 cycles
Return values
None

Definition at line 1853 of file stm32f30x_adc.c.

void ADC_InjectedDiscModeCmd ( ADC_TypeDef ADCx,
FunctionalState  NewState 
)

Enables or disables the discontinuous mode for injected group channel for the specified ADC.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
NewStatenew state of the selected ADC discontinuous mode on injected group channel. This parameter can be: ENABLE or DISABLE.
Return values
None
Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewStatenew state of the selected ADC discontinuous mode on injected group channel. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1445 of file stm32f4xx_adc.c.

void ADC_InjectedSequencerLengthConfig ( ADC_TypeDef ADCx,
uint8_t  Length 
)

Configures the sequencer length for injected channels.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
LengthThe sequencer length. This parameter must be a number between 1 to 4.
Return values
None

Definition at line 1249 of file stm32f4xx_adc.c.

void ADC_SetInjectedOffset ( ADC_TypeDef ADCx,
uint8_t  ADC_InjectedChannel,
uint16_t  Offset 
)

Set the injected channels conversion value offset.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
ADC_InjectedChannelthe ADC injected channel to set its offset. This parameter can be one of the following values:
  • ADC_InjectedChannel_1: Injected Channel1 selected
  • ADC_InjectedChannel_2: Injected Channel2 selected
  • ADC_InjectedChannel_3: Injected Channel3 selected
  • ADC_InjectedChannel_4: Injected Channel4 selected
Offsetthe offset value for the selected ADC injected channel This parameter must be a 12bit value.
Return values
None

Definition at line 1284 of file stm32f4xx_adc.c.

void ADC_SoftwareStartInjectedConv ( ADC_TypeDef ADCx)

Enables the selected ADC software start conversion of the injected channels.

Parameters
ADCxwhere x can be 1, 2 or 3 to select the ADC peripheral.
Return values
None

Definition at line 1377 of file stm32f4xx_adc.c.

void ADC_StartInjectedConversion ( ADC_TypeDef ADCx)

Enables or disables the selected ADC start of the injected channels conversion.

Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewStatenew state of the selected ADC software start injected conversion. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1892 of file stm32f30x_adc.c.

void ADC_StopInjectedConversion ( ADC_TypeDef ADCx)

Stops the selected ADC ongoing injected conversion.

Parameters
ADCxwhere x can be 1, 2, 3 or 4 to select the ADC peripheral.
Return values
None

Definition at line 1907 of file stm32f30x_adc.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:55