Part Number: CC2541
Hi everyone!
I use CC2541 and as a basis I took SimpleBLEPeripheral example.
In the project I use Advertising, Observer, POWER_SAVING and periodic event.
After wake up from sleep mode, the advertising is dosn’t work anymore. But I added next loop to the function halSleep:
while(1)
{
HAL_SLEEP_SET_POWER_MODE();
if( IRSensorObstacleDetected() )
break;
/* if obstacle not detected, go to sleep again on 100 ms */
sleepTimer = halSleepReadTimer();
halSleepSetTimer( sleepTimer, HAL_SLEEP_MS_TO_32KHZ( 100) );
}
I understand that some of the tasks didn’t expect that sleep can be very long.
But which tasks I must to stop before go to sleep, or what I need to reinitialize after exit from sleep?
Thanks for the help!