Regular Channels Configuration functions.
More...
|
void | SDADC_ChannelSelect (SDADC_TypeDef *SDADCx, uint32_t SDADC_Channel) |
| Selects the SDADC channel to be used for regular conversion. More...
|
|
void | SDADC_ContinuousModeCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
| Enables or disables the SDADC continuous conversion mode. When enabled, the regular channel is converted repeatedly after each conversion request. When disabled, the regular channel is converted once for each conversion request. More...
|
|
void | SDADC_SoftwareStartConv (SDADC_TypeDef *SDADCx) |
| Enables the selected SDADC software start conversion of the regular channels. More...
|
|
int16_t | SDADC_GetConversionValue (SDADC_TypeDef *SDADCx) |
| Returns the last SDADC conversion result data for regular channel. More...
|
|
void | SDADC_RegularSynchroSDADC1 (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
| Launches SDADC2/SDADC3 regular conversion synchronously with SDADC1. More...
|
|
uint32_t | SDADC_GetConversionSDADC12Value (void) |
| Returns the last conversion result data for regular channel of SDADC1 and SDADC2. RSYNC bit of the SDADC2 should be already set. More...
|
|
uint32_t | SDADC_GetConversionSDADC13Value (void) |
| Returns the last conversion result data for regular channel of SDADC1 and SDADC3. RSYNC bit of the SDADC3 should be already set. More...
|
|
Regular Channels Configuration functions.
===============================================================================
##### Regular Channels Configuration functions #####
===============================================================================
[..] This section provides functions allowing to manage the SDADC regular channels,
it is composed of 3 sub sections:
(+) Configuration and management functions for regular channels:
(++) Select the channel to be used for regular conversion using
SDADC_ChannelSelect() (*)
(++) Activate the continuous Mode using SDADC_ContinuousModeCmd() (*)
(++) Perform a software start trigger using SDADC_SoftwareStartConv()
(++) For SDADC2 and SDADC3, Enable synchronization with SDADC1 using
SDADC_RegularSynchroSDADC1()
-@@- Please Note that the following features for regular channels
can be configurated using the SDADC_Init() function:
(++) Channel selection
(++) Continuous mode activation
(+) Get the regular conversion data: Use SDADC_GetConversionValue() to
read the conversion value for regular conversion
(+) Get the SDADC2/SDADC3 regular conversion data synchronized with SDADC1
Use SDADC_GetConversionSDADC12Value()/SDADC_GetConversionSDADC13Value to
read the conversion value of SDADC1 regular conversion concatenated to
SDADC2/SDADC3 regular conversion
void SDADC_ChannelSelect |
( |
SDADC_TypeDef * |
SDADCx, |
|
|
uint32_t |
SDADC_Channel |
|
) |
| |
Selects the SDADC channel to be used for regular conversion.
- Note
- Just one channel of the 9 available channels can be selected.
- Parameters
-
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_Channel,: | The SDADC regular channel. This parameter can be one of the following values:
- SDADC_Channel_0: SDADC Channel 0 selected
- SDADC_Channel_1: SDADC Channel 1 selected
- SDADC_Channel_2: SDADC Channel 2 selected
- SDADC_Channel_3: SDADC Channel 3 selected
- SDADC_Channel_4: SDADC Channel 4 selected
- SDADC_Channel_5: SDADC Channel 5 selected
- SDADC_Channel_6: SDADC Channel 6 selected
- SDADC_Channel_7: SDADC Channel 7 selected
- SDADC_Channel_8: SDADC Channel 8 selected
|
- Return values
-
void SDADC_ContinuousModeCmd |
( |
SDADC_TypeDef * |
SDADCx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the SDADC continuous conversion mode. When enabled, the regular channel is converted repeatedly after each conversion request. When disabled, the regular channel is converted once for each conversion request.
- Parameters
-
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC continuous conversion mode This parameter can be: ENABLE or DISABLE. |
- Return values
-
uint32_t SDADC_GetConversionSDADC12Value |
( |
void |
| ) |
|
Returns the last conversion result data for regular channel of SDADC1 and SDADC2. RSYNC bit of the SDADC2 should be already set.
- Parameters
-
- Return values
-
The | Data conversion value for SDADC1 and SDADC2. In 16-bit MSB: the regular conversion data for SDADC2. This data is valid only when the flag SDADC_FLAG_REOC of SDADC2 is set. In 16-bit LSB: the regular conversion data for SDADC1. This data is valid only when the flag SDADC_FLAG_REOC of SDADC1 is set. |
uint32_t SDADC_GetConversionSDADC13Value |
( |
void |
| ) |
|
Returns the last conversion result data for regular channel of SDADC1 and SDADC3. RSYNC bit of the SDADC3 should be already set.
- Parameters
-
- Return values
-
The | Data conversion value for SDADC1 and SDADC3. In 16-bit MSB: the regular conversion data for SDADC3. This data is valid only when the flag SDADC_FLAG_REOC of SDADC3 is set. In 16-bit LSB: the regular conversion data for SDADC1. This data is valid only when the flag SDADC_FLAG_REOC of SDADC1 is set. |
int16_t SDADC_GetConversionValue |
( |
SDADC_TypeDef * |
SDADCx | ) |
|
Returns the last SDADC conversion result data for regular channel.
- Parameters
-
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
- Return values
-
The | Data conversion value. |
void SDADC_RegularSynchroSDADC1 |
( |
SDADC_TypeDef * |
SDADCx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Launches SDADC2/SDADC3 regular conversion synchronously with SDADC1.
- Note
- This feature is available only on SDADC2 and SDADC3.
- Parameters
-
SDADCx,: | where x can be 2 or 3 to select the SDADC peripheral. When enabled, a regular conversion is launched at the same moment that a regular conversion is launched in SDADC1. When disabled, do not launch a regular conversion synchronously with SDADC1. |
- Return values
-
void SDADC_SoftwareStartConv |
( |
SDADC_TypeDef * |
SDADCx | ) |
|
Enables the selected SDADC software start conversion of the regular channels.
- Note
- If the flag SDADC_FLAG_RCIP is set or INIT bit is set, calling this function SDADC_SoftwareStartConv() has no effect.
- Parameters
-
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
- Return values
-