If the BLESS is advertising or connected to another bluetooth device, then it will "wakeup" at intervals to check connection/data, and thus will allow you to be in low power most of the time. If you are NOT advertising or connected to a bluetooth device, then going to sleep will not be wake-able without hardware pin interrupts.
Thanks For Reply,
But now i am confused cause the design requirement in my project doesn't have scope for HW connection so no HW pin interrupts.
what are my option for still implementing low power mode because requirement is as below:-
1.BLE module should wakeup periodically after like 30-60 mins advertised
2.check for central device if not go to sleep/deepsleep
3.if connection established wait for command from central if no command sleep/deepsleep
4.if command received respond to it wait for next if no command then sleep/deepsleep
Please suggest if any solution is available.
attaching the code snippet.PFA
LP_snippet.PNG 35.8 K
1. You can try setting the advertisement interval to the "maximum" value, and then just restart the advertisement if the number of timeouts*timeout-time is less than 30-60 minutes. (The unit will wakeup when the BLESS fires interrupts; iirc, this includes advertisement intervals, connection intervals, and BLE communications requests (from a connected device))
2. If the device is set as a peripheral, then it "advertises" at timing intervals, with the central device requesting a connection when it wants to connect to the peripheral device. If the peripheral is currently advertising, then the central will "see" it, and only needs to request a connection to connect. This "advertising" can be implemented while the unit is deep sleeping/sleeping.
3. You can have the unit go to deep sleep/sleep while waiting for commands from the connected central device, or you can have it stay awake for a fixed time then go to sleep after a timeout, or do a mixture of both.
4. This would be more or less the same as number 3.
My suggestion would be to try the example low-power mode BLE project to fully test/understand how the BLE operation works, and how it interweaves with low-power modes. That way, you can understand fully how the hardware works before fully committing to something longer-term. The UART to BLE Peripheral Example should be very close to what you are looking for, but you will probably need to change a couple things. The "UART to BLE Central" Example would be implemented on your PC.
Tl;dr; Everything you listed can/is possible to implement on the BLE modules, but it does take some architecting to make sure it works properly.
If you don't have an option of hardware interrupt, you can use WDT interrupt.
2.check for central device if not go to sleep/deepsleep - once advertisement timed out, you can put device in deepsleep. Then start WDT timer which set for the next wake up time.
3, 4 will do automatically in the low power code.
Please refer our low power appnote for better understanding: http://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-battery-life-ble
Thanks & Regards,
Good catch on the WDT Anjana; I forgot to mention that