- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, guys.
1. I use two BLE starter kit BCM20737TAG. One in host mode and other in slave mode. After connecting slave TAG to the host TAG and save to NV memory address of the connected host and sending data I turn into a deep sleep. After pressing on the user button SW1 (waking up due interrupt GPIO) restarts slave TAG. Please, tell me, how to determine what slave TAG start came from the deep sleep mode to exclude paring (send advertising) again? May be there is an example implementation?
2. As I read on the community going to deep sleep mode is only possible in not connected state. How to perform explicitly disconnect slave from the host?
3. What API functions are used to going to simple sleep and waking up from in?
Thanks in advance for your replies
Solved! Go to Solution.
- Labels:
-
SDK 2.X
-
Sleep Modes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. The connection is started only by the central.
And advertising triggers central to make the connection.
The application can't know whether waken up from deep sleep mode.
So I think reading host address from NVRAM helps this.
2. To disconnect peripheral from central, please refer below thread.
disconnect recipe (from central) when multiple peripherals are connected
3. Entering sleep mode is managed by firmware.
The application can disable entering sleep mode using devlpm_registerForLowPowerQueries()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. The connection is started only by the central.
And advertising triggers central to make the connection.
The application can't know whether waken up from deep sleep mode.
So I think reading host address from NVRAM helps this.
2. To disconnect peripheral from central, please refer below thread.
disconnect recipe (from central) when multiple peripherals are connected
3. Entering sleep mode is managed by firmware.
The application can disable entering sleep mode using devlpm_registerForLowPowerQueries()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For item 3, this thread contains examples of how to go into sleep and come out: Putting '20732S into sleep or deep sleep mode
JT's blog is also an excellent source of information for Sleep and Deep Sleep Techniques: Sleep Deep_Sleep Explanation and Techniques
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, all
I changed example hello_sensor so that every 10 seconds after the connection to the host and sending data occurs to go to deep sleep by follows:
// Give app chance to reprogram GPIO Interrupt sources or whatever
// it needs to do before going HID Off
bleprofile_enteringDiscLowPowerMode(DEV_LPM_DISC_LOW_POWER_MODES_HID_OFF);
// We can go hid-off
mia_enterHidOff(0, devLpmConfig.wakeFromHidoffRefClk);
// If we get here HID-OFF was aborted
bleprofile_abortingDiscLowPowerMode(DEV_LPM_DISC_LOW_POWER_MODES_HID_OFF);
To wake up from deep sleep, I use the user button SW1 (GPIO Interrupt). It is reset TAG3.
The problem is that during the second and subsequent attempts to go to sleep mode that not occurs.
In traces displays the following:
enterHidoff!!!
Prepare Power save
noAdv
Start Power Save
TimersKilled
abortHidoff!!!
Stop Power Save
Fine Timer(1000 ms, 1/sec)
Fine TImer tick 80
Normal Timer(0 s, 0 tick)
SMP Conn Down
connDown
ConnDnStopIdlTmr
What is the reason?
P.s.
Below I show the pictures of current consumption in my example
!
Wonder why this is ADV and connection time rather big (~ 0.8 - 3 sec).
Did I understand correctly that the standby - this automatic sleep mode?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect your request to enter HIDOFF is not being honored.
Check out: How to enter HIDOFF? How to detect if the request is not honored? and also Re: System sometimes draws 3mA after entering HIDOFF mode
You may also want to make sure you are not getting bitten by the crystal warmup issue: Re: BCM20732S module keeps crashing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you had a chance to investigate the two options recommended on the 25th of July by santol?
- Verification that HIDOFF is being honored
- Crystal Warmup as a potential problem
Let us know if you have made any progress on this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is some source code I received from the development team which demonstrates deep sleep enablement and the associated clock source handling: Source Code: deep sleep enablement and the associated clock source handling....
Maybe this will help.
This will also eventually be added to the Sleep Blog mentioned earlier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
I would like to understand if there was a resolution to Andrei's question? I have run into the same scenario myself in which after the first time of going into DEEP_SLEEP the device continually wakes up repeatedly and provides the same Debug Message output. I have reviewed the source code in the example and incorporated everything that would need to be in the app and after the initial DEEP_SLEEP it continually wakes up unexpectedly. I am not using a Timed wakeup just a GPIO Pin interrupt. I have tried this on the TAG3 board and the Embedded Masters EMRF-20736 board and both produce the same results? A bit baffled...
Regards,
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Resolved it by pulling P0 HIGH...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for confirming.
santol had a couple of posts regarding this that have helped a few others with the same problem.
Here's one of them: How to enter HIDOFF? How to detect if the request is not honored?