AnsweredAssumed Answered

Enable/Disable AD9361 TX1/TX2 with Matlab via iio

Question asked by yanyu.huang on Apr 7, 2016
Latest reply on Apr 8, 2016 by ACozma


Hi,

 

  I was following the example code here to setup my AD9361. I was able to set the TX LO, RX LO and TX/RX Gain to the value I want using matlab.

MathWorks_tools/ad9361_ModeS.m at master · analogdevicesinc/MathWorks_tools · GitHub

 

But I could not disable TX1/TX2 with a similar command.

I tried disabling TX1 by sending this command:

writeAttributeString(s.iio_dev_cfg.cfg_ch(13).ctrl_dev, s.iio_dev_cfg.cfg_ch(13).port_attr, '0');

 

But the value I read back from the same address is always '1', indicating that TX was still enabled.

 

I was wondering if instead of '0', there is something else I should put in when intending to disable the Tx with that command.

 

ps.

read back from this command: s.iio_dev_cfg.cfg_ch(13)

 

is

port_name: 'TX1_EN'

port_attr: 'out_voltage0_en'

ctrl_dev_name: 'data_in_device'

ctrl_dev: [1x1 libiio_if]

 

Thanks

Outcomes