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: [mmWaveStudio] How to reduce sleep time in lua script

Part Number: IWR6843

Hello,

 

I’m using DataCaptureDemo_sWR.lua file on mmWaveStduio.

As you can see in below code snippet, RSTD.Sleep() funciton is called after calling ar1 APIs to wait for the completion of each processing.

 

================================

--Start Record ADC data

ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)

RSTD.Sleep(1000)                    -----------------------(1)

 

--Trigger frame

ar1.StartFrame()

RSTD.Sleep(5000)                    -----------------------(2)

 

--Post process the Capture RAW ADC data

ar1.StartMatlabPostProc(adc_data_path)

WriteToLog("Please wait for a few seconds for matlab post processing .....!!!! \n", "green")

RSTD.Sleep(10000)                    -----------------------(3)

================================

 

I would like to reduce these sleep time as much as possible to reduce total processing time.

So are there any good way to know when the processing for following APIs will actually finish?

 

ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)

ar1.StartFrame()

ar1.StartMatlabPostProc(adc_data_path)

 

Thanks & Regards,

-Shibata

 

 

  • HI, Shibata:

    This is a good question and I do not know the answer.  I will have to ask the design team and get back to you. 

    Best,

    Zigang

  • Hi Zigang,

    Any update on this?

    Thanks,

    -Shibata

  • HI, Shibata:

    Here is the feedback from the design team:

    The sleep time/waiting time depends totally on the configuration the user will be evaluating.

    After issuing the DCA1000 ARM command  - ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)

    It is always recommended to wait for 1-2 secs before issuing the StartFrame command. Because the DCA1000 ARM command does not go to the AWR device, instead it goes to the DCA1000 hardware.

    So you have to manage it asynchronously. (That’s why we have the buffer time of 1-2 secs).

    After issuing the ar1.StartFrame() command, the amount of time you will need to sleep depends on the frame configuration.

    Assuming you are triggering 100 frames and you have frame periodicity of 100ms -> then you will have to wait for 100*100ms -> 10secs.

    If you don’t give this sleep time, you won’t capture the complete data from DCA1000, and no data will be available for post processing. (which is the next command).

    Best,

    Zigang

  • Hi Zigang,

     

    Thanks for your comments.

    Regarding CaptureCardConfig_StartRecord and StartFrame, I understand how long we need to wait after issuing these commands.

     

    Regarding StartMatlabPostProc, I observed that it took about 5 seconds to return from StartMatlabPostProc call.

     

    (1)    What kind of processing done in this function?

    (2)    Is it possible to reduce the processing time?

     

    Thanks & Regards,

    -Shibata

     

  • Hi, Shibata:

    Regarding StartMatlabPostProc, it is running post signal processing and generate all kinds of plots (like ADC samples, range-Doppler heatmap and etc). You do not really need to run this function if you are focus on for data capture.  Those plot can help you to check whether the data are making sense to you.

    But if you do want to run this script, there is no shorter version to run.

    Best,

    Zigang

  • Hi Zigang,

    Sorry, I mistook a wrong function name.

    The function I have questions was PacketReorderZeroFill, not StartMatlabPostProc.

    In the lua script, just after calling PacketReorderZeroFill, RSTD.Sleep(10000) is called.

    Even without this 10 seconds of wait, PacketReorderZeroFill took about 5 seconds.

    Could you please give your comments on this function?

    (1)    What kind of processing done in this function?

    (2)    Is it possible to reduce the processing time?

    Thanks,

    -Shibata

  • HI, Shibata:

    PacketReorderZeroFill is to remove packet header so that it only contains binary data from the memory.  If you are using radar studio 02.01.00.00, then this function is not needed.  But if you are using the radar studio earlier version, then this function is still needed, but you can run it later if you want to save the capture time.

    Best,

    Zigang

  • Hi Zigang,

     

    My customer is using the radar studio earlier version with IWR6843AOP ES1.0 EVM.

    So they need PacketReorderZeroFill function.

     

    Thanks for your explanation.

    Please close this thread.

     

    Best regards,

    -Shibata