Conversation
…dFreq (#723) The firmware-side SerialFindFreq routine overwrites each channel's centerFrequencyMHz while sweeping. On a tuned/locked system that meant running full_band_ampl_sweep wiped resonator frequency assignments and forced a relock. Snapshot the array before the sweep and write it back after the I/Q results are read.
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.
Summary
SerialFindFreq(triggered by writingrunSerialFindFreq=1) iterates through channels and overwrites each channel'scenterFrequencyMHzwhile driving sweep tones for the eta-scan response measurement. On a tuned/locked system, callingfull_band_ampl_sweeptherefore destroyed the per-channel resonator-frequency assignments and forced the user to relock.get_center_frequency_array(band)beforeset_run_serial_find_freq(band, 1)and write it back viaset_center_frequency_array(band, ...)after the I/Q results are read. Three new lines (one save, one comment, one restore) insidefull_band_ampl_sweep— no other changes.Notes
5cb76fbd(Sep 2025, "fix(smurf_command): Correct centerFrequency register name") renamed_center_frequency_array_regfromcenterFrequencytocenterFrequencyMHz. Before that, the restore would have silently failed.Out of scope
setup_notches— explicitly does not need this fix (see "Scope" above).SerialFindFreqitself — the issue is resolved entirely in pysmurf with the existing register helpers.find_freqvariants — not present on this branch (issues-723frommain); they exist on other branches and would need the same treatment if/when merged.Test plan
flake8 --count python/— 0 errors (matches CI in.github/workflows/test-or-deploy.yml).full_band_ampl_sweep(no relock required) — the user-facing symptom from SerialFindFreq messes up resonator frequency info #723.S.find_freq(band, ...)on an untuned system still produces the same resonator list (the saved array is whatever was in firmware pre-sweep; restoring it is a no-op for a fresh band, sincefind_freqalready callsband_off(band)on entry).