Regular Channels Configuration functions. More...
Functions | |
void | ADC_ChannelOffset1Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the Offset1. More... | |
void | ADC_ChannelOffset2Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the Offset2. More... | |
void | ADC_ChannelOffset3Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the Offset3. More... | |
void | ADC_ChannelOffset4Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the Offset4. More... | |
void | ADC_ContinuousModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the ADC continuous conversion mode. 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_EOCOnEachRegularChannelCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the EOC on each regular channel conversion. More... | |
void | ADC_ExternalTriggerConfig (ADC_TypeDef *ADCx, uint16_t ADC_ExternalTrigConvEvent, uint16_t ADC_ExternalTrigEventEdge) |
External Trigger Enable and Polarity Selection for regular channels. More... | |
uint16_t | ADC_GetConversionValue (ADC_TypeDef *ADCx) |
Returns the last ADCx conversion result data for regular channel. More... | |
uint32_t | ADC_GetDualModeConversionValue (ADC_TypeDef *ADCx) |
Returns the last ADC1, ADC2, ADC3 and ADC4 regular conversions results data in the selected dual mode. More... | |
uint32_t | ADC_GetMultiModeConversionValue (void) |
Returns the last ADC1, ADC2 and ADC3 regular conversions results data in the selected multi mode. More... | |
FlagStatus | ADC_GetSoftwareStartConvStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC Software start regular conversion Status. More... | |
FlagStatus | ADC_GetStartConversionStatus (ADC_TypeDef *ADCx) |
Gets the selected ADC start conversion Status. 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_RegularChannelSequencerLengthConfig (ADC_TypeDef *ADCx, uint8_t SequencerLength) |
Sets the ADC regular channel sequence lenght. More... | |
void | ADC_SetChannelOffset1 (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset) |
Set the ADC channels conversion value offset1. More... | |
void | ADC_SetChannelOffset2 (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset) |
Set the ADC channels conversion value offset2. More... | |
void | ADC_SetChannelOffset3 (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset) |
Set the ADC channels conversion value offset3. More... | |
void | ADC_SetChannelOffset4 (ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset) |
Set the ADC channels conversion value offset4. More... | |
void | ADC_SoftwareStartConv (ADC_TypeDef *ADCx) |
Enables the selected ADC software start conversion of the regular channels. More... | |
void | ADC_StartConversion (ADC_TypeDef *ADCx) |
Enables or disables the selected ADC start conversion . More... | |
void | ADC_StopConversion (ADC_TypeDef *ADCx) |
Stops the selected ADC ongoing conversion. More... | |
Regular Channels Configuration functions.
=============================================================================== ##### Regular Channels Configuration functions ##### =============================================================================== [..] This section provides functions allowing to manage the ADC's regular channels, it is composed of 2 sub sections : (#) Configuration and management functions for regular channels: This subsection provides functions allowing to configure the ADC regular channels : (++) Configure the rank in the regular group sequencer for each channel (++) Configure the sampling time for each channel (++) select the conversion Trigger for regular channels (++) select the desired EOC event behavior configuration (++) Activate the continuous Mode (*) (++) Activate the Discontinuous Mode -@@- Please Note that the following features for regular channels are configurated using the ADC_Init() function : (+@@) scan mode activation (+@@) continuous mode activation (**) (+@@) External trigger source (+@@) External trigger edge (+@@) number of conversion in the regular channels group sequencer. -@@- (*) and (**) are performing the same configuration (#) Get the conversion data: This subsection provides an important function in the ADC peripheral since it returns the converted data of the current regular channel. When the Conversion value is read, the EOC Flag is automatically cleared. -@- For multi ADC mode, the last ADC1, ADC2 and ADC3 regular conversions results data (in the selected multi mode) can be returned in the same time using ADC_GetMultiModeConversionValue() function.
=============================================================================== ##### Channels Configuration functions ##### =============================================================================== [..] This section provides functions allowing to manage the ADC regular channels. [..] To configure a regular sequence of channels use: (#) ADC_RegularChannelConfig() this fuction allows: (++) Configure the rank in the regular group sequencer for each channel (++) Configure the sampling time for each channel (#) ADC_RegularChannelSequencerLengthConfig() to set the length of the regular sequencer [..] The regular trigger is configured using the following functions: (#) ADC_SelectExternalTrigger() (#) ADC_ExternalTriggerPolarityConfig() [..] The start and the stop conversion are controlled by: (#) ADC_StartConversion() (#) ADC_StopConversion() [..] (@)Please Note that the following features for regular channels are configurated using the ADC_Init() function : (++) continuous mode activation (++) Resolution (++) Data Alignement (++) Overrun Mode. [..] Get the conversion data: This subsection provides an important function in the ADC peripheral since it returns the converted data of the current regular channel. When the Conversion value is read, the EOC Flag is automatically cleared. [..] To configure the discontinous mode, the following functions should be used: (#) ADC_DiscModeChannelCountConfig() to configure the number of discontinuous channel to be converted. (#) ADC_DiscModeCmd() to enable the discontinuous mode. [..] To configure and enable/disable the Channel offset use the functions: (++) ADC_SetChannelOffset1() (++) ADC_SetChannelOffset2() (++) ADC_SetChannelOffset3() (++) ADC_SetChannelOffset4() (++) ADC_ChannelOffset1Cmd() (++) ADC_ChannelOffset2Cmd() (++) ADC_ChannelOffset3Cmd() (++) ADC_ChannelOffset4Cmd()
void ADC_ChannelOffset1Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the Offset1.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
NewState | new state of the ADCx offset1. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1628 of file stm32f30x_adc.c.
void ADC_ChannelOffset2Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the Offset2.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
NewState | new state of the ADCx offset2. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1653 of file stm32f30x_adc.c.
void ADC_ChannelOffset3Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the Offset3.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
NewState | new state of the ADCx offset3. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1678 of file stm32f30x_adc.c.
void ADC_ChannelOffset4Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the Offset4.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
NewState | new state of the ADCx offset4. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1703 of file stm32f30x_adc.c.
void ADC_ContinuousModeCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the ADC continuous conversion mode.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC continuous conversion mode This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 900 of file stm32f4xx_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 |
ADCx | where x can be 1, 2, 3 or 4 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 926 of file stm32f4xx_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 |
ADCx | where x can be 1, 2, 3 or 4 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 958 of file stm32f4xx_adc.c.
void ADC_EOCOnEachRegularChannelCmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the EOC on each regular channel conversion.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
NewState | new state of the selected ADC EOC flag rising This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 875 of file stm32f4xx_adc.c.
void ADC_ExternalTriggerConfig | ( | ADC_TypeDef * | ADCx, |
uint16_t | ADC_ExternalTrigConvEvent, | ||
uint16_t | ADC_ExternalTrigEventEdge | ||
) |
External Trigger Enable and Polarity Selection for regular channels.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
ADC_ExternalTrigConvEvent | ADC external Trigger source. This parameter can be one of the following values:
|
ADC_ExternalTrigEventEdge | ADC external Trigger Polarity. This parameter can be one of the following values:
|
None |
Definition at line 1288 of file stm32f30x_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. |
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
The | Data conversion value. |
Definition at line 981 of file stm32f4xx_adc.c.
uint32_t ADC_GetDualModeConversionValue | ( | ADC_TypeDef * | ADCx | ) |
Returns the last ADC1, ADC2, ADC3 and ADC4 regular conversions results data in the selected dual mode.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
The | Data conversion value. |
Definition at line 1428 of file stm32f30x_adc.c.
uint32_t ADC_GetMultiModeConversionValue | ( | void | ) |
Returns the last ADC1, ADC2 and ADC3 regular conversions results data in the selected multi mode.
None |
The | Data conversion value. |
Definition at line 1002 of file stm32f4xx_adc.c.
FlagStatus ADC_GetSoftwareStartConvStatus | ( | ADC_TypeDef * | ADCx | ) |
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 845 of file stm32f4xx_adc.c.
FlagStatus ADC_GetStartConversionStatus | ( | ADC_TypeDef * | ADCx | ) |
Gets the selected ADC start conversion Status.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
The | new state of ADC start conversion (SET or RESET). |
Definition at line 1319 of file stm32f30x_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 |
ADCx | where x can be 1, 2, 3 or 4 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 711 of file stm32f4xx_adc.c.
void ADC_RegularChannelSequencerLengthConfig | ( | ADC_TypeDef * | ADCx, |
uint8_t | SequencerLength | ||
) |
Sets the ADC regular channel sequence lenght.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
SequenceLength | The Regular sequence length. This parameter must be between 1 to 16. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1248 of file stm32f30x_adc.c.
void ADC_SetChannelOffset1 | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel, | ||
uint16_t | Offset | ||
) |
Set the ADC channels conversion value offset1.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Offset | the offset value for the selected ADC Channel This parameter must be a 12bit value. |
None |
Definition at line 1476 of file stm32f30x_adc.c.
void ADC_SetChannelOffset2 | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel, | ||
uint16_t | Offset | ||
) |
Set the ADC channels conversion value offset2.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Offset | the offset value for the selected ADC Channel This parameter must be a 12bit value. |
None |
Definition at line 1519 of file stm32f30x_adc.c.
void ADC_SetChannelOffset3 | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel, | ||
uint16_t | Offset | ||
) |
Set the ADC channels conversion value offset3.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Offset | the offset value for the selected ADC Channel This parameter must be a 12bit value. |
None |
Definition at line 1562 of file stm32f30x_adc.c.
void ADC_SetChannelOffset4 | ( | ADC_TypeDef * | ADCx, |
uint8_t | ADC_Channel, | ||
uint16_t | Offset | ||
) |
Set the ADC channels conversion value offset4.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
ADC_Channel | the ADC channel to configure. This parameter can be one of the following values:
|
Offset | the offset value for the selected ADC Channel This parameter must be a 12bit value. |
None |
Definition at line 1605 of file stm32f30x_adc.c.
void ADC_SoftwareStartConv | ( | ADC_TypeDef * | ADCx | ) |
Enables the selected ADC software start conversion of the regular channels.
ADCx | where x can be 1, 2 or 3 to select the ADC peripheral. |
None |
Definition at line 831 of file stm32f4xx_adc.c.
void ADC_StartConversion | ( | ADC_TypeDef * | ADCx | ) |
Enables or disables the selected ADC start conversion .
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
None |
Definition at line 1305 of file stm32f30x_adc.c.
void ADC_StopConversion | ( | ADC_TypeDef * | ADCx | ) |
Stops the selected ADC ongoing conversion.
ADCx | where x can be 1, 2, 3 or 4 to select the ADC peripheral. |
None |
Definition at line 1344 of file stm32f30x_adc.c.