TI中文支持网
TI专业的中文技术问题搜集分享网站

AWR1642: 添加自定义CLI命令以实现动态chirp配置,在调用该CLI命令时报错

Part Number:AWR1642Other Parts Discussed in Thread:SYSBIOS

您好,我在SRR demo的基础上进行代码修改,我只启用了USRR模式
在mss_srr_cli.c文件中,我添加了新的CLI命令及其回调函数

cliCfg.tableEntry[4].cmd= "reconfiguration";cliCfg.tableEntry[4].helpString= "Idle time";cliCfg.tableEntry[4].cmdHandlerFxn  = SRR_MSS_CLIChirpReconfiguration;

static int32_t SRR_MSS_CLIChirpReconfiguration(int32_t argc, char* argv[])
{int32_t retVal;rlDynChirpCfg_t dynChirpCfg[1U];unsigned int cnt;dynChirpCfg[0].chirpRowSelect=0x30;//Enables only chirp row 3 to be reconfigureddynChirpCfg[0].chirpSegSel=0;dynChirpCfg[0].programMode=0;for(cnt=0;cnt<2;cnt++){dynChirpCfg[0].chirpRow[cnt].chirpNR3=(rlUInt32_t)atoi(argv[0]);}rlDynChirpCfg_t *dynChirpData[1]=&dynChirpCfg[0];retVal=rlSetDynChirpCfg(RL_DEVICE_MAP_INTERNAL_BSS,4U,&dynChirpData[0]);/* Check for mmWaveLink API call status */if (retVal != RL_RET_CODE_OK){System_printf("Error: Unable to configure the dynamic chirp [Error %d]\n",retVal);return -1;}rlDynChirpEnCfg_t dynChirpEnCfg = {0};retVal = rlSetDynChirpEn(RL_DEVICE_MAP_INTERNAL_BSS, &dynChirpEnCfg);if(retVal != RL_RET_CODE_OK){/* Error: Link reported an issue. */System_printf("Error: rlSetDynChirpEn retVal=%d\n", retVal);return -1;}return 0;
}

在调试时,CLI命令advFrameCfg和sensorStart执行得很好,但输入自定义的reconfiguration命令后出现以下错误:
[Cortex_R4_0] Debug: Launched the Initialization Task
Debug: Initialized the mmWave module
Debug: Synchronized the mmWave module
Debug: CLI is operational
[C674X_0] Heap L1 : size 16384 (0x4000), free 1216 (0x4c0)
Heap L3 : size 786432 (0xc0000), free 229376 (0x38000)
Heap L2 : size 49152 (0xc000), free 27040 (0x69a0)
[Cortex_R4_0] Debug: MMWave has been configured for SRR.
Debug: Sensor will start momentarily.Exception occurred in ThreadType_Task.
Task handle: 0x8005ce0.
Task stack base: 0x8005d40.
Task stack size: 0x1000.
R0 = 0x00000000 R8 = 0xffffffff
R1 = 0x00000000 R9 = 0x080099a0
R2 = 0x08006a28 R10 = 0x0800985c
R3 = 0x00000001 R11 = 0xffffffff
R4 = 0x00000000 R12 = 0x00000000
R5 = 0x00000000 SP(R13) = 0x08006b60
R6 = 0x00010000 LR(R14) = 0x00009919
R7 = 0x00000007 PC(R15) = 0x00080000
PSR = 0x400c019f
DFSR = 0x00000000 IFSR = 0x0000000d
DFAR = 0x00000000 IFAR = 0x00080000
ti.sysbios.family.arm.exc.Exception: line 201: E_prefetchAbort: pc = 0x00080000, lr = 0x00009919.
xdc.runtime.Error.raise: terminating execution

请问这个问题该如何解决?

Cherry Zhou:

您好,收到您的问题了,我们需要请求下国外工程师的帮助。

,

Cherry Zhou:

您好,

这个错误看起来与毫米波链路无关。

可能是与 ARM Memory Protection Unit相关。

调用"rlSetDynChirpCfg()"之后是否会发生此错误? 

,

jiao yuyue:

你好,修改我的CLI函数后该问题不再出现

static int32_t CLIChirpReconfiguration(int32_t argc, char* argv[])
{int32_t retVal;rlDynChirpCfg_t dynChirpCfg[1U]={0};unsigned int cnt;if (argc != 2){CLI_write ("Error: Invalid usage of the CLI command\n");return -1;}dynChirpCfg[0].chirpRowSelect=0x00;dynChirpCfg[0].chirpSegSel=0;dynChirpCfg[0].programMode=0;for(cnt=0;cnt<2;cnt++){dynChirpCfg[0].chirpRow[cnt].chirpNR1 = 1<<(cnt+16);dynChirpCfg[0].chirpRow[cnt].chirpNR2 = 0;dynChirpCfg[0].chirpRow[cnt].chirpNR3 |= (rlUInt32_t)atoi(argv[1]);}rlDynChirpCfg_t *dynChirpData[1]=&dynChirpCfg[0];retVal=rlSetDynChirpCfg(RL_DEVICE_MAP_INTERNAL_BSS,1U,&dynChirpData[0]);/* Check for mmWaveLink API call status */if (retVal != RL_RET_CODE_OK){System_printf("Error: Unable to configure the dynamic chirp [Error %d]\n",retVal);return -1;}rlDynChirpEnCfg_t dynChirpEnCfg = {0};retVal = rlSetDynChirpEn(RL_DEVICE_MAP_INTERNAL_BSS, &dynChirpEnCfg);if(retVal != RL_RET_CODE_OK){/* Error: Link reported an issue. */System_printf("Error: rlSetDynChirpEn retVal=%d\n", retVal);return -1;}rlChirpCfg_t getChirpCfg[2] = {0};/* Get chirp configuration */retVal = rlGetChirpConfig(RL_DEVICE_MAP_INTERNAL_BSS, 0, 1, &getChirpCfg[0]);/* Check for mmWaveLink API call status */if(retVal != 0){/* Error: Link reported an issue. */CLI_write("Error: rlGetChirpConfig retVal=%d\n", retVal);return -1;}CLI_write("Tx1: %i \r\n", getChirpCfg[0].idleTimeVar);CLI_write("Tx2: %i \r\n", getChirpCfg[1].idleTimeVar);return 0;
}

赞(0)
未经允许不得转载:TI中文支持网 » AWR1642: 添加自定义CLI命令以实现动态chirp配置,在调用该CLI命令时报错
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1