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.

IWR6843AOPEVM: The problem of reading VitalSigns .cfg file by matlab 2021R2

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

My module is IWR6843 with mmwaveicboost

And then, I want to design a GUI program by matlab 2021R2.

I used "Uniflash" flash vital_signs_demo_68xx.bin to mmwaveicboost, the "..\68xx_vital_signs\gui\gui_exe" is able to run competely.

When I used matlab sent "alibDcRangeSig -1 0 0 0 0" to mss, the mss returned an error message.

The error message:

calibDcRangeSig -1 0 0 0 0

Error: Number of averaged chirps is not power of two

Error -1

How can I fix this problem??

The code by matlab 2021R2 below:

clc,close,clear;

threshold_breath=10;
threshold_heart=0.1;
plot_yaxis_max_breath=1.0;
plot_yaxis_max_heart=0.5;

user_com=serialport("COM3",115200);
data_com=serialport("COM4",921600);

flush(user_com);
flush(data_com);

cfg=[
    "sensorStop",...
    "flushCfg",...
    "dfeDataOutputMode 1",...
    "channelCfg 15 3 0",...
    "adcCfg 2 1",...
    "adcbufCfg -1 0 0 1 0",...
    "profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40",...
    "chirpCfg 0 0 0 0 0 0 0 1",...
    "frameCfg 0 0 2 0 50 1 0",...
    "lowPower 0 1",...
    "guiMonitor 0 0 0 0 1",...
    "calibDcRangeSig -1 0 0 0 0",...
    "vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000",...
    "motionDetection 1 20 2.0 0",...
    "sensorStart",...
    ];

for index=1:15
    writeline(user_com,cfg(index));
    pause(0.5);
    disp(read(user_com,user_com.NumBytesAvailable,"string"));
end

clear user_com;
clear data_com;

The return message by matlab 2021R2 below:

sensorStop
Done

mmwDemo:/>
flushCfg
Done

mmwDemo:/>
dfeDataOutputMode 1
Done

mmwDemo:/>
channelCfg 15 3 0
Done

mmwDemo:/>
adcCfg 2 1
Done

mmwDemo:/>
adcbufCfg -1 0 0 1 0
Done

mmwDemo:/>
profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40
Done

mmwDemo:/>
chirpCfg 0 0 0 0 0 0 0 1
Done

mmwDemo:/>
frameCfg 0 0 2 0 50 1 0
Done

mmwDemo:/>
lowPower 0 1
Done

mmwDemo:/>
guiMonitor 0 0 0 0 1
Done

mmwDemo:/>
calibDcRangeSig -1 0 0 0 0
Error: Number of averaged chirps is not power of two

Error -1

mmwDemo:/>
vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000
Done

mmwDemo:/>
motionDetection 1 20 2.0 0
Done

mmwDemo:/>
sensorStart
Debug: Init Calibration Status = 0xffe

Done

mmwDemo:/>

  • Hi,

    I am looking into this and will be getting back to you shortly.

    Thank you,

    Angie

  • Can you please try adding an extra new line before the calibDcRangeSig command?

  • If I added a "null" command before the calibDcRangeSig command.

    The new code below:

    Neglate...
        "lowPower 0 1",...
        "guiMonitor 0 0 0 0 1",...
        "",...
        "calibDcRangeSig -1 0 0 0 0",...
        "vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000",...
        "motionDetection 1 20 2.0 0",...
        "sensorStart",...
        ];
    
    for index=1:16
        writeline(user_com,cfg(index));
        pause(0.5);
        disp(read(user_com,user_com.NumBytesAvailable,"string"));
    end
    
    Neglate...

    The return message below:

    sensorStop
    Done
    
    mmwDemo:/>
    flushCfg
    Done
    
    mmwDemo:/>
    dfeDataOutputMode 1
    Done
    
    mmwDemo:/>
    channelCfg 15 3 0
    Done
    
    mmwDemo:/>
    adcCfg 2 1
    Done
    
    mmwDemo:/>
    adcbufCfg -1 0 0 1 0
    Done
    
    mmwDemo:/>
    profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40
    Done
    
    mmwDemo:/>
    chirpCfg 0 0 0 0 0 0 0 1
    Done
    
    mmwDemo:/>
    frameCfg 0 0 2 0 50 1 0
    Done
    
    mmwDemo:/>
    lowPower 0 1
    Done
    
    mmwDemo:/>
    guiMonitor 0 0 0 0 1
    Done
    
    mmwDemo:/>
    Error using Vital_Signs (line 34)
    Expected input number 2, data, to be a scalar string or a 1-by-n char array.

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

    If I added a "space" command before the calibDcRangeSig command.

    The new code below:

    Neglate...
        "lowPower 0 1",...
        "guiMonitor 0 0 0 0 1",...
        " ",...
        "calibDcRangeSig -1 0 0 0 0",...
        "vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000",...
        "motionDetection 1 20 2.0 0",...
        "sensorStart",...
        ];
    
    for index=1:16
        writeline(user_com,cfg(index));
        pause(0.5);
        disp(read(user_com,user_com.NumBytesAvailable,"string"));
    end
    
    Neglate...

    The return message below:

    sensorStop
    Done
    
    mmwDemo:/>
    flushCfg
    Done
    
    mmwDemo:/>
    dfeDataOutputMode 1
    Done
    
    mmwDemo:/>
    channelCfg 15 3 0
    Done
    
    mmwDemo:/>
    adcCfg 2 1
    Done
    
    mmwDemo:/>
    adcbufCfg -1 0 0 1 0
    Done
    
    mmwDemo:/>
    profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40
    Done
    
    mmwDemo:/>
    chirpCfg 0 0 0 0 0 0 0 1
    Done
    
    mmwDemo:/>
    frameCfg 0 0 2 0 50 1 0
    Done
    
    mmwDemo:/>
    lowPower 0 1
    Done
    
    mmwDemo:/>
    guiMonitor 0 0 0 0 1
    Done
    
    mmwDemo:/>
     
    mmwDemo:/>
    calibDcRangeSig -1 0 0 0 0
    Error: Number of averaged chirps is not power of two
    
    Error -1
    
    mmwDemo:/>
    vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000
    Done
    
    mmwDemo:/>
    motionDetection 1 20 2.0 0
    Done
    
    mmwDemo:/>
    sensorStart
    Debug: Init Calibration Status = 0xffe
    
    Done
    
    mmwDemo:/>

  • Hi,

    Did you modify any of the other cfg commands?

    Thank you,

    Angie

  • It's the xwr1642_profile_VitalSigns_20fps_Front.cfg code below:

    sensorStop
    flushCfg
    dfeDataOutputMode 1
    channelCfg 15 3 0
    adcCfg 2 1
    adcbufCfg -1 0 0 1 0
    profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40
    chirpCfg 0 0 0 0 0 0 0 1
    frameCfg 0 0 2 0 50 1 0
    lowPower 0 1
    guiMonitor 0 0 0 0 1
    calibDcRangeSig -1 0 0 0 0
    vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000
    motionDetection 1 20 2.0 0
    sensorStart

    And It's my matlab send message below:

    cfg=[
        "sensorStop",...
        "flushCfg",...
        "dfeDataOutputMode 1",...
        "channelCfg 15 3 0",...
        "adcCfg 2 1",...
        "adcbufCfg -1 0 0 1 0",...
        "profileCfg 0 60.25 7 6 57 0 0 65 1 200 4000 0 0 40",...
        "chirpCfg 0 0 0 0 0 0 0 1",...
        "frameCfg 0 0 2 0 50 1 0",...
        "lowPower 0 1",...
        "guiMonitor 0 0 0 0 1",...
        "calibDcRangeSig -1 0 0 0 0",...
        "vitalSignsCfg 0.3 0.9 256 512 4 0.1 0.05 100000 300000",...
        "motionDetection 1 20 2.0 0",...
        "sensorStart",...
        ];

    I just send the cfg command to mss step by step. Cry

  • Hi Hsincheng,

    I am sorry this must be frustrating but your configuration settings seem to match what I use when I run this lab and I have not seen this problem. What version of the industrial toolbox are you using?

    Thank you,

    Angie

  • Industrial Toolbox (4.12.0)

    I run the lab demo program (..\68xx_vital_signs\gui\gui_exe) is no problem.

    But It returns an error message to PC, when I run the code by Matlab 2022R2.

    Thank you.

  • Oh,so sorry...

    I inadvertently click the "This resolved my issue" button...

  • Hi Hsincheng,

    Ok, do you have any older versions of matlab you could try?

    Thank you,

    Angie 

  • Oh no, I don't have any older versions of matlab...

  • Hi Hsincheng,

    First, thank you for my patience, I wish I had a more immediate answer for you but I have not seen this error before myself. Does this error happen when you run the executable? 

    I am going to try to recreate this error myself and get back to you.

    Angie

  • No, The executable can be able to run. (..\68xx_vital_signs\gui\gui_exe)

  • Hello Hsincheng.

    Angie is out of office and will be able to provide an answer next week.

    Sincerely,

    Santosh

  • Hi Hsincheng,

    I believe the error you are seeing is due to the new version of Matlab. 

    Thank you,

    Angie