From bd7c91b23d1c426c8073847689c64a98884a4b69 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 16:15:27 +0200 Subject: [PATCH 1/8] Enable sweep when resetting settings --- sa_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sa_core.c b/sa_core.c index d0fe648..cec2fd6 100644 --- a/sa_core.c +++ b/sa_core.c @@ -63,6 +63,7 @@ void reset_settings(int m) { // strcpy((char *)spi_buffer, dummy); setting.mode = m; + sweep_mode |= SWEEP_ENABLE; setting.unit_scale_index = 0; setting.unit_scale = 1; setting.unit = U_DBM; From 2257bd0760d5b5137b6f5e077bff8a68bb4e2e0c Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 16:25:12 +0200 Subject: [PATCH 2/8] Show pause status in status panel --- sa_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sa_core.c b/sa_core.c index cec2fd6..a40eb69 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2377,6 +2377,14 @@ void draw_cal_status(void) #endif ili9341_drawstring(buf, x, y); + if (is_paused()) { + color = BRIGHT_COLOR_GREEN; + ili9341_set_foreground(color); + y += YSTEP + YSTEP/2 ; + ili9341_drawstring("PAUSED", x, y); + + } + // if (setting.mode == M_LOW) { // Attenuation if (setting.auto_attenuation) From 55f89365668d8e5ae46ac20ff029ad621b6fa301 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 16:58:25 +0200 Subject: [PATCH 3/8] Repaire selftest 9 --- sa_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sa_core.c b/sa_core.c index a40eb69..d2b51ac 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2900,6 +2900,7 @@ common_silent: break; case TP_30MHZ: set_mode(M_LOW); + maxFreq = 520000000; // needed to measure the LPF rejection set_refer_output(0); // set_step_delay(1); // Do not set !!!!! #ifdef __SPUR__ From a88eb7e3542637f219cca32fb017dfaca8de118d Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 17:02:02 +0200 Subject: [PATCH 4/8] Releax selftest 9 a bit --- sa_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa_core.c b/sa_core.c index d2b51ac..77448ab 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2648,7 +2648,7 @@ static const struct { {TC_BELOW, TPH_SILENT, 600, 720, -75, 0, 0}, // 6 Wide band noise floor high mode {TC_SIGNAL, TP_10MHZEXTRA, 10, 8, -20, 27, -80 }, // 7 BPF loss and stop band {TC_FLAT, TP_10MHZEXTRA, 10, 4, -18, 7, -60}, // 8 BPF pass band flatness - {TC_BELOW, TP_30MHZ, 430, 60, -80, 0, -80}, // 9 LPF cutoff + {TC_BELOW, TP_30MHZ, 430, 60, -75, 0, -75}, // 9 LPF cutoff {TC_SIGNAL, TP_10MHZ_SWITCH,20, 7, -38, 10, -60 }, // 10 Switch isolation using high attenuation {TC_END, 0, 0, 0, 0, 0, 0}, {TC_MEASURE, TP_30MHZ, 30, 7, -22.5, 10, -70 }, // 12 Measure power level and noise From e4b9e72192fd2b8bea3b3dd8db8ef8af7b44f6a1 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 17:14:01 +0200 Subject: [PATCH 5/8] Repaired leveloffset high --- sa_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa_cmd.c b/sa_cmd.c index c31db7a..06eadee 100644 --- a/sa_cmd.c +++ b/sa_cmd.c @@ -183,7 +183,7 @@ VNA_SHELL_FUNCTION(cmd_leveloffset) if (strcmp(argv[0],"low") == 0) config.low_level_offset = v; else if (strcmp(argv[0],"high") == 0) - config.low_level_offset = v; + config.high_level_offset = v; else goto usage; } else { From 491879501272c9f0d9ec72f0ca6900bc681e47b1 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 17:48:40 +0200 Subject: [PATCH 6/8] Small improvement phase noise test --- sa_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sa_core.c b/sa_core.c index 77448ab..b02f5f9 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2641,7 +2641,7 @@ static const struct { } test_case [TEST_COUNT] = {// Condition Preparation Center Span Pass Width(%)Stop {TC_BELOW, TP_SILENT, 0.005, 0.01, 0, 0, 0}, // 1 Zero Hz leakage - {TC_BELOW, TP_SILENT, 0.01, 0.01, -30, 0, 0}, // 2 Phase noise of zero Hz + {TC_BELOW, TP_SILENT, 0.015, 0.01, -30, 0, 0}, // 2 Phase noise of zero Hz {TC_SIGNAL, TP_10MHZ, 20, 7, -37, 10, -90 }, // 3 {TC_SIGNAL, TP_10MHZ, 30, 7, -32, 10, -90 }, // 4 {TC_BELOW, TP_SILENT, 200, 100, -75, 0, 0}, // 5 Wide band noise floor low mode @@ -2885,7 +2885,8 @@ common_silent: case TP_10MHZ: // 10MHz input set_mode(M_LOW); set_refer_output(2); - set_step_delay(1); // Precise scanning speed + setting.step_delay_mode == SD_PRECISE; +// set_step_delay(1); // Precise scanning speed #ifdef __SPUR__ setting.spur = 1; #endif @@ -3221,6 +3222,7 @@ void calibrate(void) for (int j= 0; j < CALIBRATE_RBWS; j++ ) { set_RBW(power_rbw[j]); test_prepare(i); + setting.step_delay_mode == SD_PRECISE; test_acquire(i); // Acquire test local_test_status = test_validate(i); // Validate test // chThdSleepMilliseconds(1000); From 6a2c186e564a7a10b3bb8025d19212cd0ff79140 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 19 Jul 2020 19:06:55 +0200 Subject: [PATCH 7/8] Adapted to v0.3 cal output level --- sa_core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sa_core.c b/sa_core.c index b02f5f9..bd222b3 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2651,7 +2651,7 @@ static const struct { {TC_BELOW, TP_30MHZ, 430, 60, -75, 0, -75}, // 9 LPF cutoff {TC_SIGNAL, TP_10MHZ_SWITCH,20, 7, -38, 10, -60 }, // 10 Switch isolation using high attenuation {TC_END, 0, 0, 0, 0, 0, 0}, - {TC_MEASURE, TP_30MHZ, 30, 7, -22.5, 10, -70 }, // 12 Measure power level and noise + {TC_MEASURE, TP_30MHZ, 30, 7, -25, 10, -55 }, // 12 Measure power level and noise {TC_MEASURE, TP_30MHZ, 270, 4, -50, 10, -75 }, // 13 Measure powerlevel and noise {TC_MEASURE, TPH_30MHZ, 270, 4, -40, 10, -65 }, // 14 Calibrate power high mode {TC_END, 0, 0, 0, 0, 0, 0}, @@ -2885,7 +2885,7 @@ common_silent: case TP_10MHZ: // 10MHz input set_mode(M_LOW); set_refer_output(2); - setting.step_delay_mode == SD_PRECISE; + setting.step_delay_mode = SD_PRECISE; // set_step_delay(1); // Precise scanning speed #ifdef __SPUR__ setting.spur = 1; @@ -3222,7 +3222,9 @@ void calibrate(void) for (int j= 0; j < CALIBRATE_RBWS; j++ ) { set_RBW(power_rbw[j]); test_prepare(i); - setting.step_delay_mode == SD_PRECISE; + setting.step_delay_mode = SD_PRECISE; + setting.agc = S_OFF; + setting.lna = S_OFF; test_acquire(i); // Acquire test local_test_status = test_validate(i); // Validate test // chThdSleepMilliseconds(1000); @@ -3231,7 +3233,7 @@ void calibrate(void) ili9341_drawstring_7x13("Calibration failed", 30, 120); goto quit; } else { - set_actual_power(-22.5); // Should be -22.5dBm + set_actual_power(-25.0); // Should be -23.5dBm (V0.2) OR 25 (V0.3) chThdSleepMilliseconds(1000); } } From 40a2b38ff5592daeb7aad849b918c8eb2f24bd01 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Mon, 20 Jul 2020 09:03:10 +0200 Subject: [PATCH 8/8] Relax signal level threshold --- sa_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa_core.c b/sa_core.c index bd222b3..30ec653 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2816,7 +2816,7 @@ int test_validate(int i) goto common; case TC_MEASURE: case TC_SIGNAL: // Validate signal - common: current_test_status = validate_signal_within(i, 5.0); + common: current_test_status = validate_signal_within(i, 10.0); if (current_test_status == TS_PASS) { // Validate noise floor current_test_status = validate_below(i, 0, setting._sweep_points/2 - W2P(test_case[i].width)); if (current_test_status == TS_PASS) {