Hi,
I'm looking for A2D data format in ADC buffer.
I use b2AdcOutFmt = 1 and b2AdcOutFmt = 2 in rlAdcBitFormat_t
b8FullScaleReducFctr = 0
What parts of 16bit words are sign extension for b2AdcBits = 0, 1, 2 ?
Gennadii
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.
Hi,
I'm looking for A2D data format in ADC buffer.
I use b2AdcOutFmt = 1 and b2AdcOutFmt = 2 in rlAdcBitFormat_t
b8FullScaleReducFctr = 0
What parts of 16bit words are sign extension for b2AdcBits = 0, 1, 2 ?
Gennadii
Hello Gennadii,
Can you please tell us how was the Data collected.
If it was done using the DCA1000 board, please check the following section in the mmwave Radar Device ADC Raw Data Capture
"InterpretingBinaryFile in MATLAB"
Please let us know if that is not sufficient and more information.
Thank you
Vaibhav
Hi,
I don’t use DCA1000. Adc samples are written to 16K buffer in IWR1443 by DFE after calling MMWave_start. I use address 0x5200_0000 or 0x5203_0000 to explore them. It depends on FFT1DEN bit of HWACCREG1.
Regards,
Gennadii
The ADC data should be in in two's complement format:
l_max = 2^(numADCBits-1)-1;
adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
Let me know whether it makes sense to you.
Best,
Zigang
Hi
zigang Yang said:l_max = 2^(numADCBits-1)-1;
adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
This is part of matlab code from mmwave Radar Device ADC Raw Data Capture
My question is about data format for samples in ADC buffer of IWR1443. Do they have sign-magnitude representation? What bits of sample for sign and what for magnitude when I set b2AdcBits = 0, 1, 2?
Regards,
Gennadii
Hi, there:
I did the raw data captured with DCA1000 with 12 bit ADC configuration. The ADC data is still 16 bit. But only occupy 12 bit, and sign bit is extended to 12 bit only. The following matlab script can be use to parse the data.
>>fid = fopen('test_12bit.bin','r');
>> a = fread(fid, 'uint16',1024);
>> figure; plot(a)
>> ind = a > 2^11;
>> a(ind) = a(ind) - 2^12;
>> figure; plot(a)
It matches the code I attached before.
l_max = 2^(numADCBits-1)-1;
adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
I hope it solves your problem.
Best,
Zigang