AnsweredAssumed Answered

Streaming tx with AD9364

Question asked by fleogefyr on Jul 12, 2014
Latest reply on Aug 19, 2014 by Jetmiri



We wish to stream some data out of the fmcomms4/AD9364 board. Luckily, we found that there is a piece of sample code  Re: AD9361 Streaming Transmit. We disabled the cyclic bit, downloaded the latest HDL reference design and the latest linux kernel, and then rebuilt the kernel with the modified bitstream. We uncommented these code in the iio_stream sample to send sine waves for testing:


for (j = 0; j < blocks[i].block.bytes_used / 8; j++) {

  blocks[i].addr[j*4] = cos(2 * M_PI * j / 16) * 0x7fff;

  blocks[i].addr[j*4+1] = sin(2 * M_PI * j / 16) * 0x7fff;



And we set the sample rate to 30.72M. My understanding is this code will produce a sine wave @(sample rate/16). However, it does not seem to work - there was only carrier sent out. In addition, using no-OS code with the cyclic bit disabled (or the FLAGS register cleared) also does not work. Once the cyclic bit is set, everything works fine (except that streaming transmission is no longer available).


Is there other work should be done for streaming out data with AD9364? Could you please offer some advice on setting up registers to establish a stream transmission? Advice on setting up acyclic callback functions for libiio will also be greatly appreciated.