File: wfm.m

package info (click to toggle)
limesuite 20.10.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,576 kB
  • sloc: cpp: 158,930; ansic: 6,852; python: 197; sh: 56; makefile: 20
file content (39 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (6)
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();