This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1843BOOST: using AWR1843 and DCA1000 to capture rawdata,the contexts of readDCA1000.m should be?

Part Number: AWR1843BOOST
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;

  • Hello User,

    Like AWR1642, AWR1843 also has 2 LVDS lanes. Hence, you can refer to AWR1642 data format in the document, which will be same for AWR1843 as well.

    Regards,

    Ishita

  • I have collect the rawdata through mmWave Studio and DCA1000, then in MATLAB i use the code "[retVal] = readDCA1000(''dac_data,bin)"(list as above) to  Interpret binary file. I get the data farmat is 4*262144. In mmWave Studio ,I set 8 frame* 128chirps * 256samples(equal262144samples). It looks right.

    My question is :

    AWR1843 has 2 LVDS lanes, why i use the readDCA100 above(for 4 lanes) can get the right result?

    the readDCA1000 for XWR12xx is as follow:

    %%% 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>')
    function [retVal] = readDCA1000(fileName)
    %% global variables
    % change based on sensor config
    numADCSamples = 256; % number of ADC samples per chirp
    numADCBits = 16; % number of ADC bits per sample
    numRX = 4; % number of receivers
    numLanes = 2; % do not change. number of lanes is always 2
    isReal = 0; % set to 1 if real only data, 0 if complex data0
    %% read file
    % read .bin file
    fid = fopen(fileName,'r');
    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);
    fileSize = size(adcData, 1);
    % real data reshape, filesize = numADCSamples*numChirps
    if isReal
    numChirps = fileSize/numADCSamples/numRX;
    LVDS = zeros(1, fileSize);
    %create column for each chirp
    LVDS = reshape(adcData, numADCSamples*numRX, numChirps);
    %each row is data from one chirp
    LVDS = LVDS.';
    else
    % for complex data
    % filesize = 2 * numADCSamples*numChirps
    numChirps = fileSize/2/numADCSamples/numRX;
    LVDS = zeros(1, fileSize/2);
    %combine real and imaginary part into complex data
    %read in file: 2I is followed by 2Q
    counter = 1;
    for i=1:4:fileSize-1
    LVDS(1,counter) = adcData(i) + sqrt(-
    1)*adcData(i+2); LVDS(1,counter+1) = adcData(i+1)+sqrt(-
    1)*adcData(i+3); counter = counter + 2;
    end
    % create column for each chirp
    LVDS = reshape(LVDS, numADCSamples*numRX, numChirps);
    %each row is data from one chirp
    LVDS = LVDS.';
    end
    %organize data per RX
    adcData = zeros(numRX,numChirps*numADCSamples);
    for row = 1:numRX
    for i = 1: numChirps
    adcData(row, (i-1)*numADCSamples+1:i*numADCSamples) = LVDS(i, (row-
    1)*numADCSamples+1:row*numADCSamples);
    end
    end
    % return receiver data
    retVal = adcData;

  • Hello User,

    In the code attached by you, I can see numLanes = 2. Are you sure this is the script you're talking about?

    Regards,

    Ishita

  • I use different readDCA1000.m mentioned above to interpreting binary file, all of them can work. I check the values and find that they are different.  

    Now I dont know what is wrong.

    I have a another question to ask you. AWR1843 has 2 LVDS lanes, is that meaning I only can choose two RX channel in mmWave Studio?

  • Hello User,

    As AWR1843 has only two LVDS lanes, data capture specifically using 3 receivers is not available with the device. Only 1, 2, and 4 enabled receivers can be used.

    Please refer to section 6 of mmWave Radar Device ADC Raw Data Capture (Rev. B) and follow that only.

    Regards,

    Ishita