Skip to content

Commit

Permalink
debug DMA tests
Browse files Browse the repository at this point in the history
Signed-off-by: Julia Pineda <Julia.Pineda@analog.com>
  • Loading branch information
jpineda3 committed Mar 13, 2024
1 parent cbacd57 commit 57be9af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions +adi/+AD9081/Base.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
doNotCloseConnection = false;
end
if isTx
dev = obj.phyDev;
else
dev = obj.iioDev;
else
dev = obj.phyDev;
end

%% Parse data path configuration
Expand Down Expand Up @@ -136,7 +136,7 @@
ss = 'D';
end
numFDUCX = 0; numCDUCX = 0;
for DC = 0:7
for DC = 0:7 % why is this 0 to 7?
for k=1:length(filteredMap)
if contains(filteredMap{k},sprintf('FD%sC%d',ss,DC))
numFDUCX = numFDUCX + 1;
Expand Down
10 changes: 8 additions & 2 deletions test/AD9081HWTests.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef AD9081HWTests < HardwareTests

properties
uri = 'ip:analog.local';
uri = 'ip:localhost';
author = 'ADI';
end

Expand All @@ -15,7 +15,7 @@ function CheckForHardware(testCase)
end

methods (Static)
function estFrequency(data,fs,saveNoShow,figname)
function freq = estFrequency(data,fs,saveNoShow,figname)
nSamp = length(data);
FFTRxData = fftshift(10*log10(abs(fft(data))));
% df = fs/nSamp; freqRangeRx = (-fs/2:df:fs/2-df).'/1000;
Expand Down Expand Up @@ -221,6 +221,12 @@ function testAD9081RxWithTxData(testCase)

% plot(real(out));
freqEst = meanfreq(double(real(out)),sr);
f = figure('visible','on');
figname = 'freq_plot';
meanfreq(double(real(out)),sr)
saveas(f,figname,'png')
saveas(f,figname,'fig')


testCase.verifyTrue(valid);
testCase.verifyGreaterThan(sum(abs(double(out))),0);
Expand Down
8 changes: 4 additions & 4 deletions test/runHWTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ function runHWTests(board)
fclose(fid);
catch e
disp(getReport(e,'extended'));
bdclose('all');
exit(1);
% bdclose('all');
% exit(1);
end
save(['BSPTest_',datestr(now,'dd_mm_yyyy-HH_MM_SS'),'.mat'],'t');
bdclose('all');
exit(exitcode);
% bdclose('all');
% exit(exitcode);
end

0 comments on commit 57be9af

Please sign in to comment.