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.

How to force enter sleep mode?

Other Parts Discussed in Thread: CC2530

In my application I already follow the "Power Management For The CC2530" docs,

compile option: POWER_SAVING
f8wConfig.cfg
-DRFD_RCVC_ALWAYS_ON=FALSE

I have some questions:
TIMER sleep: what is the period length of the timeout before it goes to TIMER sleep?
DEEP sleep: what is the period length of the timeout before it goes to DEEP sleep?

From OSAL.c

#if defined( POWER_SAVING ) && !defined(USE_ICALL)
else // Complete pass through all task events with no activity?
{
osal_pwrmgr_powerconserve(); // Put the processor/system into sleep
}
#endif

How to force it to enter sleep mode in application?
For example I want to do it like this using button:

if ( keys & HAL_KEY_SW_6 )
{
???? // Put the processor/system into sleep
}

Thank you

  • When there's no task in osal task queue, CC2530 will go to sleeping mode immediately. The time depends on how many tasks and how long the tasks will take.
  • Hi Cyclonmaster,

    As YK says, OSAL automatically handles power consumption when no tasks events are queue. Can you describe the use case for this behavior?, having the sleep trigger like that, may cause issues, or is this for testing purposes?
  • Hi,

    I cannot enter sleep mode. Already applied the compile option etc as adice in the docs. How to make sure it is in sleep mode? I try making one LED remain ON. I suppose, if it goes to sleep, all output will be off. But the LED always ON and never OFF. Then we remove all application code and measure the power consumption, after very long waiting. It still show 600uA. We target to achieved 100uA.

    I want to make sure it is in sleep mode to do some testing and do measurement to make sure the circuit does not drain additional power.

    Thank you.

  • If you see 600uA, I think CC2530 already enters sleeping mode (PM2). You should check if there is current leakage on your IO pins.
  • Hi cyclonmaster,

    Seems like you have the keys being polled, for this you must ensure that you have the Key interrupt enabled by defining ISR_KEYINTERRUPT, otherwise the stack will be polling the keys, which does not allow the device to go to sleep properly.
    Can you try it and let us know how it goes?

    BTW, How are you measuring the current?, we have found that the best way to validate power consumption is from the EM directly, and not in the EB.
  • Good point from Luis.