目前的流程为采样,发送数据,接收确认,然后进入sleep模式,但我在sleep模式时,平均电流大概为11uA左右,我已经关闭了采样、rf及串口等外设,但看到rfeasylinkRx中,启动了定时器,该定时器我没有关,是不是这个造成电流大的,初始化代码如下
void rfeasylinkRX_init(void) { #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_GPTIMER1A, ¶ms); if(hTimer == NULL) { //while(1); debug_print("\r\n Open the GPTimer driver error!\r\n"); } /* Set Timeout value to 200ms */ rxTimeoutVal = (SysCtrlClockGet()*2UL)/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 rxPacket.rxTimeout = EasyLink_ms_To_RadioTime(1000); #endif //RFEASYLINKRX_ASYNC }
我没有定义RFEASYLINKRX_ASYNC,因此应该只执行
// Create an RX packet rxPacket.rxTimeout = EasyLink_ms_To_RadioTime(1000);
麻烦大家帮我看一下,谢谢!
Kevin Qiu1:
11uA应该是没有关完,可以看下手册6.7节功耗情况www.ti.com.cn/…/cc1310.pdf
用pinStandby测一下