IWR1443BOOST: adc 您所在的位置:网站首页 organize复数 IWR1443BOOST: adc

IWR1443BOOST: adc

2023-07-24 07:48| 来源: 网络整理| 查看: 265

我的代码是TI文档“Mmwave Radar Device ADC Raw Data Capture"中的源码

%%% This script is used to read the binary file produced by the DCA1000%%% and Mmwave Studio%%% Command to run in Matlab GUI - readDCA1000('')function [retVal] = readDCA1000(fileName)%% global variables% change based on sensor confignumADCBits = 16; % number of ADC bits per samplenumLanes = 4; % do not change. number of lanes is always 4 even if only 1 lane is used. unused lanesisReal = 0; % set to 1 if real only data, 0 if complex dataare populated with 0 %% read file and convert to signed number

% read .bin filefid = fopen(fileName,'r');% DCA1000 should read in two's complement dataadcData = fread(fid, 'int16');% if 12 or 14 bits ADC per sample compensate for sign extensionnumLanesif numADCBits ~= 16 l_max = 2^(numADCBits-1)-1; adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;endfclose(fid);

%% organize data by LVDS lane% for real only dataif isReal % reshape data based on one samples per LVDS lane adcData = reshape(adcData, numLanes, []); %for complex dataelse % 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 dataretVal = adcData;

应该不会出错呀?

而且只有在解析满了1G的.bin文件的时候才出错,少于1G的.bin文件解析又是没问题的?



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有