fix: no more powered antenna when swapping fpga images.

This commit is contained in:
iceman1001 2017-11-30 10:28:59 +01:00
parent 430c6b4b79
commit 5614066a4e
2 changed files with 3 additions and 3 deletions

View file

@ -1152,11 +1152,8 @@ void __attribute__((noreturn)) AppMain(void) {
// Load the FPGA image, which we have stored in our flash.
// (the HF version by default)
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
// turn off antenna
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
StartTickCount();
#ifdef WITH_LCD
LCDInit();

View file

@ -406,6 +406,9 @@ void FpgaDownloadAndGo(int bitstream_version) {
inflateEnd(&compressed_fpga_stream);
// turn off antenna
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
// free eventually allocated BigBuf memory
BigBuf_free(); BigBuf_Clear_ext(false);
}