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: Storing Raw LVDS Data through scripts

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

Hi,

I am using the IWR6843ISK + MMWAVEICBOOST + DCA1000EVM to stream raw data through LVDS. I was wondering what commands/scripts I need to store that data without using the visualizer or mmwavestudio?

Essentially, I need to control the sensor start, sensor stop and data capture but there I can't find any documentation on that.

Thanks!

  • HI, 

    You are right.  The sensor start, sensor stop and DCA1000 start/ stop capture needs to interleave in order to capture the frame start of the data. 

    I did not find any examples in the radar studio release to control both DCA1000 and sensor.   I will ask the design team and get back to you. 

    Best,

    Zigang

  • Hi Zigang,

    Were you able to find any examples or instructions on how to do this?

    If I can control the sensor start/stop like how it is done on mmw_dfp for the AWR1243 that would great.
    I understand its different because the IWR6843ISK has the control built in unlike the AWR1243 but I was hoping there was an example or instructions on this.


    Thank you!

  • Hi, 

    You can try the attached MATLAB function (sendCfg.m inside the zip filesendCfg.zip) to send cli comment to radar sensor.

    Remember if you need to send DCA1000 CLI command through matlab as well, then you need to run everything from the directory below.

    >> cd C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\PostProc

    >>system(['DCA1000EVM_CLI_Control.exe fpga ', datacardConfigJsonFile])

    >>system(['DCA1000EVM_CLI_Control.exe record ', datacardConfigJsonFile]);
    >>pause(2);
    >>sendCfg(COM_PORT_RADAR_CONFIG, configFile);

    >>sendCfg(COM_PORT_RADAR_CONFIG, sensorStopFile);

    >>system(['DCA1000EVM_CLI_Control.exe start_record ', datacardConfigJsonFile]);
    >>pause(0.5);
    >>sendCfg(COM_PORT_RADAR_CONFIG, sensorRestartFile);
    >>pause(3);
    >>system(['DCA1000EVM_CLI_Control.exe stop_record ', datacardConfigJsonFile]);

    Best,

    Zigang

  • Hi, 

    Note that this is only an example and it is not a formal release.  

    Best,

    Zigang

  • Hi Zigang,

    So basically I can open the com port and send control commands (sensorStart, sensorSTop, etc.)?

    The DCA1000EVM CLI is pretty straight forward. Its the control that I am worried about.


    Thanks!

  • That is correct.  Please give it a try and let me know.

    Best,

    Zigang

  • Hi Zigang,

    I don't think this is correct. I am trying to run this example but I am not able to read any data through through my DCA1000EVM.

    I keep on getting the following warning: 'serial' unable to read any data.

    Were you able to verify that this works?

    Thanks!

  • HI, 

    It works on my side.  Please send a screen print out when running the sendCfg function in MATLAB. 

    BEST,

    ZIGNAG

  • By the way, 

    1) Did you flash the out of box binary to your target EVM?

    2) Please run the following command to reset the target EVM.

    system(['DCA1000EVM_CLI_Control.exe reset_ar_device ', datacardConfigJsonFile])

    3) Please check the hardware setup as attached.  Please pay attention to the switches that is in yellow circle. 

  • Hi Zigang,

    I am able to run the code but not receiving any packets. My output is printed below.
    While our mmWaveICBoost switches are in the same configuration. I am confused as to why your switches for the DCA1000EVM are in the way that they are. Attached is a picture of my configuration.

    - DIP Switch 2.2 is set to ETH_Stream

    - DIP Switch 2.3 is set to AR1642_mode for 2 lane LVDS. 

    - DIP Switch 2.6 is set to GND (FPGA Configuration mode).

    mmwDemo:/>sensorStart
    Error: Full configuration must be provided before sensor can be started the first time
    Sending configuration to XWR1xxx sensor_stop.cfg ...
    sensorStop

    sensorStop
    Ignored: Sensor is already stopped

    Done

    Start Record command : Success
    Sending configuration to XWR1xxx sensor_restart.cfg ...
    sensorStart 0

    sensorStart 0
    Error: Full configuration must be provided before sensor can be started the first time

    Stop Record command : Success



    Thanks!

  • Hi, 

    You can check the DCA1000_Quick_Start_Guide.pdf in the radar studio release package.  The DCA1000 sw2 is set that way so that it will be software control mode.  

    Before you send the sensorStart, you need to send the rest of the CLI configuration to the sensor.

    mmwDemo:/>sensorStart
    Error: Full configuration must be provided before sensor can be started the first time
    Sending configuration to XWR1xxx sensor_stop.cfg ...
    sensorStop

    Best,

    Zigang

  • I have attached a complete configuration file chirp1_60G.cfg in the previous zip file.  You will need to send that file first through sendCfg function. 

    Best,

    Zigang

  • Hi Zigang,

    I am following your previous code that you listed and sending the chirp1_60G.cfg file through sendCfg function first but the error still persists.

    Below is my code:

    COM_PORT_RADAR_CONFIG = 'COM4';
    configFile = 'chirp1_60G.cfg';
    sensorStopFile = 'sensor_stop.cfg';
    sensorRestartFile = 'sensor_restart.cfg';
    datacardConfigJsonFile = 'datacard_config_2.json';
    
    %system(['DCA1000EVM_CLI_Control.exe reset_ar_device ', datacardConfigJsonFile])
    system(['DCA1000EVM_CLI_Control.exe fpga ', datacardConfigJsonFile])
    system(['DCA1000EVM_CLI_Control.exe record ', datacardConfigJsonFile]);
    pause(2);
    sendCfg(COM_PORT_RADAR_CONFIG, configFile);
    sendCfg(COM_PORT_RADAR_CONFIG, sensorStopFile);
    system(['DCA1000EVM_CLI_Control.exe start_record ', datacardConfigJsonFile]);
    pause(0.5);
    sendCfg(COM_PORT_RADAR_CONFIG, sensorRestartFile);
    pause(3);
    system(['DCA1000EVM_CLI_Control.exe stop_record ', datacardConfigJsonFile]);
    



    Thanks!

  • Hi,

    Can you uncomment the following file to  reset the EVM first?

    system(['DCA1000EVM_CLI_Control.exe reset_ar_device ', datacardConfigJsonFile])

    Best,

    Zigang

  • Can you also send me the complete screen display when running this following script?

    COM_PORT_RADAR_CONFIG = 'COM4';
    configFile = 'chirp1_60G.cfg';
    sensorStopFile = 'sensor_stop.cfg';
    sensorRestartFile = 'sensor_restart.cfg';
    datacardConfigJsonFile = 'datacard_config_2.json';
    system(['DCA1000EVM_CLI_Control.exe reset_ar_device ', datacardConfigJsonFile])
    system(['DCA1000EVM_CLI_Control.exe fpga ', datacardConfigJsonFile])
    system(['DCA1000EVM_CLI_Control.exe record ', datacardConfigJsonFile]);
    pause(2);
    sendCfg(COM_PORT_RADAR_CONFIG, configFile);
    sendCfg(COM_PORT_RADAR_CONFIG, sensorStopFile);
    system(['DCA1000EVM_CLI_Control.exe start_record ', datacardConfigJsonFile]);
    pause(0.5);
    sendCfg(COM_PORT_RADAR_CONFIG, sensorRestartFile);
    pause(3);
    system(['DCA1000EVM_CLI_Control.exe stop_record ', datacardConfigJsonFile]);
  • Hi Zigang,

    Resetting EVM doesn't change anything.
    Attached is the complete output when running the code.

    >> readData
     
    Reset AR Device command : Success 
    
    ans =
    
         0
    
     
    FPGA Configuration command : Success 
    
    ans =
    
         0
    
     
    Configure Record command : Success 
    Sending configuration to XWR1xxx chirp1_60G.cfg ...
    sensorStop
    
    op
    Ignored: Sensor is already stopped
    
    Done
    flushCfg
    
    
    mmwDemo:/>
    mmwDemo:/>flushCfg
    Done
    dfeDataOutputMode 1
    
    
    mmwDemo:/>
    mmwDemo:/>dfeDataOutputMode 1
    Done
    channelCfg 15 7 0
    
    
    mmwDemo:/>
    mmwDemo:/>channelCfg 15 7 0
    Done
    adcCfg 2 1
    
    
    mmwDemo:/>
    mmwDemo:/>adcCfg 2 1
    Done
    adcbufCfg -1 0 1 1 1
    
    
    mmwDemo:/>
    mmwDemo:/>adcbufCfg -1 0 1 1 1
    Done
    lowPower 0 0
    
    
    mmwDemo:/>
    mmwDemo:/>lowPower 0 0
    Done
    profileCfg 0 60.00 6 6 50 0 0 45 1 256 6000 0 0 48
    
    
    mmwDemo:/>
    mmwDemo:/>profileCfg 0 60.00 6 6 50 0 0 45 1 256 6000 0 0 48
    Done
    chirpCfg 0 0 0 0 0 0 0 1
    
    
    mmwDemo:/>
    mmwDemo:/>chirpCfg 0 0 0 0 0 0 0 1
    Done
    chirpCfg 1 1 0 0 0 0 0 4
    
    
    mmwDemo:/>
    mmwDemo:/>chirpCfg 1 1 0 0 0 0 0 4
    Done
    chirpCfg 2 2 0 0 0 0 0 2
    
    
    mmwDemo:/>
    mmwDemo:/>chirpCfg 2 2 0 0 0 0 0 2
    Done
    frameCfg 0 2 32 0 100 1 0
    
    
    mmwDemo:/>
    mmwDemo:/>frameCfg 0 2 32 0 100 1 0
    Done
    guiMonitor -1 1 1 1 0 0 1
    
    
    mmwDemo:/>
    mmwDemo:/>guiMonitor -1 1 1 1 0 0 1
    Done
    cfarCfg -1 0 2 8 4 3 0 15.0 0
    
    
    mmwDemo:/>
    mmwDemo:/>cfarCfg -1 0 2 8 4 3 0 15.0 0
    Done
    cfarCfg -1 1 0 4 2 3 1 15.0 0
    
    
    mmwDemo:/>
    mmwDemo:/>cfarCfg -1 1 0 4 2 3 1 15.0 0
    Done
    multiObjBeamForming -1 1 0.5
    
    
    mmwDemo:/>
    mmwDemo:/>multiObjBeamForming -1 1 0.5
    Done
    calibDcRangeSig -1 0 -5 8 256
    
    
    mmwDemo:/>
    mmwDemo:/>calibDcRangeSig -1 0 -5 8 256
    Done
    clutterRemoval -1 0
    
    
    mmwDemo:/>
    mmwDemo:/>clutterRemoval -1 0
    Done
    compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
    
    
    mmwDemo:/>
    mmwDemo:/>compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
    Done
    measureRangeBiasAndRxChanPhase 0 1. 0.2
    
    
    mmwDemo:/>
    mmwDemo:/>measureRangeBiasAndRxChanPhase 0 1. 0.2
    Done
    aoaFovCfg -1 -90 90 -90 90
    
    
    mmwDemo:/>
    mmwDemo:/>aoaFovCfg -1 -90 90 -90 90
    Done
    cfarFovCfg -1 0 1.0 1.1
    
    
    mmwDemo:/>
    mmwDemo:/>cfarFovCfg -1 0 1.0 1.1
    Done
    cfarFovCfg -1 1 -20.16 20.16
    
    
    mmwDemo:/>
    mmwDemo:/>cfarFovCfg -1 1 -20.16 20.16
    Done
    extendedMaxVelocity -1 0
    
    
    mmwDemo:/>
    mmwDemo:/>extendedMaxVelocity -1 0
    Done
    CQRxSatMonitor 0 3 4 63 0
    
    
    mmwDemo:/>
    mmwDemo:/>CQRxSatMonitor 0 3 4 63 0
    Done
    CQSigImgMonitor 0 127 4
    
    
    mmwDemo:/>
    mmwDemo:/>CQSigImgMonitor 0 127 4
    Done
    analogMonitor 0 0
    
    
    mmwDemo:/>
    mmwDemo:/>analogMonitor 0 0
    Done
    lvdsStreamCfg -1 1 1 1 
    
    
    mmwDemo:/>
    mmwDemo:/>lvdsStreamCfg -1 1 1 1 
    Done
    sensorStart
    
    
    mmwDemo:/>
    mmwDemo:/>sensorStart
    Error: Full configuration must be provided before sensor can be started the first time
    Sending configuration to XWR1xxx sensor_stop.cfg ...
    sensorStop
    
    sensorStop
    Ignored: Sensor is already stopped
    
    Done
     
    Start Record command : Success 
    Sending configuration to XWR1xxx sensor_restart.cfg ...
    sensorStart 0
    
    sensorStart 0
    Error: Full configuration must be provided before sensor can be started the first time
     
    Stop Record command : Success 
    >> 

  • I see. Please add bpmCfg towards the end of chirp1_60G.cfg, like below. 

    lvdsStreamCfg -1 0 1 0
    bpmCfg -1 0 0 0
    sensorStart

  • Hi Zigang,

    should it be lvdsStreamCfg -1 1 1 1 (as listed in the mmwave sdk user guide for LVDS )

    or should it be lvdsStreamCfg -1 0 1 0

    Thanks!

  • You can check the details in SDK users guide about every parameter in lvdsStreamCfg.  

    My configuration is set for raw data capture only, no header or point cloud.  Just raw ADC data. 

    Best,

    Zigang

  • Hi Zigang,

    This seems to work. Quick question: can we export a configuration file (.cfg) from mmwavestudio?

    The current config file (chirp1_60G.cfg) does not let me send 256 chirps. There seems to be some discrepancy between mmwavesdk and the actual config file.

    Thanks!

  • Hi, there:

    The SDK demo code put the radar cube in L3 memory for the rest of the data processing.  Therefore there is a limitation in the profile/chirp configuration in SDK demo.  But there is no such limitation in the radar studio.    That is the difference between using radar studio vs. using SDK demo for raw data capture.  

    Best,

    Zigang

     

  • Got it. If I use the ppl_counting binary file that should not be a problem correct?

    Located in: C:\ti\mmwave_industrial_toolbox_4_1_0\labs\people_counting\68xx_people_counting

    Thanks!

  • HI, 

    Every demo will have some kinds of memory limitation.  Please make sure you understand the memory limitation for people counting demo and also please make sure it support LVDS streaming.  Not all demo support this feature.    

    Best,

    Zigang

  • Got it. I will now resolve this issue.

    Thanks!