Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add driver support for ADC1 of stm32 #13447

Merged
merged 5 commits into from
May 8, 2019
Merged

Add driver support for ADC1 of stm32 #13447

merged 5 commits into from
May 8, 2019

Commits on May 7, 2019

  1. dts: arm: stm32: add dts support for ADC1 of stm32

    All series of stm32 have at least one ADC instance and this commit adds
    one ADC node to the root dts file of each soc, and also adds fixing up
    mappings to them.
    
    Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
    cybertale authored and nashif committed May 7, 2019
    Configuration menu
    Copy the full SHA
    7e8f8f6 View commit details
    Browse the repository at this point in the history
  2. drivers: pinmux: stm32: add pinmux support for ADC of stm32

    This commit adds pinmux defines for all the external ADC lines
    supported by stm32. All defines are named after the datasheet of the
    corresponding product lines.
    
    Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
    cybertale authored and nashif committed May 7, 2019
    Configuration menu
    Copy the full SHA
    2ae1f39 View commit details
    Browse the repository at this point in the history
  3. 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>
    cybertale authored and nashif committed May 7, 2019
    Configuration menu
    Copy the full SHA
    85d246f View commit details
    Browse the repository at this point in the history
  4. test: driver: adc: add some nucleo boards support for adc test cases

    Some configuration for the boards have to be added into test_adc.c file
    so user can test driver with the test cases. Several nucleo boards are
    added including F091RC/F103RB/F207ZG/F302R8/F401RE/F746ZG/L073RZ/L476RG.
    
    And also ADC dts and pinmux configuration are added into boards own
    pinmux.c and dts file.
    
    Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
    cybertale authored and nashif committed May 7, 2019
    Configuration menu
    Copy the full SHA
    7b68bc3 View commit details
    Browse the repository at this point in the history
  5. doc: boards: arm: nucleo: add ADC support to the boards doc

    The ADC driver in this PR has been tested working on these nucleo
    boards, so ADC support is added to the boards doc.
    
    Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
    cybertale authored and nashif committed May 7, 2019
    Configuration menu
    Copy the full SHA
    9bb471d View commit details
    Browse the repository at this point in the history