Updated praline low and high band tuning (#3030)

* Updated harckrf_gpio methods to more closely reflect hackrf_usb. Added some ui debug updates to RFFC5072 Status View.

* Updated tuning tables for tuning.cpp. Remnoved 15MHz lower limit in max2831.cpp since lower bandwidths don't seem to be causing lower band issues. Added more opportunities for clocks to stabalize at startup in board.cpp. Added/amended UI to help with addresssing low band tuning issues. Cleaned up stale comments in radio.cpp.

* Ran format-code.sh

* Updated to remove commented lines as part of clean up addressing review comments.
This commit is contained in:
stafur
2026-02-22 19:40:49 -05:00
committed by GitHub
parent 1ad092f341
commit 85eaa9d800
10 changed files with 413 additions and 162 deletions
-14
View File
@@ -197,19 +197,9 @@ struct SynthConfig {
*/
void RFFC507x::init() {
#ifdef PRALINE
// CRITICAL: Enable RFFC5072 BEFORE any SPI communication!
// Without this, SPI writes are ignored when ENX=1 (disabled)
gpio_rffc5072_enx.output();
gpio_rffc5072_enx.clear(); // ENX=0 (enabled)
// Small delay for chip to power up
chThdSleepMilliseconds(1);
#else
gpio_rffc5072_resetx.set();
gpio_rffc5072_resetx.output();
reset();
#endif
_bus.init();
@@ -221,12 +211,10 @@ void RFFC507x::reset() {
/* TODO: Is RESETB pin ignored if sdi_ctrl.sipin=1? Programming guide
* description of sdi_ctrl.sipin suggests the pin is not ignored.
*/
#ifndef PRALINE
gpio_rffc5072_resetx.clear();
halPolledDelay(ticks_during_reset);
gpio_rffc5072_resetx.set();
halPolledDelay(ticks_after_reset);
#endif
}
void RFFC507x::flush() {
@@ -299,8 +287,6 @@ void RFFC507x::set_frequency(const rf::Frequency lo_frequency) {
const SynthConfig synth_config = SynthConfig::calculate(lo_frequency);
#ifdef PRALINE
// Ensure RFFC5072 is enabled before SPI writes
gpio_rffc5072_enx.clear(); // ENX=0 (enabled)
// Calculate VCO frequency from LO frequency and divider
const size_t lo_divider = 1U << synth_config.lo_divider_log2; // 2^lodiv_log2