zephyr/drivers/adc/Kconfig
Song Qiang 7c7db00a77 drivers: adc: add driver support for ADC1 of stm32
This commit adds driver support for ADC1 on all 8 supported series of
stm32 with resolution and conversion time selection and calibration.

Currently DMA is not supported for all series, and without it, zephyr
won't be able to catch up ADC's end of conversion interrupt, so this
version of the driver supports one channel conversion only. Users want
multi-channel conversion should use multiple sequences in their app
code.

This driver uses LL lib rather than HAL because the current HAL lib for
ADC will call HAL_DMA_* functions rather than using zephyr's common DMA
interface, so that way the driver will break the consistency of the
code.

This driver has been tested on multiple nucleo boards including
NUCLEO_F091RC/F103RB/F207ZG/F302R8/F401RE/F746ZG/L073RZ/L476RG and all
passed the test cases in tests/drivers/adc/adc_api. If the external ADC
line is floating, it may fail the tests since ADC may get 0V and the
test cases think 0 is failing. Connect it to any voltage source between
0-3.3V will help passing the test cases.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-05-07 23:15:58 -04:00

63 lines
1.2 KiB
Plaintext

# Kconfig - ADC configuration options
#
# Copyright (c) 2015 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
# ADC options
#
menuconfig ADC
bool "ADC drivers"
# All platforms that implement the ADC driver are now required to
# provide relevant DTS entries.
select HAS_DTS_ADC
help
Enable ADC (Analog to Digital Converter) driver configuration.
if ADC
# By selecting or not this option particular ADC drivers indicate if it is
# required to explicitly specify analog inputs when configuring channels or
# just the channel identifier is sufficient.
config ADC_CONFIGURABLE_INPUTS
bool
config ADC_ASYNC
bool "Enable asynchronous call support"
select POLL
help
This option enables the asynchronous API calls.
module = ADC
module-str = ADC
source "subsys/logging/Kconfig.template.log_config"
config ADC_INIT_PRIORITY
int "Init priority"
default 80
help
ADC Device driver initialization priority.
config ADC_0
bool "Enable ADC 0"
config ADC_1
bool "Enable ADC 1"
source "drivers/adc/Kconfig.mcux"
source "drivers/adc/Kconfig.nrfx"
source "drivers/adc/Kconfig.sam_afec"
source "drivers/adc/Kconfig.intel_quark"
source "drivers/adc/Kconfig.sam0"
source "drivers/adc/Kconfig.stm32"
endif # ADC