Modules | |
Initialization and Configuration functions | |
Initialization and Configuration functions. | |
Analog Watchdog configuration functions | |
Analog Watchdog configuration functions. | |
Temperature Sensor, Vrefint (Voltage Reference internal) | |
Temperature Sensor, Vrefint and VBAT management functions. | |
Regular Channels Configuration functions | |
Regular Channels Configuration functions. | |
Regular Channels DMA Configuration functions | |
Regular Channels DMA Configuration functions. | |
Injected channels Configuration functions | |
Injected channels Configuration functions. | |
Interrupts and flags management functions | |
Interrupts and flags management functions. | |
Functions | |
void | ADC_AnalogWatchdogCmd (ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog) |
Enables or disables the analog watchdog on single/all regular or injected channels. More... | |
void | ADC_AnalogWatchdogSingleChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel) |
Configures the analog watchdog guarded single channel. More... | |
void | ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold) |
Configures the high and low thresholds of the analog watchdog. More... | |
void | ADC_AutoInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the selected ADC automatic injected group conversion after regular one. More... | |
void | ADC_ClearFlag (ADC_TypeDef *ADCx, uint8_t ADC_FLAG) |
Clears the ADCx's pending flags. More... | |
void | ADC_ClearITPendingBit (ADC_TypeDef *ADCx, uint16_t ADC_IT) |
Clears the ADCx's interrupt pending bits. More... | |
void | ADC_Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the specified ADC peripheral. More... | |
void | ADC_DeInit (ADC_TypeDef *ADCx) |
Deinitializes the ADCx peripheral registers to their default reset values. More... | |
void | ADC_DiscModeChannelCountConfig (ADC_TypeDef *ADCx, uint8_t Number) |
Configures the discontinuous mode for the selected ADC regular group channel. More... | |
void | ADC_DiscModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the discontinuous mode on regular group channel for the specified ADC. More... | |
void | ADC_DMACmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the specified ADC DMA request. More... | |
void | ADC_ExternalTrigConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the ADCx conversion through external trigger. More... | |
void | ADC_ExternalTrigInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the ADCx injected channels conversion through external trigger. More... | |
void | ADC_ExternalTrigInjectedConvConfig (ADC_TypeDef *ADCx, uint32_t ADC_ExternalTrigInjecConv) |
Configures the ADCx external trigger for injected channels conversion. More... | |
FlagStatus | ADC_GetCalibrationStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC calibration status. More... | |
uint16_t | ADC_GetConversionValue (ADC_TypeDef *ADCx) |
Returns the last ADCx conversion result data for regular channel. More... | |
uint32_t | ADC_GetDualModeConversionValue (void) |
Returns the last ADC1 and ADC2 conversion result data in dual mode. More... | |
FlagStatus | ADC_GetFlagStatus (ADC_TypeDef *ADCx, uint8_t ADC_FLAG) |
Checks whether the specified ADC flag is set or not. More... | |
uint16_t | ADC_GetInjectedConversionValue (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel) |
Returns the ADC injected channel conversion result. More... | |
ITStatus | ADC_GetITStatus (ADC_TypeDef *ADCx, uint16_t ADC_IT) |
Checks whether the specified ADC interrupt has occurred or not. More... | |
FlagStatus | ADC_GetResetCalibrationStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC reset calibration registers status. More... | |
FlagStatus | ADC_GetSoftwareStartConvStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC Software start conversion Status. More... | |
FlagStatus | ADC_GetSoftwareStartInjectedConvCmdStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC Software start injected conversion Status. More... | |
void | ADC_Init (ADC_TypeDef *ADCx, ADC_InitTypeDef *ADC_InitStruct) |
Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct. 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_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_ITConfig (ADC_TypeDef *ADCx, uint16_t ADC_IT, FunctionalState NewState) |
Enables or disables the specified ADC interrupts. More... | |
void | ADC_RegularChannelConfig (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime) |
Configures for the selected ADC regular channel its corresponding rank in the sequencer and its sample time. More... | |
void | ADC_ResetCalibration (ADC_TypeDef *ADCx) |
Resets the selected ADC calibration registers. More... | |
void | ADC_SetInjectedOffset (ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel, uint16_t Offset) |
Set the injected channels conversion value offset. More... | |
void | ADC_SoftwareStartConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the selected ADC software start conversion . More... | |
void | ADC_SoftwareStartInjectedConvCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the selected ADC start of the injected channels conversion. More... | |
void | ADC_StartCalibration (ADC_TypeDef *ADCx) |
Starts the selected ADC calibration process. More... | |
void | ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct) |
Fills each ADC_InitStruct member with its default value. More... | |
void | ADC_TempSensorVrefintCmd (FunctionalState NewState) |
Enables or disables the temperature sensor and Vrefint channel. More... | |
void ADC_AnalogWatchdogCmd | ( | ADC_TypeDef * | ADCx, |
uint32_t | ADC_AnalogWatchdog | ||
) |
Enables or disables the analog watchdog on single/all regular or injected channels.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_AnalogWatchdog | the ADC analog watchdog configuration. This parameter can be one of the following values:
|
None |
Definition at line 1082 of file stm32f10x_adc.c.
void ADC_AnalogWatchdogSingleChannelConfig | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel | ||
) |
Configures the analog watchdog guarded single channel.
ADCx | where x can be 1, 2 or 3 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:
|
None |
Definition at line 1145 of file stm32f10x_adc.c.
void ADC_AnalogWatchdogThresholdsConfig | ( | ADC_TypeDef * | ADCx, |
uint16_t | HighThreshold, | ||
uint16_t | LowThreshold | ||
) |
Configures the high and low thresholds of the analog watchdog.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
HighThreshold | the ADC analog watchdog High threshold value. This parameter must be a 12bit value. |
LowThreshold | the ADC analog watchdog Low threshold value. This parameter must be a 12bit value. |
None |
Definition at line 1107 of file stm32f10x_adc.c.
void ADC_AutoInjectedConvCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the selected ADC automatic injected group conversion after regular one.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC auto injected conversion This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 734 of file stm32f10x_adc.c.
void ADC_ClearFlag | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_FLAG | ||
) |
Clears the ADCx's pending flags.
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:
|
None |
Definition at line 1228 of file stm32f10x_adc.c.
void ADC_ClearITPendingBit | ( | ADC_TypeDef * | ADCx, |
uint16_t | ADC_IT | ||
) |
Clears the ADCx's interrupt pending bits.
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 any combination of the following values:
|
None |
Definition at line 1283 of file stm32f10x_adc.c.
void ADC_Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified ADC peripheral.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the ADCx peripheral. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 299 of file stm32f10x_adc.c.
void ADC_DeInit | ( | ADC_TypeDef * | ADCx | ) |
Deinitializes the ADCx peripheral registers to their default reset values.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
None |
Definition at line 179 of file stm32f10x_adc.c.
void ADC_DiscModeChannelCountConfig | ( | ADC_TypeDef * | ADCx, |
uint8_t | Number | ||
) |
Configures the discontinuous mode for the selected ADC regular group channel.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
Number | specifies the discontinuous mode regular channel count value. This number must be between 1 and 8. |
None |
Definition at line 509 of file stm32f10x_adc.c.
void ADC_DiscModeCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the discontinuous mode on regular group channel for the specified ADC.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC discontinuous mode on regular group channel. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 536 of file stm32f10x_adc.c.
void ADC_DMACmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified ADC DMA request.
ADCx | where x can be 1 or 3 to select the ADC peripheral. Note: ADC2 hasn't a DMA capability. |
NewState | new state of the selected ADC DMA transfer. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 324 of file stm32f10x_adc.c.
void ADC_ExternalTrigConvCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the ADCx conversion through external trigger.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC external trigger start of conversion. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 686 of file stm32f10x_adc.c.
void ADC_ExternalTrigInjectedConvCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the ADCx injected channels conversion through external trigger.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC external trigger start of injected conversion. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 824 of file stm32f10x_adc.c.
void ADC_ExternalTrigInjectedConvConfig | ( | ADC_TypeDef * | ADCx, |
uint32_t | ADC_ExternalTrigInjecConv | ||
) |
Configures the ADCx external trigger for injected channels conversion.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_ExternalTrigInjecConv | specifies the ADC trigger to start injected conversion. This parameter can be one of the following values:
|
None |
Definition at line 799 of file stm32f10x_adc.c.
FlagStatus ADC_GetCalibrationStatus | ( | ADC_TypeDef * | ADCx | ) |
Gets the selected ADC calibration status.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
The | new state of ADC calibration (SET or RESET). |
Definition at line 430 of file stm32f10x_adc.c.
uint16_t ADC_GetConversionValue | ( | ADC_TypeDef * | ADCx | ) |
Returns the last ADCx conversion result data for regular channel.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
The | Data conversion value. |
Definition at line 708 of file stm32f10x_adc.c.
uint32_t ADC_GetDualModeConversionValue | ( | void | ) |
Returns the last ADC1 and ADC2 conversion result data in dual mode.
The | Data conversion value. |
Definition at line 720 of file stm32f10x_adc.c.
FlagStatus ADC_GetFlagStatus | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_FLAG | ||
) |
Checks whether the specified ADC flag is set or not.
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:
|
The | new state of ADC_FLAG (SET or RESET). |
Definition at line 1195 of file stm32f10x_adc.c.
uint16_t ADC_GetInjectedConversionValue | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_InjectedChannel | ||
) |
Returns the ADC injected channel conversion result.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_InjectedChannel | the converted ADC injected channel. This parameter can be one of the following values:
|
The | Data conversion value. |
Definition at line 1052 of file stm32f10x_adc.c.
ITStatus ADC_GetITStatus | ( | ADC_TypeDef * | ADCx, |
uint16_t | ADC_IT | ||
) |
Checks whether the specified ADC interrupt has occurred or not.
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:
|
The | new state of ADC_IT (SET or RESET). |
Definition at line 1247 of file stm32f10x_adc.c.
FlagStatus ADC_GetResetCalibrationStatus | ( | ADC_TypeDef * | ADCx | ) |
Gets the selected ADC reset calibration registers status.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
The | new state of ADC reset calibration registers (SET or RESET). |
Definition at line 392 of file stm32f10x_adc.c.
FlagStatus ADC_GetSoftwareStartConvStatus | ( | ADC_TypeDef * | ADCx | ) |
Gets the selected ADC Software start conversion Status.
Gets the selected ADC Software start regular conversion Status.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
The | new state of ADC software start conversion (SET or RESET). |
Definition at line 481 of file stm32f10x_adc.c.
FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus | ( | ADC_TypeDef * | ADCx | ) |
Gets the selected ADC Software start injected conversion Status.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
The | new state of ADC software start injected conversion (SET or RESET). |
Definition at line 873 of file stm32f10x_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.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_InitStruct | pointer to an ADC_InitTypeDef structure that contains the configuration information for the specified ADC peripheral. |
None |
Definition at line 218 of file stm32f10x_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.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Rank | The rank in the injected group sequencer. This parameter must be between 1 and 4. |
ADC_SampleTime | The sample time value to be set for the selected channel. This parameter can be one of the following values:
|
None |
Definition at line 930 of file stm32f10x_adc.c.
void ADC_InjectedDiscModeCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the discontinuous mode for injected group channel for the specified ADC.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC discontinuous mode on injected group channel. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 760 of file stm32f10x_adc.c.
void ADC_InjectedSequencerLengthConfig | ( | ADC_TypeDef * | ADCx, |
uint8_t | Length | ||
) |
Configures the sequencer length for injected channels.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
Length | The sequencer length. This parameter must be a number between 1 to 4. |
None |
Definition at line 993 of file stm32f10x_adc.c.
void ADC_ITConfig | ( | ADC_TypeDef * | ADCx, |
uint16_t | ADC_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified ADC interrupts.
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 any combination of the following values:
|
NewState | new state of the specified ADC interrupts. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 353 of file stm32f10x_adc.c.
void ADC_RegularChannelConfig | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel, | ||
uint8_t | Rank, | ||
uint8_t | ADC_SampleTime | ||
) |
Configures for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Rank | The rank in the regular group sequencer. This parameter must be between 1 to 16. |
ADC_SampleTime | The sample time value to be set for the selected channel. This parameter can be one of the following values:
|
None |
Definition at line 590 of file stm32f10x_adc.c.
void ADC_ResetCalibration | ( | ADC_TypeDef * | ADCx | ) |
Resets the selected ADC calibration registers.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
None |
Definition at line 379 of file stm32f10x_adc.c.
void ADC_SetInjectedOffset | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_InjectedChannel, | ||
uint16_t | Offset | ||
) |
Set the injected channels conversion value offset.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
ADC_InjectedChannel | the ADC injected channel to set its offset. This parameter can be one of the following values:
|
Offset | the offset value for the selected ADC injected channel This parameter must be a 12bit value. |
None |
Definition at line 1025 of file stm32f10x_adc.c.
void ADC_SoftwareStartConvCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the selected ADC software start conversion .
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC software start conversion. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 457 of file stm32f10x_adc.c.
void ADC_SoftwareStartInjectedConvCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the selected ADC start of the injected channels conversion.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC software start injected conversion. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 849 of file stm32f10x_adc.c.
void ADC_StartCalibration | ( | ADC_TypeDef * | ADCx | ) |
Starts the selected ADC calibration process.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
None |
Definition at line 417 of file stm32f10x_adc.c.
void ADC_StructInit | ( | ADC_InitTypeDef * | ADC_InitStruct | ) |
Fills each ADC_InitStruct member with its default value.
ADC_InitStruct | : pointer to an ADC_InitTypeDef structure which will be initialized. |
None |
Definition at line 275 of file stm32f10x_adc.c.
void ADC_TempSensorVrefintCmd | ( | FunctionalState | NewState | ) |
Enables or disables the temperature sensor and Vrefint channel.
Enables or disables the temperature sensor and Vrefint channels.
NewState | new state of the temperature sensor. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1167 of file stm32f10x_adc.c.