From 314b3cdc7bc13f49d7fa6105161b8314d8d599c7 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 22 Sep 2013 11:52:45 -0700 Subject: [PATCH] Don't put MAX2837 into shutdown mode -- powering up takes a bit too long (500us for PLL to stabilize). Will need to revisit, because the MAX2837 chews up significant current (35 to 45mA) when not in shutdown. Remove excess calls to max2837_start() and max2837_stop(). --- firmware/common/rf_path.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/firmware/common/rf_path.c b/firmware/common/rf_path.c index 95d55db2..9aea7279 100644 --- a/firmware/common/rf_path.c +++ b/firmware/common/rf_path.c @@ -73,7 +73,7 @@ void rf_path_init(void) { ssp1_set_mode_max2837(); max2837_setup(); - max2837_mode_shutdown(); + max2837_start(); rffc5071_setup(); } @@ -97,7 +97,6 @@ void rf_path_set_direction(const rf_path_direction_t direction) { ssp1_set_mode_max5864(); max5864_tx(); ssp1_set_mode_max2837(); - max2837_start(); max2837_tx(); sgpio_configure(SGPIO_DIRECTION_TX, true); break; @@ -117,7 +116,6 @@ void rf_path_set_direction(const rf_path_direction_t direction) { ssp1_set_mode_max5864(); max5864_rx(); ssp1_set_mode_max2837(); - max2837_start(); max2837_rx(); sgpio_configure(SGPIO_DIRECTION_RX, true); break; @@ -128,9 +126,9 @@ void rf_path_set_direction(const rf_path_direction_t direction) { switchctrl &= ~SWITCHCTRL_TX; rffc5071_disable(); ssp1_set_mode_max5864(); - max5864_shutdown(); + max5864_standby(); ssp1_set_mode_max2837(); - max2837_stop(); + max2837_set_mode(MAX2837_MODE_STANDBY); sgpio_configure(SGPIO_DIRECTION_RX, true); break; }