AnsweredAssumed Answered

AD9361 non-cyclic transmit

Question asked by fishhunterjj on Feb 13, 2018
Latest reply on Feb 14, 2018 by larsc

I am attempting to use libiio to transmit a signal via the AD9361.  When I create a cyclic buffer, my modulated signal transmits just fine with no issues.  When I create a non-cyclic buffer, all I ever get from the transmitter is a tone.  The only differences are 1) cyclic vs. non-cyclic buffer and 2) single pushing of buffer vs pushing of multiple buffers.

 

Am I missing some magic somewhere?

 

m_pPhyDevice = iio_context_find_device( pContext, "ad9361-phy" );
m_pTxDevice = iio_context_find_device( pContext, "cf-ad9361-dds-core-lpc" );

iio_channel_attr_write_longlong( m_pVoltageChannel, "sampling_frequency", dSampleRate ); //50 MHz
iio_channel_attr_write_longlong( m_vecTxChannels[0], "sampling_frequency", dSampleRate ); //50 MHz
iio_channel_attr_write_longlong( m_vecEnableChannels[0], "sampling_frequency", dSampleRate ); //50 MHz
iio_channel_attr_write_longlong( m_vecEnableChannels[1], "sampling_frequency", dSampleRate ); //50 MHz

iio_channel_attr_write_longlong( m_vecEnableChannels[0], "rf_bandwidth", dSampleRate ); //50 MHz
iio_channel_attr_write_longlong( m_vecEnableChannels[1], "rf_bandwidth", dSampleRate ); //50 MHz

iio_channel_attr_write_bool( m_vecTxChannels[0], "raw", true );

 

 

iio_channel_attr_write_double( m_vecTxChannels[0], "scale", 1.0 );

 

 

iio_channel_enable( m_vecEnableChannels[0] );
iio_channel_enable( m_vecEnableChannels[1] );

 

m_pBuffer = iio_device_create_buffer( m_pTxDevice, nMaxBuffer, false );

nBytes = iio_buffer_push( m_pBuffer );

Outcomes