IWR6843: [mmWaveStudio] How to reduce sleep time in lua script

Intellectual 1630 points

Replies: 3

Views: 35

Part Number: IWR6843



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


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


--Post process the Capture RAW ADC data


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)




Thanks & Regards,




3 Replies

  • 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. 



  • In reply to zigang Yang:

    Hi Zigang,

    Any update on this?



  • In reply to Taro 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).