Robustness increase

Shifted some stack space
This commit is contained in:
erikkaashoek 2019-09-14 10:25:42 +02:00
parent 9ed5a41d2e
commit 4ff2f63b19
4 changed files with 39 additions and 9 deletions

24
main.c
View file

@ -59,12 +59,15 @@ int8_t stop_the_world = FALSE;
BaseSequentialStream *saved_chp;
static THD_WORKING_AREA(waThread1, 640);
static THD_WORKING_AREA(waThread1, 640-64);
static THD_FUNCTION(Thread1, arg)
{
(void)arg;
chRegSetThreadName("sweep");
//FFT(measured[0],measured[1],101,0);
while (1) {
if (stop_the_world) {
__WFI();
@ -293,7 +296,7 @@ int16_t dump_selection = 0;
volatile int16_t wait_count = 0;
float measured[2][101][2];
float measured[2][MEASURED_LENGTH][2];
static void
wait_dsp(int count)
@ -1470,6 +1473,16 @@ static void cmd_trace(BaseSequentialStream *chp, int argc, char *argv[])
}
return;
}
#if 0
if (strcmp(argv[0], "tdr") == 0) {
set_trace_type(1, TRC_TDR);
trace[0].channel = 1; // Get data from S21 after doing the FFT
set_trace_type(1, TRC_OFF);
set_trace_type(2, TRC_OFF);
set_trace_type(3, TRC_OFF);
goto exit;
}
#endif
if (strcmp(argv[0], "all") == 0 &&
argc > 1 && strcmp(argv[1], "off") == 0) {
@ -1539,7 +1552,10 @@ static void cmd_trace(BaseSequentialStream *chp, int argc, char *argv[])
usage:
chprintf(chp, "trace {0|1|2|3|all} [logmag|phase|smith|linear|delay|swr|real|imag|r|x|off] [src]\r\n");
chprintf(chp, "trace {0|1|2|3} {scale|refpos} {value}\r\n");
}
#if 0
chprintf(chp, "trace tdr\r\n");
#endif
}
void set_electrical_delay(float picoseconds)
@ -1800,7 +1816,7 @@ static void cmd_version(BaseSequentialStream *chp, int argc, char *argv[])
chprintf(chp, "%s\r\n", NANOVNA_VERSION);
}
static THD_WORKING_AREA(waThread2, /* cmd_* max stack size + alpha */410);
static THD_WORKING_AREA(waThread2, /* cmd_* max stack size + alpha */410+64);
static const ShellCommand commands[] =
{