AnsweredAssumed Answered

Understanding ad9361-iiostream.c example

Question asked by marcinsztajn on Sep 19, 2016
Latest reply on Jan 17, 2017 by pcercuei
Branched to a new discussion

Hi,

I am trying to understand how ad9361-iiostream.c example works. Correct me if I am wrong.

First we send data contained in txbuf variable. I do not know what data are there cause I can not debug this example.

Next we receive data and put them in rxbuf.

Next is swapping I and Q which I do not understand.

   const int16_t i = ((int16_t*)p_dat)[0]; // Real (I)
   const int16_t q = ((int16_t*)p_dat)[1]; // Imag (Q)

Is p_dat an array? I do not understand this [0] and [1] after casting this value to int16_t.

Next in tx buffer we write zero values and repeat this actions again.

I have a questions:

a) Is there any possibility to debug this program for example in eclipse and see how variables are changing?

b) 1024*1024 is a value which means how many samples our buffer should contain?

c) Which values should contain tx buffer so I could see one tone on spectrum analyzer?

 

Thanks for help.

Marcin

Outcomes