Inside a hysteresis stretch the LO sits up to 50 kHz off the target and a product can be inside D
only because of that error. The nearest clearing plan is then the target itself, which the check
recorded as a zero shift and skipped, leaving the line (ZS406, 1603.6 MHz family, RBW 30k, 15 kHz
step). Apply the plan whenever one was found; shift the IF only when the move is nonzero.
Per point in a family window the LO is planned, the product offset computed for the LO exactly on the
target, and the smaller LO move in either direction that puts the product D away is taken; the IF is
shifted by that move so the Si4468 needs no compensation. D is 1.5 RBW at >= 300k, 2 RBW at 30k-100k,
2.5 RBW at 3k-10k, 3 RBW below. Shifts stay within 450 kHz so the IF stays in the BPF with IF1 0.5 MHz
off; below IF only when the budget does not clear A4 or C3. The 2L x 5th Si4468 harmonic line at
1603.6 MHz becomes the sixth family and the check also runs in the ultra path while spur removal is off.
The hw_if dynamic table entries (IF/4 - 400 kHz, 2IF/3 + 160 kHz, 3IF/2) held no line of their own.
Also: fast mode no longer loses an offset step after a full retune (old_delta), and the 200 Hz rule
that never ran is removed.
The spur families come from the Si4468, which all hw_if units share, and the
check works from the planned LO setting, so it covers the ADF4351 grid and its
span dependent R counter as well. Bench verified on a ZS406: the 712.425 MHz
line (missed at RBW <= 10 kHz) and the 355.75/356.06 MHz pair are now avoided,
no level loss, no new spurs, sweep time unchanged within 0.3%.
Outside the five windows no product can come within 2 RBW, so those points keep
the old LO path. The planned path cost about 6.5 us per point over 266-713 MHz.
The window test ran a division and 64-bit compares for five families on every
measurement point: about 10 us per point at -Og (+2.4% sweep time at RBW 300k).
fill_spur_table() now computes the windows, and points outside 266-713 MHz take
the old LO path without the check.
The spurs at 266.95, 355.78, 356.10, 533.91 and 712.50 MHz are LO harmonics mixing
with the Si4468 VCO. Where they show depends on the actual LO frequency (MAX2871 grid,
50 kHz hysteresis, RBW dependent R counter) and on how much of the LO error the Si4468
takes up, so a fixed table missed the 712.485 MHz line at RBW <= 10 kHz and the 356 MHz
pair completely.
MAX2871 units now plan the LO setting first (ADF4351_plan_frequency, no chip state
change), compute where each spur product lands relative to the receive frequency, and
switch to below IF (266.95 MHz) or to the shifted IF only when a product is within
2 RBW and the shift moves it further away. ADF4351_commit_frequency then sends the
setting, so nothing is calculated twice. The LO error compensation moved into
LO_IF_correction so the check and the measurement use the same rule.
The other table entries and all other units are unchanged.
The zero span fill measures sweep_points RSSI samples and the following
reads return them until the buffer is used up. A reader that stopped early,
such as scanraw with fewer points than the sweep or an aborted sweep, left
samples of its frequency and RBW behind, and the next scanraw or sweep
returned them for its first points (a 29-31 MHz scanraw after a 290 point
zero span scanraw showed the noise of a 600 kHz RBW at 30 MHz). The first
point after a change of settings or frequency step now clears them.
perform() now also sets up the first point when the frequency step changed,
not only when dirty: the part that depends on the step (RBW and its
sub-steps, step delay, RSSI correction of the RBW, sweep time estimate) for
a new step, the hardware (radios, switches, MCU clock, correction tables)
only when dirty. scanraw no longer sets dirty itself, so it skips the
hardware setup (the basic power cycles and re-initializes both SI4432,
about 80 ms) and the redraw that its dirty caused after it. Zero span keeps
dirty: its series of RSSI samples needs the full setup at its frequency. A
single zero span point is measured as in a sweep, with a step of half the
RBW, instead of filling the RSSI buffer of a whole zero span sweep (40 ms
on the Ultra).
MODULATION -> BURST keys the generator output on and off: ON TIME of every
PERIOD, continuously or COUNT bursts. In burst mode the FREQ / AM DEPTH /
FM DEVIATION buttons set PERIOD / ON TIME / COUNT, START SWEEP becomes
START BURST (fires COUNT bursts, restarts continuous bursts) and the CTCSS
button is blank. Console: "modulation burst|period|ontime|count|trigger".
The Si4468 stays in TX with its PLL untouched: it runs OOK in asynchronous
TX direct mode from GPIO1, driven by TIM8_CH3 PWM on PB9 (one pulse mode
with the repetition counter for COUNT bursts). GPIO1 is normally the CTS
line to PB9, so while burst is selected GPIO1 is an input and CTS is polled
over SPI (READ_CMD_BUFF, the reply is read in the same transaction). PB9
only drives while GPIO1 is an input and is released before every Si4468
reset. MODEM_FREQ_DEV is set to 0 in burst mode, OOK otherwise shifts the
carrier by the deviation of the RX configuration.
- Burst works where the Si4468 makes the output (up to 1.13 GHz and the
mixer path above it), not from the ADF directly ("MOD: BURST N/A").
- Period 2us..89s, resolution about period/65536, timing from the MCU
clock (about 1%).
- The new settings fill alignment holes of setting_t: its size and the
stored presets stay valid.
F072 builds are unchanged. Tested on HW V0.5.4 with a tinySA basic in zero
span: ON level and frequency equal to CW, about 48 dB on/off ratio, COUNT
bursts exact, pulses from about 2 us.
When test 3 found no signal the hint was drawn directly on the screen and
the next redraw of the test list overwrote it (only "Did Y" remained). The
waiting line of the test list now shows "Cable connected? Touch screen to
continue" instead of "Touch screen to continue", so it is redrawn with the
list. Test 3 itself already shows the signal level fail.
Tested: on a ZS407 test 3 forced to no signal through the debugger, the
hint stays visible; the tinySA BASIC self test passes all tests and ends
with "Touch screen to continue". BASIC net about -4 B flash, +4 B RAM.
The zero-span time grid can be calculated before actual_sweep_time_us is updated, leaving the display aligned to the previous sweep duration.
Calculate grid geometry without mutating global state, recompute it after the measured sweep time is stored, and redraw only when the resulting tuple changes. Use 64-bit arithmetic through the final time-domain division so short sweeps retain exact pixel geometry.
When long sweep completes, a black line appeared at the bottom of the screen
Also, the same issue occurred even with progress bar turned off
This commit amends 3a006f5312, erikkaashoek/tinySA#145
* Hide progress bar in file browser
* Hide progress bar in form/fullscreen menu
* Do not clear progress bar when it was not drawn. This is the case with file browser when previous or next page button is held but not released
Allow drag triggers
Fix Trigger level value on menu (if selected different unit format)
Fixed triggers lines in multi band mode if used different point count
Small fixes