1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
%imports shared library functions
LoadLimeSuite
%Generate waveform
phase = pi/8;
src = 0.7*complex(sin(0:phase:1000*pi-phase), cos(0:phase:1000*pi-phase));
%%initialize LimeSuite
%if several boards are connected
%deviceList = LimeGetDeviceList();
%selectedDevice = 1;
%LimeInitialize(deviceList(selectedDevice));
%otherwise initialization uses first available device
LimeInitialize();
%load initial chip configuration
LimeLoadConfig('rxTest.ini');
%activate Tx and Rx streaming
LimeStartStreaming(1000000);
%Load waveform to be continuosly transmitted
LimeLoopWFMStart(src);
%receive samples
for i=1:10000
samples = LimeReceiveSamples(1360);
%plot(samples);
pause(0.001);
end
%stop streaming
LimeLoopWFMStop();
LimeStopStreaming(); %also resets Rx Tx buffers
%deallocate resources
LimeDestroy();
|