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.

IWR6843: Capture data from IWR6843

Part Number: IWR6843
Other Parts Discussed in Thread: MMWAVEICBOOST,

Hi Team,

one of our customer is evaluating IWR6843. Now they have a questions regard this:

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

I‘m currently working on a real-time data capture set up with the IWR6843 and the DCA1000.

To receive data and perform signal processing on the fly I use the following steps.

  1. Hardware connection with mmWave Studio
  2. Triggering the hardware with a .lua script in matlab
  3. Reading the data over ethernet (udp-packages) in matlab
  4. Perform signal processing
  5. Repeating step 2 to 4

The problem occures after executing the mentioned steps several times (round about 100). The mmWave Studio crashes and the following error message is given:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

This sounds to me as something with a pointer went wrong. I tryed to check the ar1.CaptureCardConfig_StartRecord() and ar1.StartFrame() functions but I couldn’t find them anywhere.

Do you know why this happens. I hope you could help me with this issue.

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

Thanks for your help

Best Regards

Martin

  • HI, Martin:

    I will forward your problem to the development team. 

    Best,

    Zigang

  • HI, Martin:

    I thought the LUA script should handle the data transfer to a file, right?  In your step (3), are you using application developed by yourself or just wait for the lua script to finish?

    Best,

    Zigang

  • Hi Zigang,

    correct, but I want to capture the data not only in a file, but also process them on the fly as kind of a real-time processing.

    Therefore I use a LUA script to set up the communication and trigger the hardware. This happens normaly in mmWave Studio but I use Matlab to call the script. (The script uses still the original commands)

    After triggering the hardware I listen to the ethernet port and pick up the data which is written to a file from the DCA1000.

    This works fine for a few times but after calling the

    ar1.CaptureCardConfig_StartRecord()
    ar1.StartFrame()

    functions more than 102 times consecutively the application crahes due to the above mentioned error.

    Kind regards,

    Lukas

  • HI, Lukas:

    Can you create a LUA script that will duplicate this problem and send to us?  It has to be only related to your capture step.  Not including your other steps.

    Best,

    Zigang

  • The LUA script for triggering contains only two commands. Sending these two commands is the same as clicking the trigger button in mmwave studio.

    Trigger.lua:

    --Start Record ADC data
    ar1.CaptureCardConfig_StartRecord("C:\\ti\\mmwave_studio_02_00_00_02\\mmWaveStudio\\PostProc\\adc_data.bin", 1)
    --Trigger frame
    ar1.StartFrame()

     

    This script is called in a while loop from matlab.

    strFilename = 'C:\\ti\\mmwave_studio_02_00_00_02\\mmWaveStudio\\Scripts\\Trigger.lua';
    Lua_String = sprintf('dofile("%s")',strFilename);
    ErrStatus =RtttNetClientAPI.RtttNetClient.SendCommand(Lua_String);

     


    Kind regards

    Lukas

  • HI, Lukas:

    In LUA example file, I see there is some waiting time between these two lines. 

    --Start Record ADC data
    ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)
    RSTD.Sleep(1000)

    --Trigger frame
    ar1.StartFrame()
    RSTD.Sleep(5000)

    Have you done the similar thing? 

    The example Lua script is located at: C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\Scripts\DataCaptureDemo_xWR.lua

    Best,

    Zigang

  • No I didn't use these two delays because I want the data as fast as possible for real time processing.

    I tried it anyway and the problem remains the same. It works a few times and the mmwave studio crashes.

    Kind regards,

    Lukas

  • May I ask what version of radar studio and which version of EVM do you use?

    Best,

    Zigang 

  • I use the IWR6843ISK (ES1.0) with MMWAVEICBOOST and DCA1000 and mmWave Studio 2.0.0.2.

    Kind regards,

    Lukas

  • HI, Lukas:

    Could you please send all the related lua script and matlab script (regarding radar studio part) for me to duplicate this issue.

    Best,

    Zigang

  • Please finde the script attached.

    Kind regards,

    Lukas

  • HI, Lukas:

    I tried your script (just for the trigger and capture part).  Just like below:

    for i = 1:200
    count=count+1

    % trigger

    strFilename = 'C:\\DCA1000_delivers\\DCA1000-matlab\\Trigger.lua';
    Lua_String = sprintf('dofile("%s")',strFilename);
    ErrStatus =RtttNetClientAPI.RtttNetClient.SendCommand(Lua_String);
    pause(2)

    end

    And I did not see any error on my side.  Although I noticed a different waiting time between captures. 

    Also I am using xwr6843 ES2 board, because that is the only board I have at hand for now.   And I was using the profile configure that is the default in radar studio GUI, but create two chirps. (one for TX0 and one chirp for TX1).  

    1) Can you try this script and see whether you can still seen the same issue on ES1 board.

    2) Can you try a ES2 board and see whether you have the same issue. Not that for xwr6843 ES2 board, you need to use the lastest radar studio 02.01.00.00.  

    Best,

    Zigang

  • Hi Zigang,

    thanks for your answer.

    I tried out the script with your modifications. I also was using the default chirp profile. Same issue.

    In your example above you only called the trigger script but not the read function for the udp packages. I tried both, with and without read function. Still the same.

    I also noticed your pause of two seconds. I don't want to use it because it slows down the frame rate rapidly. I tried it anyway but no success.

    Unfortunately I can not test a ES2 board because the only one we have here is the ES1 one.

    For me it seems like a funtion can not run to the end or something with a pointer went wrong.

    By comparing the output of mmWave Studio for clicking the trigger button and trigger with my matlab script I noticed that there appear the following commands.

    STS_RECORD_COMPLETED Async event recieved(8)

    ar1.CaptureCardConfig_StopRecord()

    RECORD_STOP_CMD_CODE Async event recieved(6)

    Which function calls this StopRecord()?

    Could you please take a look into ar1.CaptureCardConfig_StartRecord() and ar1.StartFrame() functions? Do they expect any event or something? Are there any unnecessary sleep or delay functions?

    Kind regards,

    Lukas

  • Hi, Lukas:

    I will contact you offline to continue with the support.  Let us close this thread for now.

    Best,

    Zigang