Repository navigation
ADC input range (analog module v3r4): SDK + MCP 2.13.4 - #50
Merged
Merged
Conversation
SDK: BenchPod.adc_range(range=None) reads or switches the ADC input range
(normal ±32.8 V, low ±5.46 V), adc_range_test() self-tests it, and
analog_path / adc_read / capture_adc take range=. calibrate_adc_gain("cal1",
range="low") measures the low range's gain. Captures scale with the fit of
the range in use: the SDK takes it from the adc_range reply and re-reads it
whenever a reply says the pod changed range (off and cal2 put it back to
normal). AdcReading gains range/fullscale/overrange, Capture range/overrange/
clipped_samples, Calibration adc_low_gain_ppm, Capabilities adc_low_range/
adc_range/adc_range_fullscale. capture_adc(source="current_in") reads the
pod's fit after routing, so it is the fit of the range in use.
MCP: new adc_range tool (read, switch, test=true); range on analog_path,
adc_read, capture_adc and calibrate_adc_gain; results report the range,
full scale, overrange and clipped samples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDK and MCP support for the ÷2 ADC low range on analog module v3r4. The firmware side is embeddedci-com/benchpod-firmware#72 (firmware 3.9.5).
SDK (embeddedci 2.13.4)
BenchPod.adc_range(range=None)reads or switches the range:normalis ±32.8 V,lowis ±5.46 V at about 6x the resolution.adc_range_test()runs the self-test through the cal1 loopback.analog_path,adc_readandcapture_adctakerange=.calibrate_adc_gain("cal1", range="low")measures the low range's gain.adc_rangereply, and re-reads it when a reply says the pod changed range (offandcal2put it back to normal).AdcReading:range,fullscale,overrangeCapture:range,overrange,clipped_samplesAnalogPathState.range,Calibration.adc_low_gain_ppmCapabilities:adc_low_range,adc_range,adc_range_fullscaleAdcRange,AdcRangeState,AdcRangeTest,AdcRangeTestPoint.capture_adc(source="current_in")now reads the pod's fit after routing, so the fit matches the range in use. Two existing tests pinned the old command order and were updated.MCP (embeddedci-mcp 2.13.4)
adc_rangetool: read, switch, ortest=true.rangeonanalog_path,adc_read,capture_adcandcalibrate_adc_gain.Tests
tests/test_adc_range.pyruns against a fake pod that tracks the range the way the firmware does.test_adc_low_range_reads_the_cal1_loopback, skips on boards without the low range.make testfor all four suites is green.Needs a v3r4 board: the e2e test above, and checking that captures in the low range scale right over LAN and cloud.
🤖 Generated with Claude Code