diff --git a/firmware/sdr-test-project/main.c b/firmware/sdr-test-project/main.c index 1cadb59..df33aff 100644 --- a/firmware/sdr-test-project/main.c +++ b/firmware/sdr-test-project/main.c @@ -52,6 +52,7 @@ #include #include #include +#include #define SSC_MCK 49152000 @@ -179,6 +180,7 @@ void USBDCallbacks_Suspended(void) USBState = STATE_SUSPEND; } + static struct cmd_state cmd_state; static int cmd_tuner_init(struct cmd_state *cs, enum cmd_op op, @@ -369,6 +371,8 @@ int main(void) osdr_fpga_reg_write(OSDR_FPGA_REG_ADC_TIMING, (1 << 8) | 255); osdr_fpga_reg_write(OSDR_FPGA_REG_PWM1, (1 << 400) | 800); + ssc_init(); + // Enter menu loop while (1) { @@ -379,6 +383,11 @@ int main(void) ssc_stats(); } } + + /* Try to (re-)start the SSC DMA if the IN ISO EP is open but the + * SSC DMA is not active */ + if (fastsource_interfaces[2] == 1 && !ssc_active()) + ssc_dma_start(); } }