summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/zpu/apps/txrx_uhd.c18
-rw-r--r--firmware/zpu/lib/memory_map.h1
2 files changed, 8 insertions, 11 deletions
diff --git a/firmware/zpu/apps/txrx_uhd.c b/firmware/zpu/apps/txrx_uhd.c
index f9eedfc7d..8cc108f9d 100644
--- a/firmware/zpu/apps/txrx_uhd.c
+++ b/firmware/zpu/apps/txrx_uhd.c
@@ -54,23 +54,19 @@ static void handle_udp_data_packet(
//handle ICMP destination unreachable
if (payload == NULL) switch(src.port){
case USRP2_UDP_RX_DSP0_PORT:
- //the end continuous streaming command
- sr_rx_ctrl0->cmd = 1 << 31 | 1 << 28; //no samples now
- sr_rx_ctrl0->time_secs = 0;
- sr_rx_ctrl0->time_ticks = 0; //latch the command
- break;
+ //reset dsp to stop streaming
+ sr_rx_ctrl0->clear = 1;
+ return;
case USRP2_UDP_RX_DSP1_PORT:
- //the end continuous streaming command
- sr_rx_ctrl1->cmd = 1 << 31 | 1 << 28; //no samples now
- sr_rx_ctrl1->time_secs = 0;
- sr_rx_ctrl1->time_ticks = 0; //latch the command
- break;
+ //reset dsp to stop streaming
+ sr_rx_ctrl1->clear = 1;
+ return;
case USRP2_UDP_TX_DSP0_PORT:
//end async update packets per second
sr_tx_ctrl->cyc_per_up = 0;
- break;
+ return;
default: return;
}
diff --git a/firmware/zpu/lib/memory_map.h b/firmware/zpu/lib/memory_map.h
index 75727bb23..84298d3c1 100644
--- a/firmware/zpu/lib/memory_map.h
+++ b/firmware/zpu/lib/memory_map.h
@@ -302,6 +302,7 @@ typedef struct {
volatile uint32_t cmd; // {now, chain, num_samples(30)
volatile uint32_t time_secs;
volatile uint32_t time_ticks;
+ volatile uint32_t clear;
} sr_rx_ctrl_t;
#define sr_rx_ctrl0 ((sr_rx_ctrl_t *) _SR_ADDR(SR_RX_CTRL0))