我在用CC1310F128RSM板子,初始化rfeasylinkrx时,初始化不通过,出问题的地方如下;
#ifdef RFEASYLINKRX_ASYNC
/* Reset the timeout flag */
rxTimeoutFlag = false;
/* Set the reception flag to its default state */
rxDoneFlag = false;
/* Open the GPTimer driver */
GPTimerCC26XX_Params params;
GPTimerCC26XX_Params_init(¶ms);
params.width = GPT_CONFIG_32BIT;
params.mode = GPT_MODE_ONESHOT;
params.direction = GPTimerCC26XX_DIRECTION_UP;
params.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
hTimer = GPTimerCC26XX_open(Board_GPTIMER0A, ¶ms);
if(hTimer == NULL)
{
while(1);
}
/* Set Timeout value to 2000ms */
rxTimeoutVal = (SysCtrlClockGet()*20UL)/10UL - 1UL;//(SysCtrlClockGet()*3UL)/10UL - 1UL;
GPTimerCC26XX_setLoadValue(hTimer, rxTimeoutVal);
/* Register the GPTimer interrupt */
GPTimerCC26XX_registerInterrupt(hTimer, rxTimeoutCb, GPT_INT_TIMEOUT);
#else
// Create an RX packet
EasyLink_RxPacket rxPacket = {0};
#endif //RFEASYLINKRX_ASYNC
程序死在了标红的地方,这边有问题和我哪边的设置有关呢?请帮我分析一下,谢谢!
解决:找到原因了,ADCBuf_convert()。该调用将请求ADC资源,配置ADC,设置DMA和GPTimer,与RX设置的GPTimer冲突,改一下RX初始化的GPTimer就可以了,多有打扰!