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.

deepsleep问题

Other Parts Discussed in Thread: CC3200SDK

我现在想测试deepsleep 低功耗模式,我把deepsleep_nw工程中的如下函数,添加到我自己的工程中的vApplicationIdleHook( void)函数里,为什么这个函数不执行。没有信息打印出来。

void
vApplicationIdleHook( void)
{
    int iRetVal;
    
    //
    // Enter SLEEP...WaitForInterrupt ARM intrinsic
    //
    DBG_PRINT("DEEPSLEEP: Entering DeepSleep\n\r");
    
    //MAP_UtilsDelay(80000);
    for(iRetVal = 0; iRetVal < 80000; iRetVal++);
    
    //
    // Disable the SYSTICK interrupt
    //
    MAP_IntDisable(FAULT_SYSTICK);
    MAP_PRCMDeepSleepEnter();
    
    //
    // Enable the SYSTICK interrupt
    //
    MAP_IntEnable(FAULT_SYSTICK);
    DBG_PRINT("DEEPSLEEP: Exiting DeepSleep\n\r");
}

  • 你追一下代码看看,它是不是调用到

    Network_if.c (c:\ti\cc3200sdk_1.0.0\cc3200-sdk\example\common):vApplicationIdleHook( void) 里面去了。

    这个函数是空的。

  • 我把 deepsleep_nw 工程的这段代码复制到我自己工程的 network_if.c 的 vApplicationIdleHook(),能输出 entering deepsleep,无法输出 exiting deepsleep.

    也就是说进入休眠后无法退出,这是为什么?还需要添加哪些代码?

    另外我在 deepsleep_nw 中没有看到设置 PRCM_DSLP_MODE_CLK 的地方,那么是在什么地方设置了允许在 deepsleep 模式下工作的 clock 呢?没有设置为何能退出 deepsleep 模式?