- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can use devlpm_registerForLowPowerQueries() to disable sleep mode, , but how can I restore into sleep mode?
Solved! Go to Solution.
- Labels:
-
Crystal Warm-Up
-
Sleep Modes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using a 20732S module? If so, please search the forums for crystal warmup (or xtal warmup) issue and see how to increase the crystal warmup time to something of the order of 4000 or 5000 uS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Disable sleep mode when callback return 0, Enter sleep mode when callback return other number. In sleep mode, Can I keep the Bluetooth connection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, deep sleep (hidoff) is not supported while the connection is up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And when connected/scanning/advertising, the device will always sleep between RF activity if the application allows it and there is sufficient time before the next scheduled activity. Deepsleep/hid-off does not retain state, so the chip cannot enter deep sleep when connected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that there are 14 GPIOs on the module and most can drive/sink up to 2mA and are capable of waking device from sleep or deep sleep.
In addition, there are multiple low power modes, and in many cases the firmware automatically handles low power states (as mentioned previously).
In addition, the application may choose to participate in sleep and deep sleep decisions.
Here's a list of the modes:
- Pause
- The processor is idle if sleep is not allowed or there is not enough time to sleep
- All state information is maintained
- Near 0 cycle latency to wake up
- Sleep
- When lower power consumption is required
- All state information is maintained
- Can be woken up by timer or GPIO/ Keyscan /Quadrature sensors
- About 2 mS latency to wake up
- Deep Sleep
- No state information is maintained
- Can be woken up by GPIO/ Keyscan /Quadrature sensors
- Includes ability to wake after configured time
- With internal clock, can wake anywhere from 64mS to ~36 Hrs.
- With external 32 KHz xtal, 128mS to ~144 Hrs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I set the fine_timer_interval to 12.5. I need use PWM to driver the LED light, so I callback return 0 in devlpm_registerForLowPowerQueries() function. When I don't need PWM output, I callback return 80000 to enter low power mode. In low power mode, Can I keep the Bluetooth connection? In reality, some Bluetooth devices can remain connected, some not。 Why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, a connection can be kept when sleep is enabled (but not when deep sleep engages). When you say some devices do not remain connected, what do you see? Does the connection drop? Could you please give us some more information?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes, I need output PWM. So I return 0 in devlpm_registerForLowPowerQueries() callback. When I need enter sleep mode, I return 80000 in devlpm_registerForLowPowerQueries() callback. I rely devlpm_registerForLowPowerQueries () callback to enter sleep or wake up. In sleep mode, some Bluetooth devices can remain connected, some not. And normal timer(bleprofile_regTimerCb) of some devices is stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using a 20732S module? If so, please search the forums for crystal warmup (or xtal warmup) issue and see how to increase the crystal warmup time to something of the order of 4000 or 5000 uS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help. It's OK.