-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
ADC generic driver missing features: calibration, reference voltage value #11922
Comments
@anangl was the person leading the ADC API rework that took place recently. |
Thumbs up, I would be happy to see SAADC calibration feature added. |
When somebody comes to support retrieving the internal reference voltage here's what I've found:
Looking at the huge variation in ADC support across just these few platforms I suspect it would be wiser to reduce the complexity of the ADC API to a bare-bones set of operations that do not attempt to provide a generic API for things like channel configuration, acquisition time, resolution, or sequencing. Or just remove it and accept that doing ADC requires a platform-specific driver with no generic abstraction, which would probably be a more maintainable and simpler approach. |
Without this there's no point providing ADC_REF_INTERNAL as an option. Relates-to: issue zephyrproject-rtos#11922 Signed-off-by: Peter A. Bigot <[email protected]>
Add a flag to the sequence structure that tells the driver it should calibrate the ADC prior to initiating the sample. Implement this for nRF SAADC. The implementation supports the workarounds for PAN-86 and PAN-178. Relates-to: issue zephyrproject-rtos#11922 Signed-off-by: Peter A. Bigot <[email protected]>
Add a flag to the sequence structure that tells the driver it should calibrate the ADC prior to initiating the sample. Implement this for nRF SAADC. The implementation supports the workarounds for PAN-86 and PAN-178. Relates-to: issue zephyrproject-rtos#11922 Signed-off-by: Peter A. Bigot <[email protected]>
Add a flag to the sequence structure that tells the driver it should calibrate the ADC prior to initiating the sample. Implement this for nRF SAADC. The implementation supports the workarounds for PAN-86 and PAN-178. Relates-to: issue #11922 Signed-off-by: Peter A. Bigot <[email protected]>
Required for any real-world use of ADC_REF_INTERNAL. Relates-to: issue zephyrproject-rtos#11922 Signed-off-by: Peter A. Bigot <[email protected]>
Required for any real-world use of ADC_REF_INTERNAL. Relates-to: issue #11922 Signed-off-by: Peter A. Bigot <[email protected]>
Looks like calibration and reference voltage APIs are now both present, so if there's a problem with them that can be a new issue. |
Required for any real-world use of ADC_REF_INTERNAL. Relates-to: issue zephyrproject-rtos#11922 Signed-off-by: Peter A. Bigot <[email protected]>
The Nordic SAADC peripheral has a calibration feature that's supposed to be initiated before the first use. The existing generic ADC driver does not have a way to initiate this. Since configuring ADC through the "generic" API requires including the SOC headers anyway, I'm just calibrating manually.
Also there's an option to use the internal reference voltage, but no way to fetch the value of that voltage for whatever board you're running on so the measurement in ADC counts can be converted to a voltage. The value isn't even in the nrfx HAL as far as I can tell.
The text was updated successfully, but these errors were encountered: