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

STM32: Initialize ADC peripheral for each AnalogIn object creation #5513

Merged
merged 14 commits into from Nov 22, 2017

Conversation

Projects
None yet
6 participants
@bcostm
Contributor

bcostm commented Nov 16, 2017

Description

Main change:
Before this PR, the ADC peripheral was initialized only once during the first AnalogIn object creation. Some users has reported issues when multiple AnalogIn objects are created (Issue #5443).

I have never been able to reproduce these fails but we have decided to initialize anyway the ADC peripheral every time a AnalogIn object is created. Note that it is not the case for the ADC calibration, which is still done once.

Other changes:

  • Move the analogin_read and analogin_read_u16 functions in the analog_api.c file which is now common to all STM devices.
  • Rename all analog_api.c files in analog_device.c files
  • Align all files together

Status

READY

Migrations

NO

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 16, 2017

@Ivan-Perez

This comment has been minimized.

Ivan-Perez commented Nov 16, 2017

Hi,

We've just integrated those changes into our codebase and now our program works properly.

Thank you very much!

@0xc0170

adc_calibrated could smaller due to its boolean type of use

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 17, 2017

/morph build

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Nov 17, 2017

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 17, 2017

Build : SUCCESS

Build number : 543
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5513/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@bcostm

This comment has been minimized.

Contributor

bcostm commented Nov 17, 2017

adc_calibrated could smaller due to its boolean type of use

OK. I will change it in a boolean type.

Done

@bcostm bcostm force-pushed the bcostm:fix_adc_inited branch to c54e907 Nov 17, 2017

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 20, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 20, 2017

Build : SUCCESS

Build number : 552
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5513/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Nov 20, 2017

/morph uvisor-test

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Nov 21, 2017

@theotherjimmy theotherjimmy merged commit ced2f74 into ARMmbed:master Nov 22, 2017

6 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bcostm bcostm deleted the bcostm:fix_adc_inited branch Nov 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment