aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-03-24 10:41:04 +0100
committerHarald Welte <laforge@gnumonks.org>2017-04-06 18:41:01 +0200
commitbbe90fd6511c9a0abdb5f41d13c5ab0135b903f7 (patch)
tree70b1f03f31d9b84b1b1bf5f00787bc7cf2cadc6b /tests
parente16b59357411ffa4903ac110ac4ce46d343e878d (diff)
sysmobts: Don't start with 0dBm TRX output power before ramping
In case a system has a high-gain external PA (like a 40dB PA) connected externally, we cannot simply switch the transceiver to 0 dBm in trx_init() only to then start the ramping at much lower levels once the PHJ completes in trx_init_compl_cb(). The result would be a short 0 + 40 dBm spike followed by later ramping. We want to avoid that spike, particularly its associated inrush current, so let's bring up the board with smething very conservative like -50 dBm, and then ramp from there. Change-Id: I0ad91fce64f65e0213c9fcfde3390ace519055db Fixes: SYS#3259
Diffstat (limited to 'tests')
-rw-r--r--tests/tx_power/tx_power_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/tx_power/tx_power_test.c b/tests/tx_power/tx_power_test.c
index d6573620..fb234095 100644
--- a/tests/tx_power/tx_power_test.c
+++ b/tests/tx_power/tx_power_test.c
@@ -44,6 +44,7 @@ static const struct trx_power_params tpp_1002 = {
.nominal_gain_mdB = 0,
},
.ramp = {
+ .max_initial_pout_mdBm = to_mdB(23),
.step_size_mdB = to_mdB(2),
.step_interval_sec = 1,
},
@@ -62,6 +63,7 @@ static const struct trx_power_params tpp_1020 = {
.nominal_gain_mdB = 0,
},
.ramp = {
+ .max_initial_pout_mdBm = to_mdB(0),
.step_size_mdB = to_mdB(2),
.step_interval_sec = 1,
},
@@ -80,6 +82,7 @@ static const struct trx_power_params tpp_1100 = {
.nominal_gain_mdB = 0,
},
.ramp = {
+ .max_initial_pout_mdBm = to_mdB(0),
.step_size_mdB = to_mdB(2),
.step_interval_sec = 1,
},
@@ -98,6 +101,7 @@ static const struct trx_power_params tpp_2050 = {
.nominal_gain_mdB = 0,
},
.ramp = {
+ .max_initial_pout_mdBm = to_mdB(0),
.step_size_mdB = to_mdB(2),
.step_interval_sec = 1,
},
@@ -108,6 +112,7 @@ static void test_sbts1002(struct gsm_bts_trx *trx)
printf("Testing tx_power calculation for sysmoBTS 1002\n");
trx->power_params = tpp_1002;
trx->max_power_red = 0;
+ OSMO_ASSERT(power_ramp_initial_power_mdBm(trx) == to_mdB(23));
OSMO_ASSERT(get_p_max_out_mdBm(trx) == to_mdB(23));
/* at max_power_red = 0, we expect full 23dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(23));
@@ -125,6 +130,7 @@ static void test_sbts1020(struct gsm_bts_trx *trx)
printf("Testing tx_power calculation for sysmoBTS 1020\n");
trx->power_params = tpp_1020;
trx->max_power_red = 0;
+ OSMO_ASSERT(power_ramp_initial_power_mdBm(trx) == to_mdB(-10));
OSMO_ASSERT(get_p_max_out_mdBm(trx) == to_mdB(33));
/* at max_power_red = 0, we expect full 33dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(33));
@@ -143,6 +149,7 @@ static void test_sbts1100(struct gsm_bts_trx *trx)
printf("Testing tx_power calculation for sysmoBTS 1100\n");
trx->power_params = tpp_1100;
trx->max_power_red = 0;
+ OSMO_ASSERT(power_ramp_initial_power_mdBm(trx) == to_mdB(-17));
OSMO_ASSERT(get_p_max_out_mdBm(trx) == to_mdB(40));
/* at max_power_red = 0, we expect full 33dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(40));
@@ -160,6 +167,7 @@ static void test_sbts2050(struct gsm_bts_trx *trx)
printf("Testing tx_power calculation for sysmoBTS 2050\n");
trx->power_params = tpp_2050;
trx->max_power_red = 0;
+ OSMO_ASSERT(power_ramp_initial_power_mdBm(trx) == to_mdB(0));
OSMO_ASSERT(get_p_max_out_mdBm(trx) == to_mdB(37));
/* at max_power_red = 0, we expect full 37dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(37));