Hi,
When my CC2541 peripheral is inactive for a certain period of time, I would like it to enter power saving mode.
I would like to have two power saving scenarios:
- Scenario A: Wake-by-button - should wake up only upon a press of a button. Power consumption should be as close to completely off (no batteries) as possible. To my understanding this is achieved by entering PM3.
- Scenario B: Wake-by-radio - should wake up when receiving a packet from a specific "central" previously known by the peripheral. Power consumption should be the minimum possible to allow this.
Questions regarding Scenario A:
A.1. According to the CC2541 user guide: "PM3 is used to achieve ultralow power consumption when waiting for an external event. It should be used when expected sleep time exceeds 3 ms.". I assume these "external events" cover button presses. What other (hardware) events can trigger a wake-up from PM3?
A.2. More specifically to the above - which interrupts can wake the processor from PM3, and where can I find the code to control this behavior?
A.3. What is the correct way to enter PM3? There are several API functions that I suspect might work, but aren't documented clearly enough (in my opinion):
- HalSleep() with a timeout of 0 or infinite (if possible),
- osal_pwrmgr_powerconserve() - the docs state this makes the device go into "power down mode". What EXACTLY does this mean? PM1/2/3? Should I even be calling this function myself?
- Simply making sure no new events will be fired up in any task.
Questions regarding scenario B:
B.1. What is the minimum possible power management mode that still listens to wireless communications?
B.2. In the above mode, how fine-grained can I make the wake-up condition without compromising on power usage. Specifically - can I make the peripheral wake up only when communications from a specific "central" occur? Can I make it listen to any request?
B.3. Can the above be effectively achieved by simply turning off advertisement packets (or increasing the advertisement delay to maximum possible)?
B.4. What is the correct way to enter the appropriate power management mode to this scenario?
I realize there are other posts similar to this in the forum, but I didn't find the answers I needed elsewhere, so I thought it best to ask again.
Thanks in advance!