-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Feat add ad4114 driver #82816
Feat add ad4114 driver #82816
Conversation
Hello @pcurt, and thank you very much for your first pull request to the Zephyr project! |
490e84b
to
8c6edc0
Compare
8c6edc0
to
f8248d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the board to samples/drivers/adc/adc_sequence/sample.yaml
to build in CI
1fed4b5
to
b46b87c
Compare
The AD4114 is a low power, low noise, 24-bit, sigma-delta ADC. This driver allows to use it with the Zephyr ADC API. It uses the continuous acquisition ADC feature. This ADC allows many configutations, but this driver uses it as the most generic way : - each can channel can be enable or disable using the device tree configuration - configure two setups (one for unipolar inputs, one for bipolar inputs) - use an external clock Signed-off-by: Pierrick Curt <[email protected]>
b46b87c
to
07cc7a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
|
@MaureenHelm can you please review ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits, but otherwise LGTM
This examples shows how to use the AD4114 ADC on a stm32f3_disco board. As the AD4114 is a 24bits ADC resolution we need to be able to pass 32bits buffer to get the samples. CONFIG_SEQUENCE_RESOLUTION is set to 12 instead of 24, and the gain zephyr,vref-mv is adapted to avoid overflows using the exisiting adc_raw_to_millivolts function. Signed-off-by: Pierrick Curt <[email protected]>
07cc7a2
to
cf352a4
Compare
Hi @pcurt! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Add a driver to be able to use an SPI external AD4114 ADC.
https://www.analog.com/en/products/ad4114.html#part-details
This is a single supply, multichannel, 31.25 kSPS, 24-Bit, Sigma-Delta ADC.
Also update samples to show how to use it on a stm32f3 discovery board.