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.

IWR1642: why run matlab m file to configure sensor through uart cause sensor configure error, but no error with matlab exe?

Part Number: IWR1642
Other Parts Discussed in Thread: TIDEP-0090,

Hi,

My cutomer wants to refer to the GUI in mmWave sdk 08 to make own gui. So they run mmv demo in mmWave SDK 1.0 with GUI in mmWave SDK 0.8.

There will be sensor config error if they run mmw_demo.m in matlab. Pls find part of log in CCS below.

[CortexR4_0] Sensor has been stopped
Debug: MMWDemoMSS Received CLI sensorStart Event
Error: MMWDemoMSS mmWave Configuration failed [Error code -13017]

We checked the meaning of error code and it means continuous mode config failed, but in our case, we just use the config file at C:\ti\mmwave_sdk_01_00_00_05\packages\ti\demo\xwr16xx\mmw\profiles\profile_2d.cfg and it doesn't config continuous mode.

But if they run the mmw_demo.exe in C:\ti\mmwave_sdk_00_08_00_00\packages\ti\demo\ar16xx\mmw\gui, there will be no error about config (though there is error in matlab file for serial port which I think it is not related to this config issue). Pls find part of log in CCS below.

[CortexR4_0] **********************************************
Debug: Launching the Millimeter Wave Demo
**********************************************
Debug: MMWDemoMSS Launched the Initialization Task
Debug: MMWDemoMSS mmWave Control Initialization was successful
Debug: CLI is operational
Sensor has been stopped
Debug: MMWDemoMSS Received CLI sensorStart Event
[C674X_0] Heap L1 : size 16384 (0x4000), free 2816 (0xb00)
Heap L2 : size 49152 (0xc000), free 35368 (0x8a28)
Heap L3 : size 655360 (0xa0000), free 368640 (0x5a000)

Do you have any idea on why run matlab m file to configure sensor through uart cause sensor configure error, but no error with matlab exe? My customer needs to fix this as it is easier to development and debug code with matlab m file.

Thanks,

  • Hello Chris,
    Are you trying run the config from the SDK 1.0 (C:\ti\mmwave_sdk_01_00_00_05\packages\ti\demo\xwr16xx\mmw\profiles\profile_2d.cfg) using the matlab from SDK 0.8 ?
    You should use the config file from the SDK 0.8 if you are using the matlab from the SDK 0.8.

    Regards,
    Vivek
  • Vivek,

    I only focus on the config error. Not for matlab error. I am using the mmw demo in sdk 1.0 so I think I should use the configure file in sdk 1.0 too.
    And the exe file generated by matlab has no problem on the sensor config with sdk 1.0 config file. The error only happens when running m file in Matlab.
    What's the difference on the uart output between exe and m file? I can't understand why the test result is different with exe and m file.

    Thanks,
  • Hello Chris,
    There were some changes in the configuration file commands between the SDK 0.8 and SDK 1.0. So I am not sure if the matlab code in the SDK 0.8 would be handling the commands from the SDK 1.0 config file properly. Would request you to use the whole package from one of the SDK versions and not mix between two SDK versions.

    Regards,
    Vivek
  • Vivek,

    My customer worked on sdk 08 before and they are familar with matlab as the GUI. So they want to keep to use matlab as GUI when they are moving to sdk 1.0.

    Vivek Dham said:
    I am not sure if the matlab code in the SDK 0.8 would be handling the commands from the SDK 1.0 config file properly.

    As I mentioned in the previous post, there is no sensor config error if I use the mmw_demo.exe in sdk 0.8. So if there is issue on the GUI code of sdk 0.8, I think there will be also error when using exe file, instead of only m file.

    Thanks,

  • Hi,

    I just found TI design of traffic monitoring (TIDEP-0090) is based on IWR1642 and mmWave SDK1.0. And it uses matlab as its GUI and there is no problem to using the m file in matlab with CCS downloading R4F/DSP firmware.

  • Chris,

    Here's my two cents, if not mixing sdk 1.0 and 0.8, will sdk 0.8 alone work for matlab.m?

    If that's working, then the error is either from the matlab parsing the config file or parameters passed to radar device.

    As mentioned by Vivek, the format of the configuration parameters are different between sdk 1.0 and 0.8. The error "continuous mode" is only configurable in sdk1.0.  How about converting the parameters from sdk 1.0 to 0.8 and try?

    Thanks and Regards,

    Michelle

  • Hello Chris,

    The message posted from CCS console window is not an error message.

    That is after loading images - passing cfg - run step the console in CCS will print the above message and you will see valid data sent on the device's Data port (uart on PC).

    When using the older gui with SDK1.0 images  the data structure expected by gui needs to be changed. A modified file with these changes was provided and that should serve as a reference for interpreting the received data structure in matlab.

    Alternatively, the data structure information can be found at following locations:

    1) In SDK installation html:

    MmwDemo_output_message_header_t Struct Reference  

    In SDK Installation path:  file:///C:/ti/mmwave_sdk_01_00_00_05/packages/ti/demo/xwr16xx/mmw/docs/doxygen/html/struct_mmw_demo__output__message__header__t.html

    2) In Offline Visualizer's Java files:

    Function:  " var process1 = function(bytevec) { "

    In Offline Visulaizer installation path :  ~\install_image_mmWave_Demo_Visualizer\mmWave_Demo_Visualizer\app\mmWave.js

    Offline version of Visualizer can be downloaded at :  https://dev.ti.com/gallery/

    By clicking on down arrow.

    Please perform equivalent data structure changes on the receiving side to interpret the data from Device.

    If there are more questions please let us know.

    Thank you,

    Vaibhav