STM32L443xx HAL User Manual
|
Defines | |
#define | __HAL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) __LL_ADC_CHANNEL_TO_DECIMAL_NB((__CHANNEL__)) |
Helper macro to get ADC channel number in decimal format from literals ADC_CHANNEL_x. | |
#define | __HAL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) __LL_ADC_DECIMAL_NB_TO_CHANNEL((__DECIMAL_NB__)) |
Helper macro to get ADC channel in literal format ADC_CHANNEL_x from number in decimal format. | |
#define | __HAL_ADC_IS_CHANNEL_INTERNAL(__CHANNEL__) __LL_ADC_IS_CHANNEL_INTERNAL((__CHANNEL__)) |
Helper macro to determine whether the selected channel corresponds to literal definitions of driver. | |
#define | __HAL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(__CHANNEL__) __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL((__CHANNEL__)) |
Helper macro to convert a channel defined from parameter definition of a ADC internal channel (ADC_CHANNEL_VREFINT, ADC_CHANNEL_TEMPSENSOR, ...), to its equivalent parameter definition of a ADC external channel (ADC_CHANNEL_1, ADC_CHANNEL_2, ...). | |
#define | __HAL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE((__ADC_INSTANCE__), (__CHANNEL__)) |
Helper macro to determine whether the internal channel selected is available on the ADC instance selected. | |
#define | __HAL_ADC_COMMON_INSTANCE(__ADCx__) __LL_ADC_COMMON_INSTANCE((__ADCx__)) |
Helper macro to select the ADC common instance to which is belonging the selected ADC instance. | |
#define | __HAL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE((__ADCXY_COMMON__)) |
Helper macro to check if all ADC instances sharing the same ADC common instance are disabled. | |
#define | __HAL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) __LL_ADC_DIGITAL_SCALE((__ADC_RESOLUTION__)) |
Helper macro to define the ADC conversion data full-scale digital value corresponding to the selected ADC resolution. | |
#define | __HAL_ADC_CONVERT_DATA_RESOLUTION(__DATA__, __ADC_RESOLUTION_CURRENT__, __ADC_RESOLUTION_TARGET__) |
Helper macro to convert the ADC conversion data from a resolution to another resolution. | |
#define | __HAL_ADC_CALC_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__, __ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the voltage (unit: mVolt) corresponding to a ADC conversion data (unit: digital value). | |
#define | __HAL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate analog reference voltage (Vref+) (unit: mVolt) from ADC conversion data of internal voltage reference VrefInt. | |
#define | __HAL_ADC_CALC_TEMPERATURE(__VREFANALOG_VOLTAGE__, __TEMPSENSOR_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor. | |
#define | __HAL_ADC_CALC_TEMPERATURE_TYP_PARAMS(__TEMPSENSOR_TYP_AVGSLOPE__, __TEMPSENSOR_TYP_CALX_V__, __TEMPSENSOR_CALX_TEMP__, __VREFANALOG_VOLTAGE__, __TEMPSENSOR_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor. |
#define __HAL_ADC_CALC_DATA_TO_VOLTAGE | ( | __VREFANALOG_VOLTAGE__, | |
__ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
__LL_ADC_CALC_DATA_TO_VOLTAGE((__VREFANALOG_VOLTAGE__),\ (__ADC_DATA__),\ (__ADC_RESOLUTION__))
Helper macro to calculate the voltage (unit: mVolt) corresponding to a ADC conversion data (unit: digital value).
__VREFANALOG_VOLTAGE__ | Analog reference voltage (unit: mV) |
__ADC_DATA__ | ADC conversion data (resolution 12 bits) (unit: digital value). |
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
ADC | conversion data equivalent voltage value (unit: mVolt) |
Definition at line 1553 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CALC_TEMPERATURE | ( | __VREFANALOG_VOLTAGE__, | |
__TEMPSENSOR_ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
__LL_ADC_CALC_TEMPERATURE((__VREFANALOG_VOLTAGE__),\ (__TEMPSENSOR_ADC_DATA__),\ (__ADC_RESOLUTION__))
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor.
__VREFANALOG_VOLTAGE__ | Analog reference voltage (unit: mV) |
__TEMPSENSOR_ADC_DATA__ | ADC conversion data of internal temperature sensor (unit: digital value). |
__ADC_RESOLUTION__ | ADC resolution at which internal temperature sensor voltage has been measured. This parameter can be one of the following values: |
Temperature | (unit: degree Celsius) |
Definition at line 1635 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CALC_TEMPERATURE_TYP_PARAMS | ( | __TEMPSENSOR_TYP_AVGSLOPE__, | |
__TEMPSENSOR_TYP_CALX_V__, | |||
__TEMPSENSOR_CALX_TEMP__, | |||
__VREFANALOG_VOLTAGE__, | |||
__TEMPSENSOR_ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
__LL_ADC_CALC_TEMPERATURE_TYP_PARAMS((__TEMPSENSOR_TYP_AVGSLOPE__),\ (__TEMPSENSOR_TYP_CALX_V__),\ (__TEMPSENSOR_CALX_TEMP__),\ (__VREFANALOG_VOLTAGE__),\ (__TEMPSENSOR_ADC_DATA__),\ (__ADC_RESOLUTION__))
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor.
__TEMPSENSOR_TYP_AVGSLOPE__ | Device datasheet data: Temperature sensor slope typical value (unit: uV/DegCelsius). On STM32L4, refer to device datasheet parameter "Avg_Slope". |
__TEMPSENSOR_TYP_CALX_V__ | Device datasheet data: Temperature sensor voltage typical value (at temperature and Vref+ defined in parameters below) (unit: mV). On STM32L4, refer to device datasheet parameter "V30" (corresponding to TS_CAL1). |
__TEMPSENSOR_CALX_TEMP__ | Device datasheet data: Temperature at which temperature sensor voltage (see parameter above) is corresponding (unit: mV) |
__VREFANALOG_VOLTAGE__ | Analog voltage reference (Vref+) voltage (unit: mV) |
__TEMPSENSOR_ADC_DATA__ | ADC conversion data of internal temperature sensor (unit: digital value). |
__ADC_RESOLUTION__ | ADC resolution at which internal temperature sensor voltage has been measured. This parameter can be one of the following values: |
Temperature | (unit: degree Celsius) |
Definition at line 1686 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CALC_VREFANALOG_VOLTAGE | ( | __VREFINT_ADC_DATA__, | |
__ADC_RESOLUTION__ | |||
) |
__LL_ADC_CALC_VREFANALOG_VOLTAGE((__VREFINT_ADC_DATA__),\ (__ADC_RESOLUTION__))
Helper macro to calculate analog reference voltage (Vref+) (unit: mVolt) from ADC conversion data of internal voltage reference VrefInt.
__VREFINT_ADC_DATA__ | ADC conversion data (resolution 12 bits) of internal voltage reference VrefInt (unit: digital value). |
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
Analog | reference voltage (unit: mV) |
Definition at line 1585 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL | ( | __CHANNEL__ | ) | __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL((__CHANNEL__)) |
Helper macro to convert a channel defined from parameter definition of a ADC internal channel (ADC_CHANNEL_VREFINT, ADC_CHANNEL_TEMPSENSOR, ...), to its equivalent parameter definition of a ADC external channel (ADC_CHANNEL_1, ADC_CHANNEL_2, ...).
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Returned | value can be one of the following values: |
Definition at line 1405 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CHANNEL_TO_DECIMAL_NB | ( | __CHANNEL__ | ) | __LL_ADC_CHANNEL_TO_DECIMAL_NB((__CHANNEL__)) |
Helper macro to get ADC channel number in decimal format from literals ADC_CHANNEL_x.
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Value | between Min_Data=0 and Max_Data=18 |
Definition at line 1217 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_COMMON_INSTANCE | ( | __ADCx__ | ) | __LL_ADC_COMMON_INSTANCE((__ADCx__)) |
Helper macro to select the ADC common instance to which is belonging the selected ADC instance.
__ADCx__ | ADC instance |
ADC | common register instance |
Definition at line 1473 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_CONVERT_DATA_RESOLUTION | ( | __DATA__, | |
__ADC_RESOLUTION_CURRENT__, | |||
__ADC_RESOLUTION_TARGET__ | |||
) |
__LL_ADC_CONVERT_DATA_RESOLUTION((__DATA__),\ (__ADC_RESOLUTION_CURRENT__),\ (__ADC_RESOLUTION_TARGET__))
Helper macro to convert the ADC conversion data from a resolution to another resolution.
__DATA__ | ADC conversion data to be converted |
__ADC_RESOLUTION_CURRENT__ | Resolution of to the data to be converted This parameter can be one of the following values: |
__ADC_RESOLUTION_TARGET__ | Resolution of the data after conversion This parameter can be one of the following values: |
ADC | conversion data to the requested resolution |
Definition at line 1530 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_DECIMAL_NB_TO_CHANNEL | ( | __DECIMAL_NB__ | ) | __LL_ADC_DECIMAL_NB_TO_CHANNEL((__DECIMAL_NB__)) |
Helper macro to get ADC channel in literal format ADC_CHANNEL_x from number in decimal format.
__DECIMAL_NB__ | Value between Min_Data=0 and Max_Data=18 |
Returned | value can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). (1, 2, 3, 4) For ADC channel read back from ADC register, comparison with internal channel parameter to be done using helper macro __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(). |
Definition at line 1269 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_DIGITAL_SCALE | ( | __ADC_RESOLUTION__ | ) | __LL_ADC_DIGITAL_SCALE((__ADC_RESOLUTION__)) |
Helper macro to define the ADC conversion data full-scale digital value corresponding to the selected ADC resolution.
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
ADC | conversion data full-scale digital value |
Definition at line 1509 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_IS_CHANNEL_INTERNAL | ( | __CHANNEL__ | ) | __LL_ADC_IS_CHANNEL_INTERNAL((__CHANNEL__)) |
Helper macro to determine whether the selected channel corresponds to literal definitions of driver.
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Value | "0" if the channel corresponds to a parameter definition of a ADC external channel (channel connected to a GPIO pin). Value "1" if the channel corresponds to a parameter definition of a ADC internal channel. |
Definition at line 1330 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE | ( | __ADC_INSTANCE__, | |
__CHANNEL__ | |||
) | __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE((__ADC_INSTANCE__), (__CHANNEL__)) |
Helper macro to determine whether the internal channel selected is available on the ADC instance selected.
__ADC_INSTANCE__ | ADC instance |
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. |
Value | "0" if the internal channel selected is not available on the ADC instance selected. Value "1" if the internal channel selected is available on the ADC instance selected. |
Definition at line 1442 of file stm32l4xx_hal_adc.h.
#define __HAL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE | ( | __ADCXY_COMMON__ | ) | __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE((__ADCXY_COMMON__)) |
Helper macro to check if all ADC instances sharing the same ADC common instance are disabled.
__ADCXY_COMMON__ | ADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() ) |
Value | "0" if all ADC instances sharing the same ADC common instance are disabled. Value "1" if at least one ADC instance sharing the same ADC common instance is enabled. |
Definition at line 1493 of file stm32l4xx_hal_adc.h.