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.

MMWCAS-RF-EVM: Harvest and Parse Capture Data Periodically

Part Number: MMWCAS-RF-EVM
Other Parts Discussed in Thread: MMWCAS-DSP-EVM, , TDA2, AWR2243, AWR1243

Hello,

We have purchased the MMWCAS-DSP-EVM and the MMWCAS-RF-EVM, and are having issues configuring the device for our purposes. We would like to have the module periodically (say, once every minute) perform a data capture and dump the data to a server connected via ethernet. We then need to be able to parse the dumped data to generate a point cloud for further processing. We would like to have our own application recieve the data and perform the necessary processing, rather than using mmWave Studio or the provided Matlab scripts. 

We have been able to successfully run the provided demos in mmWave Studio for the MIMO and BF usecases via modified Lua scripts, and have also been able to capture data by manually selecting a usecase via ssh and running the cascade_MIMO_signalProcessing and radar_cascade_demo Matlab scripts. In both cases, we are able to see the generated .bin and .idx files captured on the ssd. However, these demos do not help us understand how we should design our application to utiize this EVM. So, my questions are:

1) Is there a way to automate the process of configuring the EVM and performing a capture from the server side only? If there are relevant files in the Processor-SDK-Radar package that we would possibly need to integrate into our application to do this, can you point us to them? It seems like there should be some standard controls that we can issue via socket to configure our chirps/frames, start a capture, and dump the data. 

2a) From looking at the Matlab scripts provided, it does not look like Matlab is using the .bin and .idx files. Is there any documentation pointing to what data Matlab is receiving, and how it is formatted?

2b) From the mmWave Studio demos, the .bin and .idx files must be transferred to the host machine before post-processing can be done. This must mean that we can generate our desired point cloud without using mmWave Studio if we were to know how to extract the needed data from these files. Is there any documentation detailing the structure of these files?

Thanks,

Clark

  • Hi

    Right now this use case is not supported out of the box.

    The formatting of the data should not be a problem. The challenge would be to configure the chirps/frames without mmWave studio

    I have forwarded this request to the MMWCAS team to further discuss your use case

    thank you

    Cesar

  • Just wanted to make sure this didn't slip through the cracks.

    Thanks,

    Clark

  • Hi Clark, 

    We expose the mmWave Studio Lua scripting back-end to external processes through RtttNetClientAPI dll. This can be found here: 

    • C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\Clients\RtttNetClientController\RtttNetClientAPI.dll

    One example utilization is in our TX-BF example, which masters mmWave Studio through the Matlab environment. This is shown here: 

    • C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\MatlabExamples\4chip_cascade_TxBF_example\cascade_TxBF_dataCapture.m
    • C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\MatlabExamples\4chip_cascade_TxBF_example\RSTD\Init_RSTD_Connection.m

    I have seen one reference that masters the mmWave Studio environment over Python and the Matlab for Python runtime here: https://github.com/yizhou-wang/cr-data-collector

    I am trying to put together an example of mastering mmWave Studio through Python directly with the RtttNetClientAPI.dll. But do not have anything to share now. 

    There is also C sourcecode released in mmWave Studio for a library called EthernetLib which is what we integrate into mmWave Studio for directly issuing API commands to the MMWCAS-DSP-EVM. That is shown here: 

    • C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\ReferenceCode\EthernetLib

    There is also a C sourcecode example released in the DFP packages which makes use of the mmWaveLink and the EthernetLib libraries to make some example connectivity examples. That can be found here: 

    • C:\ti\mmwave_dfp_02_01_05_03\ti\example\mmWaveLink_Cascade_Example

    Please let me know if these examples help. 

    Thank you,

    -Randy

  • I am working with Clark on this issue. 

    Thanks Randy. I believe your last bullet point is what we are looking for; the ability to control the system outside of Matlab or mmWave Studio.

    We had searched for examples but didn't find any until we downloaded the updated DFP package from http://www.ti.com/tool/MMWAVE-DFP

  • We compiled the code from mmWaveLink_Cascade_Example and ran it on a board with awr1243p chips. We changed mmw_example.c to use xwr12xx_metaImage.h from the 1st gen Dfp directory. 

    When we ran the program we got some errors and no files were captured in the "/mnt/ssd/MMWL_Capture" directory. We did not change anything else in the code besides the firmware file to use and the static IP address of the board we are using. Here is the output:

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

    ================= mmWaveLink Example Application ====================

    INFO: Registered Async event handler with TDA

    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0

    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0

    Device map 32 : CAPTURE_RESPONSE_VERSION_INFO Async event recieved with status 0. TDA Version : REL_VISION_SDK_03_07_01_00 Aug 5 2019 15:04:45

    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0

    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0

    INFO: Connection to TDA successful!

    Device map 1 : SOP 4 mode successful

    Device map 1 : Device reset successful

    Device map 1 : mmWave Device Power on failed with error -8

    ==========================Firmware Download==========================

    Device map 1 : Meta Image download started

    Device map 1 : MMWL_fileDwld Fail. Ftype: 0

    Device map 1 : Meta Image download complete ret = -8

    Device map 1 : Firmware update failed with error -8

    Device map 2 : SOP 4 mode successful

    Device map 2 : Device reset successful

    Device map 2 : mmWave Device Power on failed with error -8

    Device map 4 : SOP 4 mode successful

    Device map 4 : Device reset successful

    Device map 4 : mmWave Device Power on failed with error -8

    Device map 8 : SOP 4 mode successful

    Device map 8 : Device reset successful

    Device map 8 : mmWave Device Power on failed with error -8

    ==========================Firmware Download==========================

    Device map 14 : Meta Image download started

    Device map 14 : MMWL_fileDwld Fail. Ftype: 0

    Device map 14 : Meta Image download complete ret = -2

    Device map 14 : Firmware update failed with error -2

    Device map 15 : Calling rlSetAdcOutConfig With [2]ADC Bits and [1]ADC Format

    Device map 15 : AdcOut Config failed with error code -2

    Device map 15 : Basic/Static configuration failed with error -1

    ==================Programmable Filter Configuration==================

    Device map 15 : Calling rlRfSetProgFiltConfig with
    coeffStartIdx[0]
    progFiltLen[14] GHz
    progFiltFreqShift[100] MHz/uS

    Device map 15 : Programmable Filter Configuration failed with error code -2

    Device map 1 : Calling rlSetFrameConfig with
    Start Idx[0]
    End Idx[11]
    Loops[64]
    Periodicity[100]ms

    Device map 1 : Calculated TDA Height is 768

    Device map 1 : Calculated TDA Width is 0

    Device map 1 : Frame Configuration failed with error -8

    INFO: Device map 1 : Setting width = 0 and height = 768 successful

    INFO: Device map 2 : Setting width = 0 and height = 0 successful

    INFO: Device map 4 : Setting width = 0 and height = 0 successful

    INFO: Device map 8 : Setting width = 0 and height = 0 successful

    INFO: Sending framePeriodicity = 100 successful

    ERROR: Frame Periodicity Response from Capture Card timed out!

    Device map 8 : Sensor Start failed with error code -8

    Device map 4 : Sensor Start failed with error code -8

    Device map 2 : Sensor Start failed with error code -8

    Device map 1 : Sensor Start failed with error code -8

    Device map 15 : GPAdc measurement API failed with error code -2

    Device map 8 : Power Off API success

    Device map 4 : Power Off API success

    Device map 2 : Power Off API success

    Device map 1 : Power Off API success

    INFO: Disconnected from TDA

    =========== mmWaveLink Example Application execution Successful ===========


    =========== mmWaveLink Example Application: Exit ===========

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

    Thanks,

    Tom

  • Hi Tom, 

    I gave that a try last week as well. On my AWR2243 Cascade EVM setup I saw similar results. What it looks like is that the effected AWRx devices are not being commanded out of reset. This may be due to the reset de-assertion command not being received by the TDA2 host software. I think I narrowed down the problem to the function MMWL_DevicePowerUp(unsigned int deviceMap). 

    If I insert a slight delay (like a debugger breakpoint, or the 1ms sleep below, between the setSOPMode(TDAImpl_devHdl, SOPmode) and resetDevice(TDAImpl_devHdl) I see that all of my devices come out of reset without this issue. 

    Can you add that additional delay and see if it works in your case as well?

    /* Set SOP Mode for the devices */
    	if (TDAImpl_devHdl != NULL)
    	{
    		retVal = setSOPMode(TDAImpl_devHdl, SOPmode);
    		osiSleep(1); // Additional 1 msec delay 
    	}
    	else
    	{
    		printf("Device map %u : Cannot get device context\n\n", deviceMap);
    		return -1;
    	}
    
    	if (retVal != RL_RET_CODE_OK)
    	{
    		printf("Device map %u : SOP 4 mode failed with error %d\n\n", deviceMap,
    			retVal);
    		return -1;
    	}
    	else
    	{
    		printf("Device map %u : SOP 4 mode successful\n\n", deviceMap);
    	}
    
    	/* Reset the devices */
    	if (TDAImpl_devHdl != NULL)
    	{
    		retVal = resetDevice(TDAImpl_devHdl);
    	}
    	else
    	{
    		printf("Device map %u : Cannot get device context\n\n", deviceMap);
    		return -1;
    	}

  • Thanks Randy! This seems really close. The directory is created on the Cascade board and it appears the firmware is uploaded.

    There are some random errors but I am not familiar enough with the system to understand what they mean. Lastly the application times out waiting for a response from the Cascade board. I can see the Leds for the 4 awr chips toggle off and then back on so it seems like it is pretty close to working.

    ================= mmWaveLink Example Application ====================
    
    INFO: Registered Async event handler with TDA
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 32 : CAPTURE_RESPONSE_VERSION_INFO Async event recieved with status 0. TDA Version : REL_VISION_SDK_03_07_01_00 Aug  5 2019 15:04:45
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Connection to TDA successful!
    
    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 1 : SOP 4 mode successful
    
    Device map 1 : Device reset successful
    
    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 1 : MSS Power Up Async event
    
    PowerUp Time = 1470339, PowerUp Status = 0x0, BootTestStatus = 0x0
    
    Device map 1 : mmWave Device Power on failed with error -8
    
    ==========================Firmware Download==========================
    
    Device map 1 : Meta Image download started
    
    Device map 1 : Download in Progress: 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..Done!
    
    Device map 1 : Meta Image download complete ret = 0
    
    Device map 1 : Firmware update successful
    
    =====================================================================
    
    Device map 1 : MSS Boot Error Status Async event
    
    Device map 1 : Swap reset failed with error code -8
    
    Device map 2 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 2 : SOP 4 mode successful
    
    Device map 2 : Device reset successful
    
    Device map 2 : mmWave Device Power on failed with error -11
    
    Device map 2 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 4 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 4 : SOP 4 mode successful
    
    Device map 4 : Device reset successful
    
    Device map 4 : mmWave Device Power on failed with error -11
    
    Device map 4 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 8 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 8 : SOP 4 mode successful
    
    Device map 8 : Device reset successful
    
    Device map 8 : mmWave Device Power on failed with error -11
    
    ==========================Firmware Download==========================
    
    Device map 14 : Meta Image download started
    
    Device map 8 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 14 : MMWL_fileDwld Fail. Ftype: 0
    
    Device map 14 : Meta Image download complete ret = -2
    
    Device map 14 : Firmware update failed with error -2
    
    Device map 15 : Calling rlSetAdcOutConfig With [2]ADC Bits and [1]ADC Format
    
    Device map 15 : AdcOut Config failed with error code -2
    
    Device map 15 : Basic/Static configuration failed with error -1
    
    ==================Programmable Filter Configuration==================
    
    Device map 15 : Calling rlRfSetProgFiltConfig with
    coeffStartIdx[0]
    progFiltLen[14] GHz
    progFiltFreqShift[100] MHz/uS
    
    Device map 15 : Programmable Filter Configuration failed with error code -2
    
    Device map 1 : Calling rlSetFrameConfig with
    Start Idx[0]
    End Idx[11]
    Loops[64]
    Periodicity[100]ms
    
    Device map 1 : Calculated TDA Height is 768
    
    Device map 1 : Calculated TDA Width is 0
    
    Device map 1 : Frame Configuration failed with error -2
    
    INFO: Device map 1 : Setting width = 0 and height = 768 successful
    
    INFO: Device map 2 : Setting width = 0 and height = 0 successful
    
    INFO: Device map 4 : Setting width = 0 and height = 0 successful
    
    INFO: Device map 8 : Setting width = 0 and height = 0 successful
    
    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Sending framePeriodicity = 100 successful
    
    Device map 2 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 4 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 8 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Sending capture directory = /mnt/ssd/MMWL_Capture successful
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Sending pre-allocated files = 0 successful
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Sending enable data packing = 0 successful
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Sending number of frames to capture = 0 successful
    
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Notifying TDA about creating application successful
    
    ERROR: Create Application Response from Capture Card timed out!
    
    Device map 8 : Sensor Start failed with error code -8
    
    Device map 4 : Sensor Start failed with error code -8
    
    Device map 2 : Sensor Start failed with error code -8
    
    Device map 1 : Sensor Start failed with error code -8
    
    Device map 15 : GPAdc measurement API failed with error code -2
    
    Device map 8 : Power Off API failed with error code -3
    
    Device map 4 : Power Off API failed with error code -3
    
    Device map 2 : Power Off API failed with error code -3
    
    Device map 1 : Power Off API failed with error code -3
    
    Device map 1 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    
    INFO: Disconnected from TDA
    
    =========== mmWaveLink Example Application execution Successful ===========
    
    
    =========== mmWaveLink Example Application: Exit ===========

    Thanks,

    Tom

  • Hi Tom, 

    I will have to look at this again later this week. It will take me a few days to get another response out. Can you please confirm if you are working with AWR2243 or AWR1243 Cascade EVM? And which exact DFP package revision?

    Thank you,

    -Randy

  • Thanks Randy, no hurry. We are working with the 1243 variant and Dfp revision 01_02_05_01.

  • Hi Team,

    Similar to Clark, I purchased MMWCAS-DSP-EVM and the MMWCAS-RF-EVM and actually retried the data following the user manual.

    In order to evaluate this chip, I need to collect data automatically and periodically.

    My question is:

    Can we conclude the data acquisition using only Matlab?

    I'm using TXBF, but right now to retrieve data, we must run "Cascade_Capture.lua" via the Studio GUI, which is quite time-consuming.

    A sample script  guiding Matlab data acquisition will be really helpful!

    Thanks,

    Ken

  • Hi Ken, 

    Our current TX-BF demo is a mix of matlab and mmwave studio setup. Any of the matlab scripts which utilize the the NetClientRttt dll can be used to make an entirely matlab mastered script. 

    -Randy

  • Hi Thomas, 

    I confirmed with our software team that there should be no incompatibilities. I suggest still experimenting with adding some additional wait time before the resetDevice() function call. I have noticed that some networks, with lower latency, may require additional time be added before this command is accepted. I am working to get an update made to that software example. 

    I hope that helps, 

    -Randy

  • Ok, will do.

    Thanks Randy!