AnsweredAssumed Answered

Where can I get the registers' configuration process of AD9361?

Question asked by Wenyang.Xiao@verisilicon.com on Dec 2, 2014
Latest reply on Jan 12, 2015 by Wenyang.Xiao@verisilicon.com

Hi,

     I had realized simple point to point communcation of AD9361 with linux on zynq706 board, but I just called the API function in my program, I didn't know what did in registers from none configuration of AD9361 to it could setup. So I want to know where can I get the registers' configuration process of AD9361 from none configuration to it can setup? It maybe contain the basic iInitialization in drivers.

     Thank you very much. The steps what I did in my program are as follows:

int main (int argc, char **argv)
{
// Streaming devices
struct iio_device *tx;

// Stream configurations
struct stream_cfg txcfg;

// Listen to ctrl+c and assert
signal(SIGINT, shutdown);

// TX stream config
txcfg.bw_hz = MHZ(2);  // 1.5 MHz rf bandwidth
txcfg.fs_hz = MHZ(2);   // 2 MS/s tx sample rate
txcfg.lo_hz = GHZ(2.5); // 2.5 GHz rf frequency
txcfg.rfport = "A";  // port A (select for rf freq.)

printf("* Acquiring IIO context\n");
assert((ctx = iio_create_local_context()) && "No context"); ; //  iio_create_network_context("192.168.0.1"); for network
assert(iio_context_get_devices_count(ctx) > 0 && "No devices");

printf("* Acquiring AD9361 streaming devices\n");
assert(get_ad9361_stream_dev(ctx, TX, &tx) && "No tx dev found");

printf("* Configuring AD9361 for streaming\n");
assert(cfg_ad9361_streaming_ch(ctx, &txcfg, TX, 0) && "TX port 0 not found");

printf("* Initializing AD9361 IIO streaming channels\n");
assert(get_ad9361_stream_ch(ctx, TX, tx, 0, &tx0_i) && "TX chan i not found");
assert(get_ad9361_stream_ch(ctx, TX, tx, 1, &tx0_q) && "TX chan q not found");

printf("* Enabling IIO streaming channels\n");
iio_channel_enable(tx0_i);
iio_channel_enable(tx0_q);

printf("* Starting IO streaming (press CTRL+C to cancel)\n");

....

}

Outcomes