1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-16 01:59:58 +00:00

Merge branch 'mmajoral-DMA_FPGA' into next

This commit is contained in:
Carles Fernandez 2021-10-08 11:31:09 +02:00
commit 78d0d6a19d
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -626,7 +626,23 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &filename0, const
int num_transferred_bytes; int num_transferred_bytes;
// Open DMA device // Open DMA device
const int tx_fd = open("/dev/loop_tx", O_WRONLY); int tx_fd = open("/dev/loop_tx", O_WRONLY);
if (tx_fd < 0)
{
std::cerr << "Cannot open loop device\n";
// stop the receiver
queue->push(pmt::make_any(command_event_make(200, 0)));
return;
}
// note: a problem was identified with the DMA: when switching from tx to rx or rx to tx mode
// the DMA transmission may hang. This problem will be fixed soon.
// for the moment this problem can be avoided by closing and opening the DMA a second time
if (close(tx_fd) < 0)
{
std::cerr << "Error closing loop device " << '\n';
}
// open the DMA a second time
tx_fd = open("/dev/loop_tx", O_WRONLY);
if (tx_fd < 0) if (tx_fd < 0)
{ {
std::cerr << "Cannot open loop device\n"; std::cerr << "Cannot open loop device\n";