English
Language : 

AN92584 Datasheet, PDF (14/42 Pages) Ramtron International Corporation – Designing for Low Power and Estimating Battery Life for BLE Applications
Designing for Low Power and Estimating Battery Life for BLE Applications
entered deep
sleep state */
blePower = CyBle_GetBleSsState();
/* C10. System can enter Deep-Sleep only when BLESS and rest of the application
are in
DeepSleep or equivalent power modes */
if((blePower == CYBLE_BLESS_STATE_DEEPSLEEP || blePower ==
CYBLE_BLESS_STATE_ECO_ON) &&
applicationPower == DEEPSLEEP)
{
applicationPower = WAKEUP_DEEPSLEEP;
/* C11. Put system into Deep-Sleep mode*/
CySysPmDeepSleep();
}
/* C12. BLESS is not in Deep Sleep mode. Check if it can enter Sleep mode */
else if((blePower != CYBLE_BLESS_STATE_EVENT_CLOSE))
{
/* C13. Application is in Deep Sleep. IMO is not required */
if(applicationPower == DEEPSLEEP)
{
applicationPower = WAKEUP_DEEPSLEEP;
/* C14. change HF clock source from IMO to ECO*/
CySysClkWriteHfclkDirect(CY_SYS_CLK_HFCLK_ECO);
/* C14. stop IMO for reducing power consumption */
CySysClkImoStop();
/*C15. put the CPU to sleep */
CySysPmSleep();
/* C16. starts execution after waking up, start IMO */
CySysClkImoStart();
/* C16. change HF clock source back to IMO */
CySysClkWriteHfclkDirect(CY_SYS_CLK_HFCLK_IMO);
}
/*C17. Application components need IMO clock */
else if(applicationPower == SLEEP )
{
/* C18. Put the system into Sleep mode*/
applicationPower = WAKEUP_SLEEP;
CySysPmSleep();
}
}
/* Enable interrupts */
CyExitCriticalSection(interruptStatus );
}
www.cypress.com
Document No. 001-92584 Rev. *A
14