feat(gust): gust_adc_silicon — Vrefint on real F100 via the dissolved adc-thin driver (v0.5.0 D.2) - #219
Merged
Merged
Conversation
… adc-thin driver (D.2) Reads the on-chip Vrefint (ch17) on the physical STM32VLDISCOVERY through the dissolved adc-thin-cm3.o, exercising enable->configure->start->poll->read on the real ADC1. TSVREFE is carried via the gale#216 cr2_extra mask so the F1 internal channel actually connects. Captured: raw 1646 => implied VDDA ~2985 mV (VLDISCOVERY 3.0V rail), EOC cleared (read-after-EOC exactly-once held on silicon). F100-only (required-features target-f100), so the default g474re build skips it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What
The silicon anchor for the dissolved adc-thin driver, closing v0.5.0 workstream D.2. Points
adc-thin-cm3.o(synth 0.49.0) at the real STM32F100 ADC1 on the physical STM32VLDISCOVERY and reads the on-chip Vrefint (channel 17, the 1.20 V internal reference) — self-contained, no external wiring.Builds on #215 (target-model ADC consts) and #218 (the
cr2_extramask that lets the driver keepTSVREFEset, gale#216).Captured on real hardware (openocd ST-LINK/V1 HLA via the Pi, semihosting)
What it anchors
adc_enable → adc_configure → adc_start → adc_poll(EOC) → adc_read(DR)drives the real ADC1 and returns a correct sample.EOC cleared=true= the driver's read-after-EOC exactly-once property (DR read consumes the sample, clears EOC) held on hardware, not just in the qemu probe / Renode gate.CR2.TSVREFEduring the conversion — the payoff of gale#216:TSVREFEis threaded throughcr2_extraon every managed CR2 write, so the internal channel actually connects (before the fix the absolute CR2 writes dropped it → this read would be floating garbage).Build wiring
gust_adc_siliconis F100-only (required-features = ["target-f100"]) — the defaulttarget-g474rebuild skips it (Vrefint is an F1 internal channel). Verified: default--binsbuild finishes clean;--features target-f100builds the anchor.build.rslinksadc-thin-cm3.ofor the new bin;silicon/run-adc.shis the reproducible flash helper.Honest scope
CR2=ADONin bothadc_enableandadc_configure; on F1 a repeated ADON-write-while-on can kick a conversion, soadc_configuremay trigger an extra ch17 conversion beforeadc_start. Both convert ch17/Vrefint so the DR holds a valid sample either way (the 1646 read confirms it); a strict single-shot on F1 would want the FSM to separate power-on from register config — noted for a follow-on..oitself is dissolved, Kani-proven (7/7) and unchanged here; this PR adds the hardware demonstrator, not new verified code.🤖 Generated with Claude Code