mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Merge pull request #707 from Brumi-2021/try_to_solve_RX_ghost_signal_issue_#637
Solve previous regression fw 1.3.1 -->fw 1.4.0 onwards , about RX ghost signal issue #637
This commit is contained in:
commit
83f7c9ae63
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "portapack_persistent_memory.hpp"
|
#include "portapack_persistent_memory.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -242,7 +243,8 @@ GpsSimAppView::GpsSimAppView(
|
|||||||
|
|
||||||
GpsSimAppView::~GpsSimAppView() {
|
GpsSimAppView::~GpsSimAppView() {
|
||||||
radio::disable();
|
radio::disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void GpsSimAppView::on_hide() {
|
void GpsSimAppView::on_hide() {
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "lge_app.hpp"
|
#include "lge_app.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "ui_textentry.hpp"
|
#include "ui_textentry.hpp"
|
||||||
|
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
@ -48,7 +49,8 @@ LGEView::~LGEView() {
|
|||||||
settings.save("tx_lge", &app_settings);
|
settings.save("tx_lge", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown();// better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void LGEView::generate_lge_frame(const uint8_t command, const uint16_t address_a, const uint16_t address_b, std::vector<uint8_t>& data) {
|
void LGEView::generate_lge_frame(const uint8_t command, const uint16_t address_a, const uint16_t address_b, std::vector<uint8_t>& data) {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "soundboard_app.hpp"
|
#include "soundboard_app.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "tonesets.hpp"
|
#include "tonesets.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
using namespace tonekey;
|
using namespace tonekey;
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -295,7 +296,8 @@ SoundBoardView::~SoundBoardView() {
|
|||||||
|
|
||||||
stop();
|
stop();
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "manchester.hpp"
|
#include "manchester.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -290,7 +291,8 @@ ADSBTxView::~ADSBTxView() {
|
|||||||
settings.save("tx_adsb", &app_settings);
|
settings.save("tx_adsb", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, withouth ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADSBTxView::generate_frames() {
|
void ADSBTxView::generate_frames() {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "aprs.hpp"
|
#include "aprs.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
#include "portapack_persistent_memory.hpp"
|
#include "portapack_persistent_memory.hpp"
|
||||||
@ -48,7 +49,8 @@ APRSTXView::~APRSTXView() {
|
|||||||
settings.save("tx_aprs", &app_settings);
|
settings.save("tx_aprs", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void APRSTXView::start_tx() {
|
void APRSTXView::start_tx() {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "portapack_persistent_memory.hpp"
|
#include "portapack_persistent_memory.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -145,6 +146,8 @@ BHTView::~BHTView() {
|
|||||||
settings.save("tx_bht", &app_settings);
|
settings.save("tx_bht", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
BHTView::BHTView(NavigationView& nav) {
|
BHTView::BHTView(NavigationView& nav) {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "ui_coasterp.hpp"
|
#include "ui_coasterp.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "portapack_persistent_memory.hpp"
|
#include "portapack_persistent_memory.hpp"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -42,7 +43,8 @@ CoasterPagerView::~CoasterPagerView() {
|
|||||||
settings.save("tx_coaster", &app_settings);
|
settings.save("tx_coaster", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoasterPagerView::generate_frame() {
|
void CoasterPagerView::generate_frame() {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
|
|
||||||
@ -208,7 +209,8 @@ EncodersView::~EncodersView() {
|
|||||||
settings.save("tx_ook", &app_settings);
|
settings.save("tx_ook", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // ghost signal c/m to the problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function after load_sram()
|
||||||
}
|
}
|
||||||
|
|
||||||
void EncodersView::update_progress() {
|
void EncodersView::update_progress() {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "ui_freqman.hpp"
|
#include "ui_freqman.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -183,7 +184,8 @@ void JammerView::focus() {
|
|||||||
|
|
||||||
JammerView::~JammerView() {
|
JammerView::~JammerView() {
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void JammerView::on_retune(const rf::Frequency freq, const uint32_t range) {
|
void JammerView::on_retune(const rf::Frequency freq, const uint32_t range) {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "ui_keyfob.hpp"
|
#include "ui_keyfob.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -140,7 +141,8 @@ KeyfobView::~KeyfobView() {
|
|||||||
settings.save("tx_keyfob", &app_settings);
|
settings.save("tx_keyfob", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyfobView::update_progress(const uint32_t progress) {
|
void KeyfobView::update_progress(const uint32_t progress) {
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "modems.hpp"
|
#include "modems.hpp"
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
#include "serializer.hpp"
|
#include "serializer.hpp"
|
||||||
|
|
||||||
@ -44,7 +45,8 @@ LCRView::~LCRView() {
|
|||||||
settings.save("tx_lcr", &app_settings);
|
settings.save("tx_lcr", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -30,6 +30,7 @@ using wolfson::wm8731::WM8731;
|
|||||||
|
|
||||||
#include "tonesets.hpp"
|
#include "tonesets.hpp"
|
||||||
#include "portapack_hal.hpp"
|
#include "portapack_hal.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "irq_controls.hpp"
|
#include "irq_controls.hpp"
|
||||||
|
|
||||||
@ -178,6 +179,7 @@ void MicTXView::rxaudio(bool is_on) {
|
|||||||
receiver_model.set_vga(rx_vga);
|
receiver_model.set_vga(rx_vga);
|
||||||
receiver_model.set_rf_amp(rx_amp);
|
receiver_model.set_rf_amp(rx_amp);
|
||||||
receiver_model.enable();
|
receiver_model.enable();
|
||||||
|
hackrf::cpld::load_sram_no_verify(); // to have a good RX without any ghost inside Mic App
|
||||||
audio::output::start();
|
audio::output::start();
|
||||||
} else { //These incredibly convoluted steps are required for the vumeter to reappear when stopping RX.
|
} else { //These incredibly convoluted steps are required for the vumeter to reappear when stopping RX.
|
||||||
receiver_model.set_modulation(ReceiverModel::Mode::NarrowbandFMAudio); //This fixes something with AM RX...
|
receiver_model.set_modulation(ReceiverModel::Mode::NarrowbandFMAudio); //This fixes something with AM RX...
|
||||||
@ -548,7 +550,8 @@ MicTXView::~MicTXView() {
|
|||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
if (rx_enabled) //Also turn off audio rx if enabled
|
if (rx_enabled) //Also turn off audio rx if enabled
|
||||||
rxaudio(false);
|
rxaudio(false);
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "hackrf_gpio.hpp"
|
#include "hackrf_gpio.hpp"
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "ui_textentry.hpp"
|
#include "ui_textentry.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
|
||||||
@ -102,7 +103,8 @@ MorseView::~MorseView() {
|
|||||||
settings.save("tx_morse", &app_settings);
|
settings.save("tx_morse", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit .
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void MorseView::paint(Painter&) {
|
void MorseView::paint(Painter&) {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "ui_pocsag_tx.hpp"
|
#include "ui_pocsag_tx.hpp"
|
||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "ui_textentry.hpp"
|
#include "ui_textentry.hpp"
|
||||||
|
|
||||||
@ -43,7 +44,8 @@ POCSAGTXView::~POCSAGTXView() {
|
|||||||
settings.save("tx_pocsag", &app_settings);
|
settings.save("tx_pocsag", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void POCSAGTXView::on_tx_progress(const uint32_t progress, const bool done) {
|
void POCSAGTXView::on_tx_progress(const uint32_t progress, const bool done) {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -180,7 +181,8 @@ RDSView::~RDSView() {
|
|||||||
settings.save("tx_rds", &app_settings);
|
settings.save("tx_rds", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void RDSView::start_tx() {
|
void RDSView::start_tx() {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
#include "hackrf_hal.hpp"
|
#include "hackrf_hal.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -93,7 +94,8 @@ SSTVTXView::~SSTVTXView() {
|
|||||||
settings.save("tx_sstv", &app_settings);
|
settings.save("tx_sstv", &app_settings);
|
||||||
|
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSTVTXView::on_tuning_frequency_changed(rf::Frequency f) {
|
void SSTVTXView::on_tuning_frequency_changed(rf::Frequency f) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "baseband_api.hpp"
|
#include "baseband_api.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
@ -39,7 +40,8 @@ void TouchTunesView::focus() {
|
|||||||
|
|
||||||
TouchTunesView::~TouchTunesView() {
|
TouchTunesView::~TouchTunesView() {
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
hackrf::cpld::load_sram_no_verify(); // to leave all RX ok, without ghost signal problem at the exit.
|
||||||
|
baseband::shutdown(); // better this function at the end, not load_sram() that sometimes produces hang up.
|
||||||
}
|
}
|
||||||
|
|
||||||
void TouchTunesView::stop_tx() {
|
void TouchTunesView::stop_tx() {
|
||||||
|
@ -114,6 +114,20 @@ bool load_sram() {
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void load_sram_no_verify() {
|
||||||
|
// CoolRunner II family has Hybrid memory CPLD arquitecture (SRAM+NVM)
|
||||||
|
// It seems that after using TX App somehow , I do not why , the CPLD_SRAM part needs to be re_loaded to solve #637 ghost beat
|
||||||
|
// load_sram() it is already called at each boot in portapack.cpp ,including verify CPLD part.
|
||||||
|
// Here we skipped CPLD verify part,just to be quicker (in case any CPLD problem it will be detected in the boot process).
|
||||||
|
|
||||||
|
auto jtag_target_hackrf_cpld = jtag_target_hackrf();
|
||||||
|
hackrf::one::cpld::CPLD hackrf_cpld { jtag_target_hackrf_cpld };
|
||||||
|
|
||||||
|
hackrf_cpld.write_sram(hackrf::one::cpld::verify_blocks);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool verify_eeprom() {
|
bool verify_eeprom() {
|
||||||
auto jtag_target_hackrf_cpld = jtag_target_hackrf();
|
auto jtag_target_hackrf_cpld = jtag_target_hackrf();
|
||||||
hackrf::one::cpld::CPLD hackrf_cpld { jtag_target_hackrf_cpld };
|
hackrf::one::cpld::CPLD hackrf_cpld { jtag_target_hackrf_cpld };
|
||||||
|
@ -38,6 +38,7 @@ namespace hackrf {
|
|||||||
namespace cpld {
|
namespace cpld {
|
||||||
|
|
||||||
bool load_sram();
|
bool load_sram();
|
||||||
|
void load_sram_no_verify(); // added to solve issue #637 , "ghost" signal at RX , after using any TX App
|
||||||
bool verify_eeprom();
|
bool verify_eeprom();
|
||||||
void init_from_eeprom();
|
void init_from_eeprom();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user