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.

IWR6843ISK: Understanding Data Structure

Part Number: IWR6843ISK
Other Parts Discussed in Thread: DCA1000EVM,

Hello,

I'm using the IWR6843ISK+ICBOOST, DCA1000EVM, mmwave SDK v03.06.01.00-LTS.

I have a MATLAB script that I wish to translate into Python. However, I am uncertain about the data structure of these binary files that are used in these scripts.

I found in documention spruij4a.pdf (ti.com) page 20 the Stored File Format without sequence number.but it not clearly define the data that are used in the sdkHeader script or which binaries to use

Regarding the sdkHeader class, is there any documentation available that explains the specified data structure in details ?and if there is any python scripts to read the header?

Below is a MATLAB script that defines classes for handling headers within these binary files:

Header script :

classdef Header < ti.rf_api.s.template
%HEADER Summary of this class goes here
% Detailed explanation goes here

properties %(SetAccess=protected)
dataCardHeader ti.rf_api.s.HSI.dataCardHeader = ti.rf_api.s.HSI.dataCardHeader
sdkHeader (1,1) ti.rf_api.s.HSI.sdkHeader = ti.rf_api.s.HSI.sdkHeader
paddingBuffer uint8
end

methods
function obj = Header(data)
%HEADER Construct an instance of this class
% Detailed explanation goes here
if nargin==1
data = typecast(data, 'uint8');
if nargin==1
obj.dataCardHeader.set(data(1:16));
obj.sdkHeader.set(data(17:52));
end
end
obj.paddingBuffer = zeros(1,64-obj.size, 'uint8');
obj.paddingBuffer(:) = 0x0f;
obj.setSize;
end
function s = getStruct(obj)
s = struct('dataCardHeader',struct(obj.dataCardHeader), ...
'dataCardHeader_TotalLength', obj.dataCardHeader.length, ...
'sdkHeader', struct(obj.sdkHeader));
end
end
end

-----------------------

dataCardHeader script

classdef dataCardHeader < ti.rf_api.s.template
%DATACARDHEADER Summary of this class goes here
% Detailed explanation goes here

properties %(SetAccess=protected)
id (1,1) ti.rf_api.e.hsi.header.id = 0x0CDA0ADC0CDA0ADC
totalLengthLSW (1,1) uint16
totalLengthMSW (1,1) uint16
reserved (1,1) uint32
end
methods
function obj = dataCardHeader(data)
if nargin==1
try
set(obj, data)
catch ME
whos('data')
disp(data)
warning(ME.message)
end
end
end
function len = length(obj)
len = uint32(obj.totalLengthLSW) + uint32(obj.totalLengthMSW)*2^12;
end
end
end

------------------------------

sdkHeader script

classdef sdkHeader < ti.rf_api.s.template
%SDKHEADER Summary of this class goes here
% Detailed explanation goes here

properties
version (1,1) uint16
headerSize (1,1) uint16
platform (1,1) ti.rf_api.e.hsi.platform = 4
interleavedMode (1,1) ti.rf_api.e.hsi.header.mode = 2
dataSize (1,1) ti.rf_api.e.hsi.header.size = 0
dataType (1,1) ti.rf_api.e.hsi.header.type = 2
rxChannelStatus (1,1) uint8
dataFormat (1,1) ti.rf_api.e.hsi.header.format = 1
chirpMode (1,1) uint16
adcDataSize (1,1) uint16
cpDataSize (1,1) uint16
cqDataSize (1,3) uint16
userBufSize (1,3) uint16
appExtensionHeader (1,8) uint8
end

methods
function obj = sdkHeader(data)
%SDKHEADER Construct an instance of this class
% Detailed explanation goes here
if nargin==1
set(obj, data);
end
end
function ver = getVersion(obj)
ver = dec2base(obj.version, 8);
ver = reshape([ver; '... '],1,[]);
ver = ver(1:7);
end

end
end

--------------

Regards

  • Hi Helen,

    It sounds like you're trying to process the datastream coming off the DCA1000 and you're not sure how to process the packet headers, is that correct? Are these MATLAB scripts something provided in the SDK? 

    Are you just trying to decode the packets in the raw data mode format without sequence number?

    Best,

    Nate

  • Thank you for your reply ,

    sorry the data  mode is with sequence number

     

    The Matlab scripts are not provided in sdk.

    but I think they are similar to the below screenshot and to this .html file  that is provided in sdk ti\mmwave_sdk_03_06_01_00LTS\packages\ti\demo\xwr68xx\mmw\docs\doxygen\struct_h_s_i_data_card_header__t.html .

  • Hi Helen,

    Have you reviewed the scripts and docs at C:\ti\mmwave_studio_02_01_01_00\mmWaveStudio\ReferenceCode\DCA1000\ ? These serve as a reference.

    Best,

    Nate