diff options
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/microblaze/apps/txrx_uhd.c | 2 | ||||
| -rw-r--r-- | firmware/microblaze/lib/net_common.c | 11 | ||||
| -rw-r--r-- | firmware/microblaze/lib/pic.c | 2 | ||||
| -rw-r--r-- | firmware/microblaze/usrp2/Makefile.am | 3 | ||||
| -rw-r--r-- | firmware/microblaze/usrp2/memory_map.h | 3 | 
5 files changed, 17 insertions, 4 deletions
diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/microblaze/apps/txrx_uhd.c index 1dd6e80ac..e38eb621d 100644 --- a/firmware/microblaze/apps/txrx_uhd.c +++ b/firmware/microblaze/apps/txrx_uhd.c @@ -372,7 +372,7 @@ eth_pkt_inspector(dbsm_t *sm, int bufno)    // In the future, a hardware state machine will do this...    if ( //warning! magic numbers approaching....        (((buff + ((2 + 14 + 20)/sizeof(uint32_t)))[0] & 0xffff) == USRP2_UDP_DATA_PORT) && -      ((buff + ((2 + 14 + 20 + 8)/sizeof(uint32_t)))[0] != USRP2_INVALID_VRT_HEADER) +      ((buff + ((2 + 14 + 20 + 8)/sizeof(uint32_t)))[1] != USRP2_INVALID_VRT_HEADER)    ) return false;    //test if its an ip recovery packet diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c index 6c9509c92..0efb26639 100644 --- a/firmware/microblaze/lib/net_common.c +++ b/firmware/microblaze/lib/net_common.c @@ -291,8 +291,17 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst,  {    switch (icmp->type){    case ICMP_DUR:	// Destinatino Unreachable -    //stop_streaming(); //FIXME      if (icmp->code == ICMP_DUR_PORT){	// port unreachable +      //handle destination port unreachable (the host ctrl+c'd the app): + +      //end async update packets per second +      sr_tx_ctrl->cyc_per_up = 0; + +      //the end continuous streaming command +      sr_rx_ctrl->cmd = (1 << 31) | 1; //one sample, asap +      sr_rx_ctrl->time_secs = 0; +      sr_rx_ctrl->time_ticks = 0; //latch the command +        //struct udp_hdr *udp = (struct udp_hdr *)((char *)icmp + 28);        //printf("icmp port unr %d\n", udp->dest);        putchar('i'); diff --git a/firmware/microblaze/lib/pic.c b/firmware/microblaze/lib/pic.c index e89d2b755..226da5f85 100644 --- a/firmware/microblaze/lib/pic.c +++ b/firmware/microblaze/lib/pic.c @@ -44,7 +44,7 @@ pic_init(void)    // uP is level triggered    pic_regs->mask = ~0;				       // mask all interrupts -  pic_regs->edge_enable = PIC_ONETIME_INT; +  pic_regs->edge_enable = PIC_ONETIME_INT | PIC_UNDERRUN_INT | PIC_OVERRUN_INT | PIC_PPS_INT;    pic_regs->polarity = ~0 & ~PIC_PHY_INT;	       // rising edge    pic_regs->pending = ~0;			       // clear all pending ints  } diff --git a/firmware/microblaze/usrp2/Makefile.am b/firmware/microblaze/usrp2/Makefile.am index 8da013980..ba426b75c 100644 --- a/firmware/microblaze/usrp2/Makefile.am +++ b/firmware/microblaze/usrp2/Makefile.am @@ -22,10 +22,11 @@ AM_CFLAGS = \  AM_LDFLAGS = \  	$(COMMON_LFLAGS) \ -	libusrp2.a \  	-Wl,-defsym -Wl,_TEXT_START_ADDR=0x0050 \  	-Wl,-defsym -Wl,_STACK_SIZE=3072 +LDADD = libusrp2.a +  ########################################################################  # USRP2 specific library and programs  ######################################################################## diff --git a/firmware/microblaze/usrp2/memory_map.h b/firmware/microblaze/usrp2/memory_map.h index 41a2820bc..e7f41bc8d 100644 --- a/firmware/microblaze/usrp2/memory_map.h +++ b/firmware/microblaze/usrp2/memory_map.h @@ -463,6 +463,9 @@ typedef struct {  typedef struct {    volatile uint32_t     num_chan;    volatile uint32_t     clear_state;	// clears out state machine, fifos, +  volatile uint32_t     report_sid; +  volatile uint32_t     policy; +  volatile uint32_t     cyc_per_up;  } sr_tx_ctrl_t;  #define sr_tx_ctrl ((sr_tx_ctrl_t *) _SR_ADDR(SR_TX_CTRL))  | 
