Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Initialization and Configuration functions

Initialization and Configuration functions
[ADC_Private_Functions]

Initialization and Configuration functions. More...

Functions

void ADC_DeInit (ADC_TypeDef *ADCx)
 Deinitializes the ADCx peripheral registers to their default reset values.
void ADC_Init (ADC_TypeDef *ADCx, ADC_InitTypeDef *ADC_InitStruct)
 Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.
void ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct)
 Fills each ADC_InitStruct member with its default value.
void ADC_InjectedInit (ADC_TypeDef *ADCx, ADC_InjectedInitTypeDef *ADC_InjectedInitStruct)
 Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.
void ADC_InjectedStructInit (ADC_InjectedInitTypeDef *ADC_InjectedInitStruct)
 Fills each ADC_InjectedInitStruct member with its default value.
void ADC_CommonInit (ADC_TypeDef *ADCx, ADC_CommonInitTypeDef *ADC_CommonInitStruct)
 Initializes the ADCs peripherals according to the specified parameters in the ADC_CommonInitStruct.
void ADC_CommonStructInit (ADC_CommonInitTypeDef *ADC_CommonInitStruct)
 Fills each ADC_CommonInitStruct member with its default value.
void ADC_Cmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the specified ADC peripheral.
void ADC_StartCalibration (ADC_TypeDef *ADCx)
 Starts the selected ADC calibration process.
uint32_t ADC_GetCalibrationValue (ADC_TypeDef *ADCx)
 Returns the ADCx calibration value.
void ADC_SetCalibrationValue (ADC_TypeDef *ADCx, uint32_t ADC_Calibration)
 Sets the ADCx calibration register.
void ADC_SelectCalibrationMode (ADC_TypeDef *ADCx, uint32_t ADC_CalibrationMode)
 Select the ADC calibration mode.
FlagStatus ADC_GetCalibrationStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC calibration status.
void ADC_DisableCmd (ADC_TypeDef *ADCx)
 ADC Disable Command.
FlagStatus ADC_GetDisableCmdStatus (ADC_TypeDef *ADCx)
 Gets the selected ADC disable command Status.
void ADC_VoltageRegulatorCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Enables or disables the specified ADC Voltage Regulator.
void ADC_SelectDifferentialMode (ADC_TypeDef *ADCx, uint8_t ADC_Channel, FunctionalState NewState)
 Selects the differential mode for a specific channel.
void ADC_SelectQueueOfContextMode (ADC_TypeDef *ADCx, FunctionalState NewState)
 Selects the Queue Of Context Mode for injected channels.
void ADC_AutoDelayCmd (ADC_TypeDef *ADCx, FunctionalState NewState)
 Selects the ADC Delayed Conversion Mode.

Detailed Description

Initialization and Configuration functions.

 ===============================================================================
                 ##### Initialization and Configuration functions  #####
 ===============================================================================  
  [..] 
  This section provides functions allowing to:
   (#) Initialize and configure the ADC injected and/or regular channels and dual mode.
   (#) Management of the calibration process
   (#) ADC Power-on Power-off
   (#) Single ended or differential mode 
   (#) Enabling the queue of context and the auto delay mode
   (#) The number of ADC conversions that will be done using the sequencer for regular 
       channel group
   (#) Enable or disable the ADC peripheral
   

Function Documentation

void ADC_AutoDelayCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Selects the ADC Delayed Conversion Mode.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewState,:new state of the ADC Delayed Conversion Mode. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 627 of file stm32f30x_adc.c.

void ADC_Cmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the specified ADC peripheral.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewState,:new state of the ADCx peripheral. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 379 of file stm32f30x_adc.c.

void ADC_CommonInit ( ADC_TypeDef *  ADCx,
ADC_CommonInitTypeDef *  ADC_CommonInitStruct 
)

Initializes the ADCs peripherals according to the specified parameters in the ADC_CommonInitStruct.

Parameters:
ADCx,:where x can be 1 or 4 to select the ADC peripheral.
ADC_CommonInitStruct,:pointer to an ADC_CommonInitTypeDef structure that contains the configuration information for All ADCs peripherals.
Return values:
None

Definition at line 295 of file stm32f30x_adc.c.

void ADC_CommonStructInit ( ADC_CommonInitTypeDef *  ADC_CommonInitStruct )

Fills each ADC_CommonInitStruct member with its default value.

Parameters:
ADC_CommonInitStruct,:pointer to an ADC_CommonInitTypeDef structure which will be initialized.
Return values:
None

Definition at line 353 of file stm32f30x_adc.c.

void ADC_DeInit ( ADC_TypeDef *  ADCx )

Deinitializes the ADCx peripheral registers to their default reset values.

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

Definition at line 139 of file stm32f30x_adc.c.

void ADC_DisableCmd ( ADC_TypeDef *  ADCx )

ADC Disable Command.

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

Definition at line 489 of file stm32f30x_adc.c.

FlagStatus ADC_GetCalibrationStatus ( ADC_TypeDef *  ADCx )

Gets the selected ADC calibration status.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
Return values:
Thenew state of ADC calibration (SET or RESET).

Definition at line 464 of file stm32f30x_adc.c.

uint32_t ADC_GetCalibrationValue ( ADC_TypeDef *  ADCx )

Returns the ADCx calibration value.

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

Definition at line 416 of file stm32f30x_adc.c.

FlagStatus ADC_GetDisableCmdStatus ( ADC_TypeDef *  ADCx )

Gets the selected ADC disable command Status.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
Return values:
Thenew state of ADC ADC disable command (SET or RESET).

Definition at line 504 of file stm32f30x_adc.c.

void ADC_Init ( ADC_TypeDef *  ADCx,
ADC_InitTypeDef *  ADC_InitStruct 
)

Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_InitStruct,:pointer to an ADC_InitTypeDef structure that contains the configuration information for the specified ADC peripheral.
Return values:
None

Definition at line 168 of file stm32f30x_adc.c.

void ADC_InjectedInit ( ADC_TypeDef *  ADCx,
ADC_InjectedInitTypeDef *  ADC_InjectedInitStruct 
)

Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_InjectInitStruct,:pointer to an ADC_InjecInitTypeDef structure that contains the configuration information for the specified ADC injected channel.
Return values:
None

Definition at line 239 of file stm32f30x_adc.c.

void ADC_InjectedStructInit ( ADC_InjectedInitTypeDef *  ADC_InjectedInitStruct )

Fills each ADC_InjectedInitStruct member with its default value.

Parameters:
ADC_InjectedInitStruct: pointer to an ADC_InjectedInitTypeDef structure which will be initialized.
Return values:
None

Definition at line 276 of file stm32f30x_adc.c.

void ADC_SelectCalibrationMode ( ADC_TypeDef *  ADCx,
uint32_t  ADC_CalibrationMode 
)

Select the ADC calibration mode.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_CalibrationMode,:the ADC calibration mode. This parameter can be one of the following values:

  • ADC_CalibrationMode_Single: to select the calibration for single channel
  • ADC_CalibrationMode_Differential: to select the calibration for differential channel
Return values:
None

Definition at line 448 of file stm32f30x_adc.c.

void ADC_SelectDifferentialMode ( ADC_TypeDef *  ADCx,
uint8_t  ADC_Channel,
FunctionalState  NewState 
)

Selects the differential mode for a specific channel.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
ADC_Channel,:the ADC channel to configure for the analog watchdog. This parameter can be one of the following values:

  • 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
Note:
: Channel 15, 16 and 17 are fixed to single-ended inputs mode.
Return values:
None

Definition at line 576 of file stm32f30x_adc.c.

void ADC_SelectQueueOfContextMode ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Selects the Queue Of Context Mode for injected channels.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewState,:new state of the Queue Of Context Mode. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 602 of file stm32f30x_adc.c.

void ADC_SetCalibrationValue ( ADC_TypeDef *  ADCx,
uint32_t  ADC_Calibration 
)

Sets the ADCx calibration register.

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

Definition at line 430 of file stm32f30x_adc.c.

void ADC_StartCalibration ( ADC_TypeDef *  ADCx )

Starts the selected ADC calibration process.

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

Definition at line 402 of file stm32f30x_adc.c.

void ADC_StructInit ( ADC_InitTypeDef *  ADC_InitStruct )

Fills each ADC_InitStruct member with its default value.

Parameters:
ADC_InitStruct: pointer to an ADC_InitTypeDef structure which will be initialized.
Return values:
None

Definition at line 218 of file stm32f30x_adc.c.

void ADC_VoltageRegulatorCmd ( ADC_TypeDef *  ADCx,
FunctionalState  NewState 
)

Enables or disables the specified ADC Voltage Regulator.

Parameters:
ADCx,:where x can be 1, 2, 3 or 4 to select the ADC peripheral.
NewState,:new state of the ADCx Voltage Regulator. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 532 of file stm32f30x_adc.c.