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.

IWR6843ISK-ODS: 不使用 MMWAVEICBOOST 和 DCA1000的情况下 读取串口数据

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

您好:

我在只有一块IWR6843ISK-ODS开发板的情况下,参考了《使用低速串行总线的实时 ADC 原始数据采集方法》并按照其中的方法对源文件进行了修改,如下:

1、按照参考方案修改了mss_main,c中的代码,因没有MMWAVEICBOOST 开发板,故将波特率调小如下

在rebuild 之后通过uniflash 刷写如开发板

2、按照参考方案修改了oob_parser.py 中的代码

3、修改了cfg文件,如下

sensorStop
flushCfg
dfeDataOutputMode 1
channelCfg 15 5 0
adcCfg 2 1
adcbufCfg -1 0 1 1 1
profileCfg 0 60 567 7 57.14 0 0 70 1 128 2800 0 0 30
chirpCfg 0 0 0 0 0 0 0 1
chirpCfg 1 1 0 0 0 0 0 4
frameCfg 0 1 4 0 1300 1 0
lowPower 0 0
guiMonitor -1 1 0 0 0 0 0
cfarCfg -1 0 2 8 4 3 0 15 1
cfarCfg -1 1 0 4 2 3 1 15 1
multiObjBeamForming -1 1 0.5
clutterRemoval -1 0
calibDcRangeSig -1 0 -5 8 256
extendedMaxVelocity -1 0
bpmCfg -1 0 0 1
lvdsStreamCfg -1 0 0 0
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
measureRangeBiasAndRxChanPhase 0 1.5 0.2
CQRxSatMonitor 0 3 5 121 0
CQSigImgMonitor 0 127 4
analogMonitor 0 0
aoaFovCfg -1 -90 90 -90 90
cfarFovCfg -1 0 0 8.92
cfarFovCfg -1 1 -1 1.00
calibData 0 0 0
sensorStart

现在出现了如下问题:

在运行gui_main.py,选择cfg配置文件并发送之后并没有数据bin文件产生,在pycharm中的控制台显示如下信息(似乎是卡住了,无法继续执行)

想请教您我该如何解决此问题,谢谢!

  • 你好,

    1. 这个cfg在默认mmw demo里能否正常允许?

    2. 如果可以,建议在mmwave start相关代码里添加打印,看看是卡在了什么地方

    下面链接有源码分享,你可以参考对比一下:

    (6) IWR6843AOPEVM: 如何在不使用 MMWAVEICBOOST 和 DCA1000的情况下,利用低速串行总线得到原始数据(每个通道的数据)。 - 传感器论坛 - 传感器 - E2ETm 设计支持 (ti.com)

  • 下面链接有源码分享,你可以参考对比一下

    正如您所说,我之前使用过您所分享链接中由FAE分享的源码,以及此链接作者所使用的cfg配置文件,但是结果还是如上文所分享的一样。

    看到您所回复的第一点,我意识到可能是cfg配置文件的问题,这个cfg文件的确无法使用在默认的mmv demo里正常使用。

    基于此,我将配置文件改为mmwave_industrial_toolbox_4_11_0\labs\People_Counting\visualizer\chirp_configs\3D_People_Counting中的ODS_6m_default.cfg,再次运行还是没有数据bin文件生成,控制台中返回如下:

    Python is  64  bit
    Python version:  sys.version_info(major=3, minor=9, micro=13, releaselevel='final', serial=0)
    Parser type:  3D People Counting
    Connected
    {'startFreq': 60.75, 'numLoops': 64, 'numTx': 3, 'sensorHeight': 3, 'maxRange': 10, 'az_tilt': 0, 'elev_tilt': 0, 'idle': 30.0, 'adcStart': 25.0, 'rampEnd': 59.1, 'slope': 54.71, 'samples': 96.0, 'sampleRate': 2950.0}
    Sensor Height =  3
    -4.0 0.5 -3.0 4.0 6.0 0.0
    Setting Box  0  to visible
    Drew both boxes
    Setting box  1  invisisble
    Sensor Height from cfg =  2.0
    Sensor Height =  2.0
    -4.0 0.5 -2.0 4.0 6.0 1.0
    Drew both boxes
    Setting box  1  invisisble
    b'% SDK Parameters\n'
    b'Skipped\n'
    b"\rmmwDemo:/>% See the SDK user's guide for more information\n"
    b'Skipped\n'
    b'\rmmwDemo:/>% "C:\\ti\\mmwave_sdk_[VER]\\docs\\mmwave_sdk_user_guide.pdf"\n'
    b'Skipped\n'
    b'\rmmwDemo:/>sensorStop\n'
    b'Ignored: Sensor is already stopped\n'
    b'\rDone\n'
    b'\rmmwDemo:/>flushCfg\n'
    b'Done\n'
    b'\rmmwDemo:/>dfeDataOutputMode 1\n'
    b'Done\n'
    b'\rmmwDemo:/>channelCfg 15 7 0\n'
    b'Done\n'
    b'\rmmwDemo:/>adcCfg 2 1\n'
    b'Done\n'
    b'\rmmwDemo:/>adcbufCfg -1 0 1 1 1\n'
    b'Done\n'
    b'\rmmwDemo:/>lowPower 0 0\n'
    b'Done\n'
    b'\rmmwDemo:/>\n'
    b'mmwDemo:/>% Detection Layer Parameters\n'
    b'Skipped\n'
    b'\rmmwDemo:/>% See the Detection Layer Tuning Guide for more information\n'
    b'Skipped\n'
    b'\rmmwDemo:/>% "C:\\ti\\mmwave_industrial_toolbox_[VER]\\labs\\people_counting\\docs\\3D_people_counting_detection_layer_tuning_guide.pdf"\n'
    b'Skipped\n'
    b'\rmmwDemo:/>profileCfg 0 60.75 30.00 25.00 59.10 657930 0 54.71 1   96 2950.00 2 1 36 \n'
    b'Done\n'
    b'\rmmwDemo:/>chirpCfg 0 0 0 0 0 0 0 1\n'
    b'Done\n'
    b'\rmmwDemo:/>chirpCfg 1 1 0 0 0 0 0 2\n'
    b'Done\n'
    b'\rmmwDemo:/>chirpCfg 2 2 0 0 0 0 0 4\n'
    b'Done\n'
    b'\rmmwDemo:/>frameCfg 0 2  96  0 55.00 1 0\n'
    b'Done\n'
    b'\rmmwDemo:/>dynamicRACfarCfg -1 4 4 2 2 8 12 4 8 5.00 8.00 0.40 1 1\n'
    b"'dynamicRACfarCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>staticRACfarCfg -1 6 2 2 2 8 8 6 4 8.00 15.00 0.30 0 0\n'
    b"'staticRACfarCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>dynamicRangeAngleCfg -1 0.75 0.0010 1 0\n'
    b"'dynamicRangeAngleCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>dynamic2DAngleCfg -1 1.5 0.0300 1 0 1 0.30 0.85 8.00\n'
    b"'dynamic2DAngleCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>staticRangeAngleCfg -1 0 8 8\n'
    b"'staticRangeAngleCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>antGeometry0 0 0 -1 -1 -2 -2 -3 -3 -2 -2 -3 -3\n'
    b"'antGeometry0' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>antGeometry1 0 -1 -1 0 0 -1 -1 0 -2 -3 -3 -2\n'
    b"'antGeometry1' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>antPhaseRot 1 -1 -1 1 1 -1 -1 1 1 -1 -1 1\n'
    b"'antPhaseRot' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>fovCfg -1 70.0 20.0\n'
    b"'fovCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>compRangeBiasAndRxChanPhase 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 \n'
    b'Done\n'
    b'\rmmwDemo:/>\n'
    b'mmwDemo:/>'
    b'% Tracker Layer Parameters\n'
    b'Skipped\n'
    b'\rmmwDemo:/>% See the Tracking Layer Tuning Guide for more information\n'
    b'Skipped\n'
    b'\rmmwDemo:/>% "C:\\ti\\mmwave_industrial_toolbox_[VER]\\labs\\people_counting\\docs\\3D_people_counting_tracker_layer_tuning_guide.pdf"\n'
    b'Skipped\n'
    b'\rmmwDemo:/>staticBoundaryBox -3 3 2 5.5 0 3\n'
    b"'staticBoundaryBox' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>boundaryBox -4 4 0.5 6 0 3\n'
    b"'boundaryBox' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>sensorPosition 2 0 15\n'
    b"'sensorPosition' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>gatingParam 3 2 2 2 4\n'
    b"'gatingParam' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>stateParam 3 3 6 500 50 6000\n'
    b"'stateParam' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>allocationParam 40 100 0.1 20 0.5 20\n'
    b"'allocationParam' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>maxAcceleration 0.1 0.1 0.1\n'
    b"'maxAcceleration' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>trackingCfg 1 2 800 30 46 96 55\n'
    b"'trackingCfg' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>presenceBoundaryBox -4 4 0.5 6 0 3\n'
    b"'presenceBoundaryBox' is not recognized as a CLI command\n"
    b'\rmmwDemo:/>sensorStart\n'
    b'Error: Full configuration must be provided before sensor can be started the first time\n'
    

    想再请问 可能出错的地方是哪里以及是否有对应的cfg配置文件可以提供

    谢谢您的耐心解答!

  • 你好,

    mmw demo的参考配置位置:C:\ti\mmwave_sdk_03_05_00_04\packages\ti\demo\xwr68xx\mmw\profile

  • 您好:
    我按照FEA分享的源代码进行修改如下几处:

    1、修改mss_main.c文件下的波特率并rebuild之后将mmwave_sdk_68xx_dsp_mss\Debug文件夹下的bin文件刷写入开发板

    2、修改oob_parser.py文件

        def connectComPorts(self, uartCom, dataCom):
            self.uartCom = serial.Serial(uartCom, 115200,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,timeout=0.3)
            if (self.capon3D == 1 and self.aop == 0):
                self.dataCom = serial.Serial(dataCom, 921600*1,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,timeout=0.025)
            else:
                #self.dataCom = serial.Serial(dataCom, 3125000,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,timeout=0.01)
                self.dataCom = serial.Serial(dataCom, 921600,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,timeout=0.025)
            self.dataCom.reset_output_buffer()
            print('Connected')

    运行gui_main.py文件,选择3D People Counting,并选择mmwave_sdk_03_05_00_04\packages\ti\demo\xwr68xx\mmw\profiles文件夹下的profile_3d.cfg,无数据bin文件产生且在控制台下显示

    提示是在oob_parser.py文件的Capon3DHeader出现异常

    请问 该如何解决此问题

  • 选择3D People Counting

    是否有mmw demo的选项?如果没有,请你debug一下python代码。

  • 感谢您的帮助! 在修改python程序和matlab程序之后已经可以正常运行

    但是会有CRC报错,请问您这是否会影响得到结果的准确性,如果会影响请问您该如何解决

  • 你好,

    我不是很清楚具体什么数据的C RC错误了。你可以修改毫米波串口输出为你自己定义的一些值来调试。

  • 您好:
    我发现是在新增得到parseL3Data(self, dataIn, profile) 函数发生了CRC错误,我打印了其中的中间变量如下

     

    我调试了很久但是还是没能找到出现这个问题的原因,希望能得到您的帮助,谢谢!
  • 你好,

    报错是CRC错误,正如我之前建议的,你可以先让毫米波代码输出一些特殊数据(不是真实的adc数据),然后对比接收后crc计算的值,看是pc侧计算错误,还是接收到的crc值错误。

  • 您好:

    我是一个新手,能否给一点提示,告知一下在哪个函数中可以实现您是所说的向PC端发送自定义的数据。

    谢谢您的帮助!

  • 你好,

    在mmw demo的mms_main.c里MmwDemo_transmitProcessedOutput函数就是串口数据具体实现的代码,你可以修改相关内容。