aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2012-02-03 17:36:07 -0800
committerNick Foster <nick@ettus.com>2012-02-03 17:38:33 -0800
commit0d2acffaf4d3e3b02dc9745e94b407356650f923 (patch)
tree616e53d896fcc341ae409e8a004d55e1280bea4d
parentf88dd2289b714b53a59d0fd6da1ddef549940e51 (diff)
downloaduhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.tar.gz
uhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.tar.bz2
uhd-0d2acffaf4d3e3b02dc9745e94b407356650f923.zip
B100/B150: firmware disable FIFOs until host enables to keep junk out
-rw-r--r--firmware/fx2/b100/usrp_common.c2
-rw-r--r--firmware/fx2/b100/usrp_main.c17
2 files changed, 11 insertions, 8 deletions
diff --git a/firmware/fx2/b100/usrp_common.c b/firmware/fx2/b100/usrp_common.c
index 7aedce9f7..a8f29d1fa 100644
--- a/firmware/fx2/b100/usrp_common.c
+++ b/firmware/fx2/b100/usrp_common.c
@@ -33,7 +33,7 @@ init_usrp (void)
CKCON = 0; // MOVX takes 2 cycles
// IFCLK is generated internally and runs at 48 MHz; slave FIFO mode
- IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmIFSLAVE;
+ IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE;
SYNCDELAY;
// configure IO ports (B and D are used by slave FIFO)
diff --git a/firmware/fx2/b100/usrp_main.c b/firmware/fx2/b100/usrp_main.c
index fdc4fce48..436bdeb36 100644
--- a/firmware/fx2/b100/usrp_main.c
+++ b/firmware/fx2/b100/usrp_main.c
@@ -81,6 +81,15 @@ static void initialize_gpif_buffer(int ep) {
FIFORESET = 0x00; SYNCDELAY;
}
+void enable_xfers(int enable) {
+ if(enable) {
+ IFCONFIG |= bmIFSLAVE;
+ } else {
+ IFCONFIG &= ~bmIFSLAVE;
+ }
+ set_led_0(enable);
+}
+
/*
* Handle our "Vendor Extension" commands on endpoint 0.
* If we handle this one, return non-zero.
@@ -174,6 +183,7 @@ app_vendor_cmd (void)
break;
case VRQ_ENABLE_GPIF:
+ enable_xfers(wValueL);
break;
case VRQ_CLEAR_FPGA_FIFO:
@@ -266,13 +276,6 @@ main (void)
EA = 1; // global interrupt enable
fx2_renumerate (); // simulates disconnect / reconnect
-
-// setup_flowstate_common();
-
-//set up gpif slave mode here
- //set slave FIFO mode
- //set synchronous slave mode
- ////both done in init_usrp()
//set FLAGA, FLAGB, FLAGC, FLAGD to be EP2EF, EP4EF, EP6PF, EP8PF
PINFLAGSAB = (bmEP2EF) | (bmEP4EF << 4);