Files
mayhem-firmware/firmware/application
Mo 60b5cc8832 PRALINE: fix TX/RX above 2580 MHz (high-band mixer routing + tuning) (#3316)
* PRALINE: take high-band IF from the reference tune tables

high_band() used a hand-written formula for the second LO that pushed the
MAX2831 IF above 2600 MHz from ~4.5 GHz upwards (2733 MHz at 5 GHz,
2760 MHz at 7.2 GHz), outside its usable range. Use the reference
praline_tune_config_tx/rx tables (already present in tuning.cpp but only
consulted below 2580 MHz): TX IF stays within 2325-2575 MHz, low-side
injection LO = RF - IF, and the RX quarter-rate shift is applied, as in
hackrf radio.c radio_update_frequency() for RF_PATH_FILTER_HIGH_PASS.
HackRF One keeps its existing formula (#ifndef PRALINE).

* RFFC507x: select LO divider like the reference, add RELOK

The LO divider loop stopped at the first divider that lifted the VCO to or
above its 2.7 GHz minimum, parking the VCO exactly on the floor for some
LOs (e.g. LO = 675 MHz used for 3.000 GHz TX on PRALINE: 675 x 4 =
2700.0 MHz) where lock is marginal. Mirror hackrf rffc5071_config_synth()
and pick the largest divider that keeps the VCO at or below 5.4 GHz; the
result is identical to the reference for every LO in 85-5400 MHz.

Also request a relock (PLL_CTRL.relok) after reprogramming the synthesizer
while the part is enabled, as rffc5071_set_frequency() does.

* PRALINE: enable the RFFC5072 mixer on the high band

Regression from #3238: the PRALINE RF path enabled the mixer only on the
Low band (mix_bypass.setState(band == Band::Low)). Before #3238 (#3030)
the mixer was bypassed only in the Mid window. On the High band (>2580 MHz)
tuning.cpp still programmed and enabled the RFFC5072, but the RF switch
(MIX_EN_N) routed around it, so the MAX2831 IF (~2.3-2.7 GHz) appeared at
the antenna port instead of the requested RF: TX and RX above 2580 MHz
effectively did not work from the GUI, while hackrf_transfer with the
reference firmware did. Enable the mixer on Low and High, bypass only on
Mid, as hackrf rf_path.c rf_path_set_filter() does (LOW_PASS and HIGH_PASS
both call mixer_enable(); only BYPASS disables it).

* Update VCO frequency logic with conditional compilation

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix code formatting (clang-format)

Single space before a trailing comment in rffc507x.cpp set_frequency(),
per the project's clang-format config. No functional change.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-16 16:03:19 +02:00
..
2026-08-08 21:47:54 +02:00
2026-01-08 10:34:05 +01:00
2026-08-21 19:56:54 +02:00
2026-08-08 21:47:54 +02:00
2026-07-10 21:37:41 +02:00
2026-06-19 07:48:55 +02:00
2025-12-14 11:26:21 +01:00
2026-06-15 19:28:47 +02:00
2026-06-15 19:28:47 +02:00
2026-02-24 11:23:41 +01:00
2026-05-09 12:23:43 +02:00
2025-12-14 11:26:21 +01:00
2024-11-22 09:54:34 +01:00
2026-05-10 00:08:05 +02:00
2025-04-11 10:46:04 +00:00
2026-06-12 22:15:44 +02:00
2024-11-08 11:46:27 +01:00
2024-11-08 11:46:27 +01:00
2026-02-24 11:23:41 +01:00
2026-01-30 17:18:13 +01:00
2026-02-12 12:41:12 +01:00
2026-01-16 09:57:45 +01:00
2026-01-16 09:57:45 +01:00
2026-06-19 07:48:55 +02:00
2024-11-19 17:16:37 +01:00
2024-11-19 17:16:37 +01:00
2026-07-10 21:37:41 +02:00
2026-02-24 11:23:41 +01:00
2026-07-02 10:05:34 +02:00
2025-11-26 19:13:21 +01:00
2026-04-30 15:00:19 +02:00
2026-02-24 11:23:41 +01:00
2025-09-01 11:50:46 +02:00
2026-02-24 11:23:41 +01:00
2024-11-22 09:54:34 +01:00
2024-11-22 09:54:34 +01:00
2026-06-19 07:48:55 +02:00
2026-08-21 19:56:54 +02:00
2026-04-30 15:00:19 +02:00
2026-04-30 15:00:19 +02:00
2026-04-30 15:00:19 +02:00
2026-02-24 11:23:41 +01:00
2026-08-21 19:56:54 +02:00
2024-11-08 11:46:27 +01:00
2026-05-30 01:49:49 +02:00
2026-05-30 01:49:49 +02:00
2026-05-30 01:49:49 +02:00