diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-11 18:38:06 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-11 18:38:06 -0700 |
commit | b49e2955b0f68d59e7903f89a26c39dc9b3614fd (patch) | |
tree | fcdc50d9cf78b482de1d3227c0b5dec05be6bfae /host/lib/usrp/usrp2/mboard_impl.cpp | |
parent | d54fd2abffd8849bf41a5f8084a828e6472ba342 (diff) | |
download | uhd-b49e2955b0f68d59e7903f89a26c39dc9b3614fd.tar.gz uhd-b49e2955b0f68d59e7903f89a26c39dc9b3614fd.tar.bz2 uhd-b49e2955b0f68d59e7903f89a26c39dc9b3614fd.zip |
usrp2: enable the cycles per ack, and drain recv without the timeout (fixes previous conflict)
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 37e69b39d..ddf147c8d 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -95,7 +95,7 @@ usrp2_mboard_impl::usrp2_mboard_impl( _iface->poke32(U2_REG_TX_CTRL_REPORT_SID, 1); //sid 1 (different from rx) _iface->poke32(U2_REG_TX_CTRL_POLICY, U2_FLAG_TX_CTRL_POLICY_NEXT_PACKET); const size_t cycles_per_ack = size_t(_clock_ctrl->get_master_clock_rate()/100); //100 aps - //_iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_ACK, U2_FLAG_TX_CTRL_ACK_ENB | cycles_per_ack); //FIXME total pause frames + _iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_ACK, U2_FLAG_TX_CTRL_ACK_ENB | cycles_per_ack); static const double sram_frac = 1.0/8.0; //fraction of sram to fill before ack const size_t packets_per_ack = size_t(usrp2_impl::sram_bytes*sram_frac/send_bytes_per_packet); _iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_ACK, U2_FLAG_TX_CTRL_ACK_ENB | packets_per_ack); @@ -121,7 +121,8 @@ usrp2_mboard_impl::usrp2_mboard_impl( } usrp2_mboard_impl::~usrp2_mboard_impl(void){ - /* NOP */ + _iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_ACK, 0); + _iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_ACK, 0); } /*********************************************************************** |