diff options
author | michael-west <michael.west@ettus.com> | 2021-07-26 14:42:41 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-08-16 15:42:26 -0500 |
commit | 175e553c44996925dc0f3e135f78716ce6f0e4ea (patch) | |
tree | def31becd727058adb14fbf9497b76d4f4e1e325 /host/lib/usrp/b200 | |
parent | d06eb0b44e13edfe64a28ac0a2276b51b5b11ffe (diff) | |
download | uhd-175e553c44996925dc0f3e135f78716ce6f0e4ea.tar.gz uhd-175e553c44996925dc0f3e135f78716ce6f0e4ea.tar.bz2 uhd-175e553c44996925dc0f3e135f78716ce6f0e4ea.zip |
B200: Fix overflow handling
- Use FPGA images with fixed sc12 converter.
- Properly flush channels and restart streaming in the case of an overrun.
Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r-- | host/lib/usrp/b200/b200_io_impl.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 2433ab2db..dac39915b 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -496,28 +496,23 @@ void b200_impl::handle_overflow(const size_t radio_index) _radio_perifs[radio_index].framer->in_continuous_streaming_mode(); // stop streaming my_streamer->issue_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); - // flush demux - _demux->realloc_sid(B200_RX_DATA0_SID); - _demux->realloc_sid(B200_RX_DATA1_SID); - // flush actual transport - while (_data_transport->get_recv_buff(0.001)) { - } + // flush data + while (_demux->get_recv_buff(B200_RX_DATA0_SID, 0.001)) {} + while (_demux->get_recv_buff(B200_RX_DATA1_SID, 0.001)) {} // restart streaming if (in_continuous_streaming_mode) { stream_cmd_t stream_cmd(stream_cmd_t::STREAM_MODE_START_CONTINUOUS); stream_cmd.stream_now = false; stream_cmd.time_spec = _radio_perifs[radio_index].time64->get_time_now() + time_spec_t(0.01); - // FIXME: temporarily remove the start stream command. - // This will avoid an issue that gets the b210 in a bad state. - // my_streamer->issue_stream_cmd(stream_cmd); + my_streamer->issue_stream_cmd(stream_cmd); } } else { - while (_data_transport->get_recv_buff(0.001)) { - } - // FIXME: temporarily remove the overflow handling that re-issues a stream - // command. This will avoid an issue that gets the b210 in a bad state. - // _radio_perifs[radio_index].framer->handle_overflow(); + const uint32_t sid = radio_index == 0 ? B200_RX_DATA0_SID : B200_RX_DATA1_SID; + // flush data + while (_demux->get_recv_buff(sid, 0.001)) {} + // restart streaming + _radio_perifs[radio_index].framer->handle_overflow(); } } |