IWR6843ISK-ODS: DCA1000EVM+MMWAVEICBOOST+IWR6843ISK-ODS。

Part Number: IWR6843ISK-ODS
Other Parts Discussed in Thread: MMWAVEICBOOST, , DCA1000EVM, IWR6843ISK

您好!我目前正在使用DCA1000EVM+MMWAVEICBOOST+IWR6843ISK-ODS的组合。目前使用py脚本进行数据采集,但出现了一些问题。在我向ICBOOST串口发送'sensorStart'命令时,板子没有反应。再发送'sensorStop'命令时,串口报错b'Debug: Init Calibration Status = 0x1ffe\n\rError -1\n\rmmwDemo:/>sensorStop\nIgnored: Sensor is already stopped\n\rDone\n\rmmwDemo:/>'。我的config.py和record.py文件如下:

# config.py
from easydict import EasyDict as edict
from mmwave import mmwave

cfg = edict()

cfg.radar = edict({
    # 1: frame based chirps
    # 2: continuous chirping (not supported)
    # 3: advanced frame config
    "dfeDataOutputMode": 1,
    # Channel configuration
    # "rxChanEn": Bitmask for enabling RX channels (1: Enable, 0: Disable)
    # "txChanEn": Bitmask for enabling TX channels (1: Enable, 0: Disable)
    # "cascading": Cascading mode (0: No cascading, 1: Cascading enabled)
    "channelCfg": {
        "rxChanEn": 0b1111,  # Enable all 4 RX channels
        "txChanEn": 0b111,   # Enable TX channel
        "cascading": 0,      # No cascading
    },
    # ADC configuration
    # "numADCBits": ADC resolution (0: 12-bit, 1: 14-bit, 2: 16-bit)
    # "adcOutFmt": ADC output format (0: Real, 1: Complex1, 2: Complex2)
    "adcCfg": {
        "numADCBits": 2,     # 2: 16-bit ADC resolution
        "adcOutFmt": 1,      # 1: Complex1 output format
    },
    # ADC buffer configuration
    "adcbufCfg": {
        "subFrameIdx": -1,   # Sub-frame index: -1 for default
        "adcOutFmt": 0,      # 0: Complex output format
        "sampleSwap": 1,      # 1: I in MSB, Q in LSB
        "ChanInterleave": 1,  # 1: Non-interleaved data
        "ChirpThreshold": 1,  # 1: LVDS chirp threshold
    },
    # Low power mode configuration
    "lowPower": {
        "Ignored": 0,   # Ignored value (0)
        "AdcMode": 1,   # ADC mode (0: Regular, 1: LP Mode)
    },
    # Profile configuration
    "profileCfg": {
        "profID": 0,
        "startFreq": 60.25,       # GHz
        "idleTime": 420,       # us
        "adcStartTime": 5,     # us
        "rampEndTime": 80.0,     # us
        "txOutPower": 0,       # dBm
        "txPhaseShift": 0,     # degrees
        "freqSlopeConst": mmwave.freq_slope,  # MHz/us
        "txStartTime": 0,      # us
        "numAdcSample": mmwave.num_fast_samples,
        "digOutSampleRate": mmwave.adc_sample_rate,  # ksps
        "hpfCornerFreq1": 0,   # 0: 175KHz, 1: 235KHz, 2: 350KHz, 3: 700KHz
        "hpfCornerFreq2": 0,   # 0: 350KHz, 1: 700KHz, 2: 1400KHz, 3: 2800KHz
        "rxGain": 30,          # dB
    },
    # Chirp configuration
    "chirpCfg": [{
        "startIdx": 0,
        "endIdx": 0,
        "profID": 0,
        "startFreqVar": 0,
        "freqSlopeVar": 0,
        "idleTimeVar": 0,
        "AdcStartTimeVar": 0,
        "txEnableMask": 1,
    }, {
        "startIdx": 1,
        "endIdx": 1,
        "profID": 0,
        "startFreqVar": 0,
        "freqSlopeVar": 0,
        "idleTimeVar": 0,
        "AdcStartTimeVar": 0,
        "txEnableMask": 4,
    },
    {
        "startIdx": 2,
        "endIdx": 2,
        "profID": 0,
        "startFreqVar": 0,
        "freqSlopeVar": 0,
        "idleTimeVar": 0,
        "AdcStartTimeVar": 0,
        "txEnableMask": 2,
    }][0: mmwave.num_tx], 
    # Frame configuration
    "frameCfg": {
        "startIdx": 0,
        "endIdx": 2 if mmwave.num_tx==3 else 0,
        "loopNum": mmwave.num_chirps,
        "frameNum": mmwave.num_frames,
        "framePerio": mmwave.num_chirps/(mmwave.fs) * 1000,
        "trigSel": 1,
        "frameTrigDelay": 0,
    },
    # GUI monitor configuration (do not change)
    "guiMonitor": {
        "subFrameIdx": -1,
        "detectedObj": 0,
        "logMagRange": 0,
        "noiseProf": 0,
        "rangeAziHeatmap": 0,
        "rangeDFSHeatmap": 0,
        "stasInfo": 0,
    },
    # CFAR configuration (do not change)
    "cfarCfg": [{
        "subFrameIdx": -1,
        "procDirection": 0,
        "mode": 2,
        "noiseWin": 8,
        "guardLen": 4,
        "divShift": 3,
        "cyclicMode": 0,
        "thresholdScale": 15,
        "peakGrouping": 0
    }, {
        "subFrameIdx": -1,
        "procDirection": 1,
        "mode": 0,
        "noiseWin": 4,
        "guardLen": 2,
        "divShift": 3,
        "cyclicMode": 1,
        "thresholdScale": 15,
        "peakGrouping": 1
    }], 
    # Multi-object beam forming configuration (do not change)
    "multiObjBeamForming": {
        "subFrameIdx": -1,
        "enable": 0,
        "threshold": 0.5
    },
    # Clutter removal configuration (do not change)
    "clutterRemoval": {
        "subFrameIdx": -1,
        "enable": 1
    },
    # Calibration DC range signature configuration (do not change)
    "calibDcRangeSig": {
        "subFrameIdx": -1, 
        "enable": 0, 
        "negativeBinIdx": -5, 
        "positiveBinIdx": 8, 
        "numAvg": 256
    }, 
    # Extended maximum velocity configuration (do not change)
    "extendedMaxVelocity": {
        "subFrameIdx": -1,
        "enable": 0
    },
    # BPM configuration (do not change)
    "bpmCfg": {
        "subFrameIdx": -1,
        "enable": 0, 
        "chirp0Idx": 0, 
        "chirp1Idx": 1
    },
    # LVDS stream configuration
    # "subFrameIdx": Sub-frame index (-1: Default)
    # "enableHeader": Enable header flag (0: Disable, 1: Enable)
    # "dataFmt": Data format (0: HW disable, 1: ADC, 2: CP_ADC_CQ)
    # "enableSW": Enable software flag (0: Disable, 1: Enable)
    "lvdsStreamCfg": {
        "subFrameIdx": -1,
        "enableHeader": 0,
        "dataFmt": 1,
        "enableSW": 0
    },
    # Range bias and RX channel phase compensation configuration
    # "rangeBias": Range bias value
    # "I/Q Bias compen for 3Tx*4Rx": I/Q bias compensation for 3Tx*4Rx channels
    "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",
    # Measure range bias and RX channel phase configuration
    "measureRangeBiasAndRxChanPhase": {
        "enable": 0,
        "targetDistance": 15,
        "searchWin": 5,
    },
    # CQ RX saturation monitor configuration
    "CQRxSatMonitor": {
        "profile": 0,
        "satMonSel": 3,
        "priSliceDuration": 5, 
        "numSlices": 121,
        "rxChanMask": 0, 
    },
    # CQ signal image monitor configuration
    "CQSigImgMonitor": {
        "profile": 0,
        "numSlices": 127,
        "numSamplePerSlice": 4
    },
    # Analog monitor configuration
    "analogMonitor": {
        "enable": 0,
        "sigImgBand": 0
    },
    # AOA field of view configuration (do not change)
    "aoaFovCfg": {
        "subFrameIdx": -1,
        "minAzimuthDeg": -120,
        "maxAzimuthDeg": 120,
        "minElevationDeg": -120,
        "maxElevationDeg": 120
    },
    # CFAR field of view configuration
    "cfarFovCfg": [{
        "subFrameIdx": -1,
        "procDirection": 0, #  point filtering in range direction
        "min": 0,
        "max": 90.00
    }, {
        "subFrameIdx": -1,
        "procDirection": 1, # point filtering in Doppler
        "min": -1,
        "max": 5.00
    }], 
    "calibData": "0 0 0"
})
 

# record.py

import serial, time
from easydict import EasyDict as edict
from configs import cfg
# Configure IWR6843ISK by serial port
serial_port_CLI = 'COM13'
file_cfg = 'cfg/profile_old.cfg'
print('Sending ' + file_cfg + ' to IWR6843ISK on ' + serial_port_CLI)
CLIport = serial.Serial(serial_port_CLI, 115200, timeout=1)

if CLIport.is_open:
    print('Serial port is open')
    config = []
    config.append("sensorStop")
    config.append("flushCfg")
    for cfg_item in cfg.radar.items():
        if type(cfg_item[1]) == edict:
            config.append(cfg_item[0] + " " + " ".join(map(str, cfg_item[1].values())))
        elif type(cfg_item[1]) == list:
            for sub_item in cfg_item[1]:
                config.append(cfg_item[0] + " " + " ".join(map(str, sub_item.values())))
        elif type(cfg_item[1]) == str:
            config.append(cfg_item[0] + " " + cfg_item[1])
        else:
            config.append(cfg_item[0] + " " + str(cfg_item[1]))

    for i in config:
        CLIport.write((i+'\n').encode())
        print('>>> ' + i)
        time.sleep(0.01)


# Wait key to toggle frame
sending = False
initial_frame_sent = False
while True:
    if CLIport.in_waiting > 0:
        sensor_output = CLIport.read(CLIport.in_waiting)
        print("Sensor output: ", sensor_output)
    if sending:
        print('\nFrame ' + 'sending' + ', press Enter to ' + 'stop')
        key_input = input('<<')
        # involke stop
        CLIport.write(('sensorStop\n').encode())
        print('>>> sensorStop')
        time.sleep(0.01)
        sending = False
    else:
        print('\nFrame ' + 'stopped' + ', press Enter to ' + 'send')
        key_input = input('<<')
        #  involke send
        if initial_frame_sent:
           
            start_cmd = 'sensorStart'
        else:
            start_cmd = 'sensorStart'
        CLIport.write((start_cmd + '\n').encode())
        print('>>> ' + start_cmd)
        time.sleep(0.01)
        sending = True
        initial_frame_sent = True
       

恳请帮助,感谢