diff --git a/firmware/common/rf_path.c b/firmware/common/rf_path.c index 0444ae0e..a8e10417 100644 --- a/firmware/common/rf_path.c +++ b/firmware/common/rf_path.c @@ -82,6 +82,8 @@ void rf_path_set_direction(const rf_path_direction_t direction) { } else { rffc5071_enable(); } + max2837_start(); + max2837_tx(); break; case RF_PATH_DIRECTION_RX: @@ -96,6 +98,8 @@ void rf_path_set_direction(const rf_path_direction_t direction) { } else { rffc5071_enable(); } + max2837_start(); + max2837_rx(); break; case RF_PATH_DIRECTION_OFF: @@ -103,6 +107,7 @@ void rf_path_set_direction(const rf_path_direction_t direction) { /* Set RF path to receive direction when "off" */ switchctrl &= ~SWITCHCTRL_TX; rffc5071_disable(); + max2837_stop(); break; } diff --git a/firmware/hackrf_usb/hackrf_usb.c b/firmware/hackrf_usb/hackrf_usb.c index 61c70430..dfa361a2 100644 --- a/firmware/hackrf_usb/hackrf_usb.c +++ b/firmware/hackrf_usb/hackrf_usb.c @@ -179,23 +179,16 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) { gpio_clear(PORT_LED1_3, PIN_LED3); gpio_set(PORT_LED1_3, PIN_LED2); usb_endpoint_init(&usb_endpoint_bulk_in); - rf_path_set_direction(RF_PATH_DIRECTION_RX); - max2837_start(); - max2837_rx(); } else if (transceiver_mode == TRANSCEIVER_MODE_TX) { gpio_clear(PORT_LED1_3, PIN_LED2); gpio_set(PORT_LED1_3, PIN_LED3); usb_endpoint_init(&usb_endpoint_bulk_out); - rf_path_set_direction(RF_PATH_DIRECTION_TX); - max2837_start(); - max2837_tx(); } else { gpio_clear(PORT_LED1_3, PIN_LED2); gpio_clear(PORT_LED1_3, PIN_LED3); rf_path_set_direction(RF_PATH_DIRECTION_OFF); - max2837_stop(); return; }