![]() |
STM32F37 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
|
SDADC driver modules. More...
Modules | |
SDADC_Exported_Constants | |
SDADC_Private_Functions | |
Data Structures | |
struct | SDADC_InitTypeDef |
SDADC Init structure definition. More... | |
struct | SDADC_AINStructTypeDef |
SDADC Analog Inputs Configuration structure definition. More... | |
Macros | |
#define | CR2_CLEAR_MASK ((uint32_t)0xFE30FFFF) |
Functions | |
void | SDADC_DeInit (SDADC_TypeDef *SDADCx) |
Deinitializes SDADCx peripheral registers to their default reset values. More... | |
void | SDADC_Init (SDADC_TypeDef *SDADCx, SDADC_InitTypeDef *SDADC_InitStruct) |
Initializes the SDADCx peripheral according to the specified parameters in the SDADC_InitStruct. More... | |
void | SDADC_StructInit (SDADC_InitTypeDef *SDADC_InitStruct) |
Fills each SDADC_InitStruct member with its default value. More... | |
void | SDADC_AINInit (SDADC_TypeDef *SDADCx, uint32_t SDADC_Conf, SDADC_AINStructTypeDef *SDADC_AINStruct) |
Configures the analog input mode. More... | |
void | SDADC_AINStructInit (SDADC_AINStructTypeDef *SDADC_AINStruct) |
Fills each SDADC_AINStruct member with its default value. More... | |
void | SDADC_ChannelConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_Channel, uint32_t SDADC_Conf) |
Configures the SDADCx channel. More... | |
void | SDADC_Cmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the specified SDADC peripheral. More... | |
void | SDADC_InitModeCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the initialization mode for specified SDADC peripheral. More... | |
void | SDADC_FastConversionCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the fast conversion mode for the SDADC. More... | |
void | SDADC_VREFSelect (uint32_t SDADC_VREF) |
Selects the reference voltage. More... | |
void | SDADC_CalibrationSequenceConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_CalibrationSequence) |
Configures the calibration sequence. More... | |
void | SDADC_StartCalibration (SDADC_TypeDef *SDADCx) |
Launches a request to start the calibration sequence. 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... | |
void | SDADC_SoftwareStartInjectedConv (SDADC_TypeDef *SDADCx) |
Enables the selected SDADC software start conversion of the injected channels. More... | |
void | SDADC_InjectedChannelSelect (SDADC_TypeDef *SDADCx, uint32_t SDADC_Channel) |
Selects the SDADC injected channel(s). More... | |
void | SDADC_DelayStartInjectedConvCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables delayed start of injected conversions. More... | |
void | SDADC_InjectedContinuousModeCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the continuous mode for injected channels for the specified SDADC. More... | |
void | SDADC_ExternalTrigInjectedConvConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_ExternalTrigInjecConv) |
Configures the SDADCx external trigger for injected channels conversion. More... | |
void | SDADC_ExternalTrigInjectedConvEdgeConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_ExternalTrigInjecConvEdge) |
Configures the SDADCx external trigger edge for injected channels conversion. More... | |
uint32_t | SDADC_GetInjectedChannel (SDADC_TypeDef *SDADCx) |
Returns the injected channel most recently converted for the specified SDADC. More... | |
int16_t | SDADC_GetInjectedConversionValue (SDADC_TypeDef *SDADCx, uint32_t *SDADC_Channel) |
Returns the SDADC injected channel conversion result. More... | |
void | SDADC_InjectedSynchroSDADC1 (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Launches injected conversion synchronously with SDADC1. More... | |
uint32_t | SDADC_GetInjectedConversionSDADC12Value (void) |
Returns the last conversion result data for injected channel of SDADC1 and SDADC2. JSYNC bit of the SDADC2 should be already set. More... | |
uint32_t | SDADC_GetInjectedConversionSDADC13Value (void) |
Returns the last conversion result data for injected channel of SDADC1 and SDADC3. JSYNC bit of the SDADC3 should be already set. More... | |
void | SDADC_PowerDownCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the SDADC power down mode when idle. More... | |
void | SDADC_StandbyCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the SDADC standby mode when idle. More... | |
void | SDADC_SlowClockCmd (SDADC_TypeDef *SDADCx, FunctionalState NewState) |
Enables or disables the SDADC in slow clock mode. More... | |
void | SDADC_DMAConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_DMATransfer, FunctionalState NewState) |
Configures the DMA transfer for regular/injected conversions. More... | |
void | SDADC_ITConfig (SDADC_TypeDef *SDADCx, uint32_t SDADC_IT, FunctionalState NewState) |
Enables or disables the specified SDADC interrupts. More... | |
FlagStatus | SDADC_GetFlagStatus (SDADC_TypeDef *SDADCx, uint32_t SDADC_FLAG) |
Checks whether the specified SDADC flag is set or not. More... | |
void | SDADC_ClearFlag (SDADC_TypeDef *SDADCx, uint32_t SDADC_FLAG) |
Clears the SDADCx pending flags. More... | |
ITStatus | SDADC_GetITStatus (SDADC_TypeDef *SDADCx, uint32_t SDADC_IT) |
Checks whether the specified SDADC interrupt has occurred or not. More... | |
void | SDADC_ClearITPendingBit (SDADC_TypeDef *SDADCx, uint32_t SDADC_IT) |
Clears the SDADCx interrupt pending bits. More... | |
SDADC driver modules.
void SDADC_AINInit | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_Conf, | ||
SDADC_AINStructTypeDef * | SDADC_AINStruct | ||
) |
Configures the analog input mode.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_AINStruct,: | pointer to an SDADC_AINStructTypeDef structure that contains the analog inputs configuration information for the specified SDADC peripheral. |
None |
void SDADC_AINStructInit | ( | SDADC_AINStructTypeDef * | SDADC_AINStruct | ) |
Fills each SDADC_AINStruct member with its default value.
SDADC_AINStruct,: | pointer to an SDADC_AINStructTypeDef structure which will be initialized. |
None |
void SDADC_CalibrationSequenceConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_CalibrationSequence | ||
) |
Configures the calibration sequence.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_CalibrationSequence,: | Number of calibration sequence to be performed. This parameter can be one of the following values:
|
None |
void SDADC_ChannelConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_Channel, | ||
uint32_t | SDADC_Conf | ||
) |
Configures the SDADCx channel.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_Channel,: | The SDADC injected channel. This parameter can be one of the following values:
|
SDADC_Conf,: | The SDADC input configuration. This parameter can be one of the following values:
|
None |
void SDADC_ChannelSelect | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_Channel | ||
) |
Selects the SDADC channel to be used for regular conversion.
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:
|
None |
void SDADC_ClearFlag | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_FLAG | ||
) |
Clears the SDADCx pending flags.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_FLAG,: | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
void SDADC_ClearITPendingBit | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_IT | ||
) |
Clears the SDADCx interrupt pending bits.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_IT,: | specifies the SDADC interrupt pending bit to clear. This parameter can be any combination of the following values:
|
None |
void SDADC_Cmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified SDADC peripheral.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the SDADCx peripheral. This parameter can be: ENABLE or DISABLE. |
None |
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.
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. |
None |
void SDADC_DeInit | ( | SDADC_TypeDef * | SDADCx | ) |
Deinitializes SDADCx peripheral registers to their default reset values.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
None |
void SDADC_DelayStartInjectedConvCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables delayed start of injected conversions.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC delay start of injected conversions. This parameter can be: ENABLE or DISABLE. When disabled, injected conversions begin as soon as possible after the request. When enabled, after a request for injected conversion the SDADC waits a fixed interval before launching the conversion. |
None |
void SDADC_DMAConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_DMATransfer, | ||
FunctionalState | NewState | ||
) |
Configures the DMA transfer for regular/injected conversions.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_DMATransfer,: | Specifies the SDADC DMA transfer. This parameter can be one of the following values:
|
NewState | Indicates the new state of the SDADC DMA interface. This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_ExternalTrigInjectedConvConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_ExternalTrigInjecConv | ||
) |
Configures the SDADCx external trigger for injected channels conversion.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_ExternalTrigInjecConv,: | specifies the SDADC trigger to start injected conversion. This parameter can be one of the following values:
|
None |
void SDADC_ExternalTrigInjectedConvEdgeConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_ExternalTrigInjecConvEdge | ||
) |
Configures the SDADCx external trigger edge for injected channels conversion.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_ExternalTrigInjecConvEdge,: | specifies the SDADC external trigger edge to start injected conversion. This parameter can be one of the following values:
|
None |
void SDADC_FastConversionCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the fast conversion mode for the SDADC.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC fast conversion mode This parameter can be: ENABLE or DISABLE. |
None |
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.
None |
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.
None |
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.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
The | Data conversion value. |
FlagStatus SDADC_GetFlagStatus | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_FLAG | ||
) |
Checks whether the specified SDADC flag is set or not.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_FLAG,: | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of SDADC_FLAG (SET or RESET). |
uint32_t SDADC_GetInjectedChannel | ( | SDADC_TypeDef * | SDADCx | ) |
Returns the injected channel most recently converted for the specified SDADC.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
The | most recently converted SDADC injected channel. This parameter can be one of the following values:
|
uint32_t SDADC_GetInjectedConversionSDADC12Value | ( | void | ) |
Returns the last conversion result data for injected channel of SDADC1 and SDADC2. JSYNC bit of the SDADC2 should be already set.
None |
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_JEOC of SDADC2 is set. In 16-bit LSB: the regular conversion data for SDADC1. This data is valid only when the flag SDADC_FLAG_JEOC of SDADC1 is set. |
uint32_t SDADC_GetInjectedConversionSDADC13Value | ( | void | ) |
Returns the last conversion result data for injected channel of SDADC1 and SDADC3. JSYNC bit of the SDADC3 should be already set.
None |
The | Data conversion value for SDADC1 and SDADC3. In 16-bit MSB: the injected conversion data for SDADC3. This data is valid only when the flag SDADC_FLAG_JEOC of SDADC3 is set. In 16-bit LSB: the injected conversion data for SDADC1. This data is valid only when the flag SDADC_FLAG_JEOC of SDADC1 is set. |
int16_t SDADC_GetInjectedConversionValue | ( | SDADC_TypeDef * | SDADCx, |
uint32_t * | SDADC_Channel | ||
) |
Returns the SDADC injected channel conversion result.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_Channel,: | the most recently converted SDADC injected channel. This parameter can be one of the following values:
|
The | injected data conversion value. |
ITStatus SDADC_GetITStatus | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_IT | ||
) |
Checks whether the specified SDADC interrupt has occurred or not.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_IT,: | specifies the SDADC interrupt source to check. This parameter can be one of the following values:
|
The | new state of SDADC_IT (SET or RESET). |
void SDADC_Init | ( | SDADC_TypeDef * | SDADCx, |
SDADC_InitTypeDef * | SDADC_InitStruct | ||
) |
Initializes the SDADCx peripheral according to the specified parameters in the SDADC_InitStruct.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_InitStruct,: | pointer to an SDADC_InitTypeDef structure that contains the configuration information for the specified SDADC peripheral. |
None |
void SDADC_InitModeCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the initialization mode for specified SDADC peripheral.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the SDADCx peripheral. This parameter can be: ENABLE or DISABLE. When enabled, the SDADCx is in initialization mode and the SDADCx can be configured (except: power down mode, standby mode, slow clock and VREF selection). When disabled, the SDADCx isn't in initialization mode and limited configurations are allowed (regular channel selection, software trigger) |
None |
void SDADC_InjectedChannelSelect | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_Channel | ||
) |
Selects the SDADC injected channel(s).
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_Channel,: | The SDADC injected channel. This parameter can be one or any combination of the following values:
|
None |
void SDADC_InjectedContinuousModeCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the continuous mode for injected channels for the specified SDADC.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC continuous mode on injected channels. This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_InjectedSynchroSDADC1 | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Launches injected conversion synchronously with SDADC1.
SDADCx,: | where x can be 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC synchronization with SDADC1 This parameter can be: ENABLE or DISABLE. When enabled, An injected conversion is launched at the same moment that an injected conversion is launched in SDADC1. When disabled, do not launch an injected conversion synchronously with SDADC1. |
None |
void SDADC_ITConfig | ( | SDADC_TypeDef * | SDADCx, |
uint32_t | SDADC_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified SDADC interrupts.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
SDADC_IT,: | specifies the SDADC interrupt sources to be enabled or disabled. This parameter can be one of the following values:
|
NewState,: | new state of the specified SDADC interrupts. This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_PowerDownCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the SDADC power down mode when idle.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC power down mode when idle This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_RegularSynchroSDADC1 | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Launches SDADC2/SDADC3 regular conversion synchronously with SDADC1.
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. |
None |
void SDADC_SlowClockCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the SDADC in slow clock mode.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC slow clock mode This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_SoftwareStartConv | ( | SDADC_TypeDef * | SDADCx | ) |
Enables the selected SDADC software start conversion of the regular channels.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
None |
void SDADC_SoftwareStartInjectedConv | ( | SDADC_TypeDef * | SDADCx | ) |
Enables the selected SDADC software start conversion of the injected channels.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
None |
void SDADC_StandbyCmd | ( | SDADC_TypeDef * | SDADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the SDADC standby mode when idle.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
NewState,: | new state of the selected SDADC standby mode when idle This parameter can be: ENABLE or DISABLE. |
None |
void SDADC_StartCalibration | ( | SDADC_TypeDef * | SDADCx | ) |
Launches a request to start the calibration sequence.
SDADCx,: | where x can be 1, 2 or 3 to select the SDADC peripheral. |
None |
void SDADC_StructInit | ( | SDADC_InitTypeDef * | SDADC_InitStruct | ) |
Fills each SDADC_InitStruct member with its default value.
SDADC_InitStruct,: | pointer to an SDADC_InitTypeDef structure which will be initialized. |
None |
void SDADC_VREFSelect | ( | uint32_t | SDADC_VREF | ) |
Selects the reference voltage.
SDADC_VREF,: | Reference voltage selection. This parameter can be one of the following values:
|
None |