工具与软件:
我遵循了 mmWaveLink 文档的移植指南、并成功在我的 FPGA 上运行 mmWaveDFP。 我正在运行 mm4510spi_Non_401示例并使用 Link_Single 通信。
很好地下载 MMWL_powerOnMaster 和 MMWL_firmwaredownload。 howerver、在 MMWL_setDeviceCrcType 之后、应用程序开始不断打印"接收到的 msg"中的校验和不匹配"。
但是,应用程序可能仍然成功地运行,尽管有那些 "校验和不匹配的接收 msg",有时" CRC 不匹配的接收 ASYNC-Event msg"
最终、应用程序在无限循环停止、在无限循环中等待器件将 mmwl_bSensorStarted 设置 为0x0。 该代码如下所示的块 IF (rlDevGlobalCfgArgs. LinkDynChirpTest = true):
/*等待来自设备的帧结束异步事件*/
while (mmwl_bSensorStarted!= 0x0)
{
retval = MMWL_DynAdvConfig (deviceMap);
if (retVal!= 0)
{
printf ("动态高级线性调频脉冲 LUT 偏移更新失败、错误代码%d、retVal);
休息;
}
rlNonOsMainLoopTask();
rlAppSleep (5);
}
我的环境有一些相关的信息、我只是简单地实现了一些回调函数:SPI 传输、IrqRegister、waitIrqStatus、open/Close Device。 我以一种简单的方式实施它们、而不考虑线程安全或类似的东西。 出于同样的原因、我没有实现 IrqMask 和 IrqUnmask。
我 目前无法启用 mmwavelink 调试日志、因为我的 FPGA 操作系统在尝试时会抛出异常(如果这与我的问题相关、我会向它附加更多信息)、因此我能够得到的最好的是 应用程序中的印刷消息。
来自应用程序的打印消息如下:
================= mmWaveLink Example Application ==================== ====================== SPI Mode of Operation ====================== rlDeviceEnable Callback is called by mmWaveLink for Device Index [0] mmWave Device Power on success for deviceMap 1 ========================== Firmware Download ========================== Meta Image download started for deviceMap 1 Download in Progress: 0%..2%..5%..8%..11%..14%..17%..20%..23%..26%..29%..32%..35%..38%..41%..44%..47%..50%..52%..55%..58%..61%..64%..67%..70%..73%..76%..79%..82%..85%..88%..91%..94%..97%..Done! Meta Image download complete ret = 0 Firmware update successful for deviceMap 1 ===================================================================== CRC Type set for MasterSS success for deviceMap 1 Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg CRC mismatched in the received Async-Event msg RF Version [ 2. 2. 0.13] MSS version [ 2. 2. 1. 7] mmWaveLink version [ 2. 2. 3. 2] RF Patch Version [ 2. 2. 4. 0] MSS Patch version [ 2. 2. 2. 0] Radar/RF subsystem Power up successful for deviceMap 1 ======================Basic/Static Configuration====================== Calling rlSetChannelConfig With [15]Rx and [7]Tx Channel Enabled Channel Configuration success for deviceMap 1 Calling rlSetAdcOutConfig With [1]ADC Bits and [2]ADC Format AdcOut Configuration success for deviceMap 1 Calling rlRfSetLdoBypassConfig With Bypass [0] LDO Bypass Configuration success for deviceMap 1 Data format Configuration success for deviceMap 1 Low Power Configuration success for deviceMap 1 APLL Synth BW Configuration success for deviceMap 1 AsyncEvent Configuration success for deviceMap 1 Basic/Static configuration success for deviceMap 1 Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg Async event: RF-init calibration status CRC mismatched in the received Async-Event msg RF Initialization/Calibration successful for deviceMap 1 ==================Programmable Filter Configuration================== Calling rlRfSetProgFiltConfig with coeffStartIdx[0] progFiltLen[14] GHz progFiltFreqShift[100] MHz/uS Programmable Filter Configuration success for deviceMap 1 Calling rlRfSetProgFiltCoeffRam with coeffArray0[-876] coeffArray1[-272] GHz coeffArray2[1826] MHz/uS Programmable Filter coefficient RAM Configuration success for deviceMap 1 ======================FMCW Configuration====================== Calling rlSetProfileConfig with ProfileId[0] Start Frequency[77.200256] GHz Ramp Slope[29.981732] MHz/uS Profile Configuration success for deviceMap 1 Calling rlSetChirpConfig with ProfileId[0] Start Idx[0] End Idx[63] Calling rlSetChirpConfig with ProfileId[0] Start Idx[64] End Idx[127] Get chirp configurations are matching with parameters configured during rlSetChirpConfig Chirp Configuration success for deviceMap 1 ==================Data Path(LVDS/CSI2) Configuration================== Calling rlDeviceSetDataPathConfig with HSI Interface[1] Selected Data Path Configuration successful for deviceMap 1 Calling rlDeviceSetDataPathClkConfig with HSI Data Rate[6] Selected MMWL_hsiDataRateConfig success for deviceMap 1 Calling rlDeviceSetHsiClk with HSI Clock[11] MMWL_setHsiClock success for deviceMap 1 CSI2/LVDS Clock Configuration success for deviceMap 1 LaneConfig success for deviceMap 1 LvdsLaneConfig success for deviceMap 1 CSI2/LVDS Lane Configuration success for deviceMap 1 ====================================================================== Calling rlSetFrameConfig with Start Idx[0] End Idx[127] Loops[1] Periodicity[100]ms Frame Configuration success for deviceMap 1 ====================================================================== Async event: Frame trigger CRC mismatched in the received Async-Event msg Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg Sensor Start successful for deviceMap 1 ====================================================================== Calling DynChirpCfg with chirpSegSel[0] chirpNR1[0] Dynamic Chirp config successful for deviceMap 1 Dynamic Chirp Enable successful for deviceMap 1 ====================================================================== Checksum mismatched in the received msg Checksum mismatched in the received msg Checksum mismatched in the received msg Get chirp configurations are matching with parameters configured via dynChirpConfig GetChirp Configuration success for deviceMap 1 Checksum mismatched in the received msg
我的问题是:
1.为什么每次运行应用程序时都有固定数量的此类错误消息? mmwavelink 抛出异常并继续之前的最大值是多少? 如果不是什么可能导致这个奇怪的现象。
2.为什么我收到错误的校验和或 CRC、我的 SPI 传输不够稳健吗? 但如果是、我认为我不能成功运行应用的其他步骤、我已经检查 SPI 波形以确保其符合数据表中的 SPI 时序要求、那是为什么呢?
3.如何解决应用程序只能执行 MMWL_sensorStart (),但没有进一步? 我可以忽略当前错误并假设我成功移植了 mmwavelink 吗?