STM32F439xx HAL User Manual
Data Fields
ADC_InjectionConfTypeDef Struct Reference

ADC Configuration injected Channel structure definition. More...

#include <stm32f4xx_hal_adc_ex.h>

Data Fields

uint32_t InjectedChannel
uint32_t InjectedRank
uint32_t InjectedSamplingTime
uint32_t InjectedOffset
uint32_t InjectedNbrOfConversion
uint32_t InjectedDiscontinuousConvMode
uint32_t AutoInjectedConv
uint32_t ExternalTrigInjecConv
uint32_t ExternalTrigInjecConvEdge

Detailed Description

ADC Configuration injected Channel structure definition.

Note:
Parameters of this structure are shared within 2 scopes:
  • Scope channel: InjectedChannel, InjectedRank, InjectedSamplingTime, InjectedOffset
  • Scope injected group (affects all channels of injected group): InjectedNbrOfConversion, InjectedDiscontinuousConvMode, AutoInjectedConv, ExternalTrigInjecConvEdge, ExternalTrigInjecConv.
The setting of these parameters with function HAL_ADCEx_InjectedConfigChannel() is conditioned to ADC state. ADC state can be either:
  • For all parameters: ADC disabled
  • For all except parameters 'InjectedDiscontinuousConvMode' and 'AutoInjectedConv': ADC enabled without conversion on going on injected group.
  • For parameters 'ExternalTrigInjecConv' and 'ExternalTrigInjecConvEdge': ADC enabled, even with conversion on going on injected group.

Definition at line 72 of file stm32f4xx_hal_adc_ex.h.


Field Documentation

Enables or disables the selected ADC automatic injected group conversion after regular one This parameter can be set to ENABLE or DISABLE. Note: To use Automatic injected conversion, discontinuous mode must be disabled ('DiscontinuousConvMode' and 'InjectedDiscontinuousConvMode' set to DISABLE) Note: To use Automatic injected conversion, injected group external triggers must be disabled ('ExternalTrigInjecConv' set to ADC_SOFTWARE_START) Note: In case of DMA used with regular group: if DMA configured in normal mode (single shot) JAUTO will be stopped upon DMA transfer complete. To maintain JAUTO always enabled, DMA must be configured in circular mode. Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to configure a channel on injected group can impact the configuration of other channels previously set.

Definition at line 105 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Selects the external event used to trigger the conversion start of injected group. If set to ADC_INJECTED_SOFTWARE_START, external triggers are disabled. If set to external trigger source, triggering is on event rising edge. This parameter can be a value of ADC External Trigger Source Injected Note: This parameter must be modified when ADC is disabled (before ADC start conversion or after ADC stop conversion). If ADC is enabled, this parameter setting is bypassed without error reporting (as it can be the expected behaviour in case of another parameter update on the fly) Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to configure a channel on injected group can impact the configuration of other channels previously set.

Definition at line 113 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Selects the external trigger edge of injected group. This parameter can be a value of ADC External Trigger Edge Injected. If trigger is set to ADC_INJECTED_SOFTWARE_START, this parameter is discarded. Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to configure a channel on injected group can impact the configuration of other channels previously set.

Definition at line 121 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Selection of ADC channel to configure This parameter can be a value of ADC Common Channels Note: Depending on devices, some channels may not be available on package pins. Refer to device datasheet for channels availability.

Definition at line 74 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Specifies whether the conversions sequence of injected group is performed in Complete-sequence/Discontinuous-sequence (main sequence subdivided in successive parts). Discontinuous mode is used only if sequencer is enabled (parameter 'ScanConvMode'). If sequencer is disabled, this parameter is discarded. Discontinuous mode can be enabled only if continuous mode is disabled. If continuous mode is enabled, this parameter setting is discarded. This parameter can be set to ENABLE or DISABLE. Note: For injected group, number of discontinuous ranks increment is fixed to one-by-one. Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to configure a channel on injected group can impact the configuration of other channels previously set.

Definition at line 98 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Specifies the number of ranks that will be converted within the injected group sequencer. To use the injected group sequencer and convert several ranks, parameter 'ScanConvMode' must be enabled. This parameter must be a number between Min_Data = 1 and Max_Data = 4. Caution: this setting impacts the entire injected group. Therefore, call of HAL_ADCEx_InjectedConfigChannel() to configure a channel on injected group can impact the configuration of other channels previously set.

Definition at line 93 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Defines the offset to be subtracted from the raw converted data (for channels set on injected group only). Offset value must be a positive number. Depending of ADC resolution selected (12, 10, 8 or 6 bits), this parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF, 0x3FF, 0xFF or 0x3F respectively.

Definition at line 89 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Rank in the injected group sequencer This parameter must be a value of ADC Injected Rank Note: In case of need to disable a channel or change order of conversion sequencer, rank containing a previous channel setting can be overwritten by the new channel setting (or parameter number of conversions can be adjusted)

Definition at line 77 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

Sampling time value to be set for the selected channel. Unit: ADC clock cycles Conversion time is the addition of sampling time and processing time (12 ADC clock cycles at ADC resolution 12 bits, 11 cycles at 10 bits, 9 cycles at 8 bits, 7 cycles at 6 bits). This parameter can be a value of ADC Sampling Times Caution: This parameter updates the parameter property of the channel, that can be used into regular and/or injected groups. If this same channel has been previously configured in the other group (regular/injected), it will be updated to last setting. Note: In case of usage of internal measurement channels (VrefInt/Vbat/TempSensor), sampling time constraints must be respected (sampling time can be adjusted in function of ADC clock frequency and sampling time setting) Refer to device datasheet for timings values, parameters TS_vrefint, TS_temp (values rough order: 4us min).

Definition at line 80 of file stm32f4xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().


The documentation for this struct was generated from the following file: