diff --git a/firmware/application/cpld_update.cpp b/firmware/application/cpld_update.cpp index 64134e83..cafa81cb 100644 --- a/firmware/application/cpld_update.cpp +++ b/firmware/application/cpld_update.cpp @@ -113,3 +113,10 @@ bool cpld_hackrf_verify_eeprom() { return ok; } + +void cpld_hackrf_init_from_eeprom() { + auto jtag_target_hackrf_cpld = jtag_target_hackrf(); + cpld::xilinx::XC2C64A hackrf_cpld { jtag_target_hackrf_cpld }; + + hackrf_cpld.init_from_eeprom(); +} diff --git a/firmware/application/cpld_update.hpp b/firmware/application/cpld_update.hpp index bd317e10..17c42bd5 100644 --- a/firmware/application/cpld_update.hpp +++ b/firmware/application/cpld_update.hpp @@ -26,5 +26,6 @@ bool cpld_update_if_necessary(); bool cpld_hackrf_load_sram(); bool cpld_hackrf_verify_eeprom(); +void cpld_hackrf_init_from_eeprom(); #endif/*__CPLD_UPDATE_H__*/ diff --git a/firmware/application/portapack.cpp b/firmware/application/portapack.cpp index 344f0aa8..16986c17 100644 --- a/firmware/application/portapack.cpp +++ b/firmware/application/portapack.cpp @@ -166,6 +166,9 @@ void shutdown() { radio::disable(); audio::shutdown(); + + cpld_hackrf_init_from_eeprom(); + clock_manager.shutdown(); power.shutdown();