diff --git a/firmware/baseband/main.cpp b/firmware/baseband/main.cpp index 8952dcca3..4ef32f738 100755 --- a/firmware/baseband/main.cpp +++ b/firmware/baseband/main.cpp @@ -278,6 +278,11 @@ int main(void) { auto message = reinterpret_cast(p); if( message->configuration.mode != baseband_configuration.mode ) { + if( baseband_processor ) { + baseband::dma::disable(); + rf::rssi::stop(); + } + // TODO: Timing problem around disabling DMA and nulling and deleting old processor auto old_p = baseband_processor; baseband_processor = nullptr; @@ -313,9 +318,6 @@ int main(void) { rf::rssi::start(); } baseband::dma::enable(direction); - } else { - baseband::dma::disable(); - rf::rssi::stop(); } }