AnsweredAssumed Answered

What's the quickest way to stream AD9361 buffers to file I/O?

Question asked by electrodev99 on Dec 14, 2017
Latest reply on Jan 18, 2018 by electrodev99

Hello all,

 

I'm new to the AD9361, but I am doing the best I can to study how to implement this: I need to dump the AD9361 RX buffers to a file descriptor as quickly and efficiently as possible, but I keep running into different issues with the different ways I am attempting to. The file I need to dump to is a raw SSD block (ie: no filesystem), I just need to write directly to the SSD as fast as I can. I am using O_SYNC and O_DIRECT -- which means I guess I need to align the mmap iio_buffers, otherwise I seem to get a bad address error on my writes to the SSD.

 

Do I need to iio_buffer_refill() and then dump the buffer to the file?

Is there a way I can bypass the buffer to direct the DMA directly to the SSD?

 

edit: I forgot to mention that I never have to read the SSD back ever -- this is a write only dump. If this helps any. (A separate program will read this stuff back at another time, but can be completely ignored for now)

 

Thanks!

Outcomes