- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am facing challenge in achieving Sleep Mode.
In our code, LPM is initialized and low power query call-back is also register.
Issue is lowpowerquery call back is continously called and chipset doensot seems to be entering SLEEP mode.
It is expected to sleep for 1second, based on low power query call back return value.
Attached source file for given scenario. and trace dump
00:24:41 - create()
00:24:41 - 1.00
00:24:41 - 0018
00:24:41 - 020300002a
00:24:41 - 636f6f6b705f6c706d
00:24:41 - 020500012a
00:24:41 - 0003
00:24:41 - 0118
00:24:41 - 0d
00:24:41 - 0d00
00:24:41 - 02010503030118020a04
00:24:41 - 0a09636f6f6b705f6c706d
00:24:41 Trace Decoding Error - Could not find line number 314
00:24:41 Attribute bytes
00:24:41 Handle: 0002
00:24:41 Perm : 0002
00:24:41 Len, Max Len : 0005, 0005
00:24:41 UUID : 2803
00:24:41 Attribute bytes
00:24:41 Handle: 0003
00:24:41 Perm : 0000
00:24:41 Len, Max Len : 0009, 0009
00:24:41 UUID : 2A00
00:24:41 Attribute bytes
00:24:41 Handle: 0004
00:24:41 Perm : 0002
00:24:41 Len, Max Len : 0005, 0005
00:24:41 UUID : 2803
00:24:41 Attribute bytes
00:24:41 Handle: 0005
00:24:41 Perm : 0000
00:24:41 Len, Max Len : 0002, 0002
00:24:41 UUID : 2A01
00:24:41 Attribute bytes
00:24:41 Handle: 0006
00:24:41 Perm : 0002
00:24:41 Len, Max Len : 0002, 0002
00:24:41 UUID : 2800
00:24:41 Attribute bytes
00:24:41 Gatt DB Dump complete
00:24:41 bd_addr[5:2] = 20 73 6A 11
00:24:41 bd_addr[1:0] = 00 00
00:24:41 GPIO 0001 (11)
00:24:41 GPIO_WP:OFF= 00
00:24:41 Battery level: 0/100
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
00:24:42 - LPM 0
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue is the return value should be in terms of usec at line 248.
Anything less than 3.5msec is rejected and chip doesnot enter sleep.
So return 1000000 for 1 sec Sleep.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using a module to test your code? If yes, you will want to do the crystal warm up fix. And you may want to set a non zero value to your finer timer, such as 50.
Or can you return 0 instead of 1000 at line 248 in your app code?
I also suggest that you develop your sleep/deep_sleep using established coding from sample apps like wiced_sense. I will avoid
the wiced bluetooth designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue is the return value should be in terms of usec at line 248.
Anything less than 3.5msec is rejected and chip doesnot enter sleep.
So return 1000000 for 1 sec Sleep.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From line 796 of the wiced sense code, it spelt out how to enter sleep mode.