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.
A wake while a command waits puts the notice in front of the next reply.
In front of the pixels of capture, the samples of scanraw or the file of
sd_read it shifted the data (a bench capture came 7 bytes off). These
commands now have the flag CMD_BINARY, the notice then waits for the next
text reply.
On the bench unplugging the generator left the UI off until the jog was
pressed. The USB state check was right (an ST-Link monitor showed
USB_SUSPENDED for the whole unplug), but an output mode repeats its sweep
until an operation is requested, so the sweep loop never got to the check.
The USB suspend event now requests one (OP_CONSOLE) while the UI is off.
The text identifies a tinySA, e.g. the tracking generator and the spectrum
analyzer when a PC uses two tinySA. ui off "text" draws the screen again,
also when the UI is off already, so a new text replaces the old one; a
plain ui off keeps the text and ui off "" removes it. Characters outside
the font show as '?', characters beyond the screen width are left out (39
characters fit the console line, 39 wide ones not the screen).
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).
In an output mode ui_mode_normal() keeps the form menu open, but the exit
only redrew the frame and the grid, so the screen stayed empty until a
touch. The exit now uses the redraw of ui on: frame, grid and an open menu.
ui off shows "Remote only mode. Touch screen to enable UI" and the drawing
functions return at once, so a command no longer waits for a redraw of the
screen. A touch or a jog press only gives the UI back, as do ui on, a lost
USB connection, USB DISK mode and the commands that need the user (new
command flag CMD_UI_ON: selftest, touchcal, touchtest, menu). The PC learns
it from a "ui on" line before its next reply. ui shows the state, it is not
stored and survives mode changes.
While the UI is off message boxes go to the console without their delay,
rbw and sweeptime report the values of changed settings while paused, and
measure nf_store computes the noise figure itself (noise_figure(), it was
only computed while drawing the marker info).
measure {mode} [value].. starts a measurement as the MEASURE menu does. The
values the menu asks with keypads are the arguments, in the same order, e.g.
measure channel_power 5800M 20M. The menu callback is reused, so the console
and the menu set up a measurement in the same way. Only in the spectrum
analyzer, as the menu.
- freq {frequency} sets zero span at the frequency, like sweep cw. It only
paused the sweep.
- hop with N points measures N points from start to stop, it measured N+1.
An invalid range no longer leaves the sweep paused.
- scan {start} {stop} also scans that range in multi-band mode and afterwards
restores the sweep points and frequencies. The stale frequency table gave a
wrong sweep stop and made the next scan very slow (27 s instead of 0.4 s).
- Remove the doubled "usage: " of the if and sd_read commands.
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.
The copyright year is 2026. The thread table of the tinySA Ultra did not
line up: the font is proportional and a space is narrower than a digit or
letter, so padding with spaces moved the columns (e.g. "idle", priority 1).
The numbers are now zero padded, the name follows them and the state is
drawn at a fixed position.
Tested on a ZS407. tinySA Ultra +16 B, BASIC unchanged.
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.
BANDS->SD stored start, end and level only, so the band names were lost.
The name is now written as a quoted fourth field (older firmware ignores
it) and loaded when present (files of older firmware keep the current
names). A line needs start, end and level: the level was read from lines
with only two fields as well.
Tested on a ZS407: band named FMRADIO stored as
0, 900000000, 0.000000000, "FMRADIO"
renamed, loaded from SD: FMRADIO again. tinySA Ultra only.
Loading a preset from SD did not call update_rbw() as caldata_recall()
does, so the RBW menu showed the preset's RBW while the sweep kept using
the previous one.
Tested on a ZS407: preset stored with RBW 30 kHz, RBW set to 300 kHz,
preset loaded from SD: "rbw" and the status panel show 30 kHz.
tinySA Ultra only, +4 B.
"ext_gain" without an argument now prints the current external gain after
the usage line, as "attenuate" and "rbw" do.
Tested on a ZS407 and a tinySA BASIC: 0.0, 12.5 after "ext_gain 12.5". +16 B.
draw_cal_status() clears the whole left panel, the battery included. The
battery is redrawn when a sweep completes, which does not happen while
paused, so after the "pause" command (it draws the status panel directly)
the battery and voltage stayed blank. draw_cal_status() now also requests
the battery redraw (not in output mode, which shows no battery).
Tested on a ZS407 and a tinySA BASIC: battery and voltage shown after
"pause". +8 B.