Other Parts Discussed in Thread: IWR6843, AWR1843, , AWR1642
I have read the document named “Mmwave Radar Device ADC Raw Data Capture (Rev. B)”。In this document, it describe the readDCA1000.m for xWR12xx, xWR14xx, xWR16xx and IWR6843. But it don't give the AWR1843.
For xWR12xx and xWR14xx devices, data is captured over four LVDS lanes and is stored in a binary file in an interleaved format. For xWR16xx/IWR6843 devices, data is captured over two LVDS lanes and is stored in a binary file in non-inerleaved format. So how many LVDS lanes for AWR1843 when capture data?
Here is the readDCA1000.m for xWR12xx and xWR14xx devices. Is it applicable for AWR1843boost?
%%% This script is used to read the binary file produced by the DCA1000
%%% and Mmwave Studio
%%% Command to run in Matlab GUI - readDCA1000('<ADC capture bin file>')
%Row 1 contains all of the data from the first receiver, row 2 from the second receiver, row 3 from the third
% receiver, and row 4 from the fourth receiver. In cases where certain receivers are disabled, the
% corresponding rows will be populated with zeros. Each row will contain a number of columns equal to the
% number of ADC samples per chirp multiplied by the total number of chirps. The columns are organized by
% chirps. For example, if there are 256 ADC samples and a total of 1280 chirps (128 chirps/frame x 10
% frames), each row will contain 327680 columns. The first 256 columns correspond to the first chirp, the
% next 256 columns to the second chirp, and so on. The first 32768 columns correspond to the chirps of the
% first frame, and so on. The data can then be processed as the user desires.
%读取格式:[retVal] = readDCA1000('adc_data.bin');
function [retVal] = readDCA1000(fileName)
%% global variables
% change based on sensor config
numADCBits = 16; % number of ADC bits per sample
numLanes = 4; % do not change. number of lanes is always 4 even if only 1 lane is used. unused lanes
isReal = 0; % set to 1 if real only data, 0 if complex dataare populated with 0 %% read file and convert to signed number
% read .bin file
fid = fopen(fileName,'r');
% DCA1000 should read in two's complement data
adcData = fread(fid, 'int16');
% if 12 or 14 bits ADC per sample compensate for sign extension
if numADCBits ~= 16
l_max = 2^(numADCBits-1)-1;
adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
end
fclose(fid);
%% organize data by LVDS lane
% for real only data
if isReal
% reshape data based on one samples per LVDS lane
adcData = reshape(adcData, numLanes, []);
%for complex data
else
% reshape and combine real and imaginary parts of complex number
adcData = reshape(adcData, numLanes*2, []);
adcData = adcData([1,2,3,4],:) + sqrt(-1)*adcData([5,6,7,8],:);
end
%% return receiver data
retVal = adcData;