<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About sleep mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2067/about-sleep-mode</link><description>Hi, 
 I&amp;#39;m confused with the functions (sd_power_mode_set and sd_app_event_wait).
1.I think there are described with the same function.I can&amp;#39;t tell the difference between this two.And I can&amp;#39;t find the function that is used to wake up the chip.
2.Can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Apr 2014 08:52:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2067/about-sleep-mode" /><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8844?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 08:52:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21ed1530-a45a-4d78-b7e3-ede3c7335e2b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Mahone&lt;/p&gt;
&lt;p&gt;Sorry for the late response.&lt;/p&gt;
&lt;p&gt;I was somehow assuming that you were using BLE but clearly you are using ANT. Yes the procedure/code you describe is valid to get ANT RSSI value. What you get is unsigned integer so you must use twos compliment conversion to find the actual decimal RSSI value in dBm, a good converter to do that is e.g. here:
&lt;a target="_blank" href="http://www.exploringbinary.com/twos-complement-converter/" rel="nofollow"&gt;http://www.exploringbinary.com/twos-complement-converter/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So if you are receiving value 200 = 0xC8 = 11001000 it is -56dBm&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8847?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2014 15:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c981f69c-36d1-4d1f-bb59-27d8115f8c92</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Paul&lt;/p&gt;
&lt;p&gt;During connection event, the radio is active. Between connection event, the CPU will sleep. The same applies for advertising events, the device will sleep when it is not transmitting advertising packets. While the device is in a connection with a peer device, there will be number of connection events. There is one connection event in each connection interval. Connection interval can be minimum 7.5ms and maximum 4000ms. You can realize and visualize what a connection events and advertising events are made of by looking at figures 9 and 10 in the S110 Softdevice Specification v1.2 respectively.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8845?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2014 18:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccab831d-c961-44ad-b495-6c09bf3f25ec</guid><dc:creator>paul-b</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;I have a couple follow up questions regarding the connection event that you mentioned.  The API documentation is very sparse in this area.&lt;/p&gt;
&lt;p&gt;Is the &amp;quot;connection event&amp;quot; any BLE connection to a remote device, or just a connection interval?  In other words, will the CPU sleep in-between connection intervals while connected?  Will it sleep while advertising?  I&amp;#39;m just wondering if there are any states where sd_app_event_wait will not enter sleep.&lt;/p&gt;
&lt;p&gt;thanks,
Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8846?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2014 08:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b646cef-8a32-44c2-bd43-7ba331cc47e0</guid><dc:creator>mahone</dc:creator><description>&lt;p&gt;Hi Birnir,&lt;/p&gt;
&lt;p&gt;Thanks a lot,about question 4,I use the way:&lt;/p&gt;
&lt;p&gt;/* Enable RSSI level for received messages */
sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_RSSI);&lt;/p&gt;
&lt;p&gt;Then each time you receive a payload, byte 13 in event_message_buffer will contain the RSSI value, when reading out the event by:
/* Fetch the event */
return_value = sd_ant_event_get(&amp;amp;ant_channel, &amp;amp;event, event_message_buffer);&lt;/p&gt;
&lt;p&gt;and the event_message_buffer[13] is the RSSI .
Is this right?or can you tell me the difference between what you told me and what I do.Also,the value 200 I got should be pocess from twos complement to true form?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8843?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2014 07:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eaef7e48-d793-471c-b7cd-5222ce1c901b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Mahone&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1 and 3&lt;/strong&gt;. When sd_app_event_wait is called, the chip will enter System On low power mode. What actually happens is that code execution is stopped and the CPU is turned off. For most of the BLE examples in the nRF51 SDK, the sd_app_event_wait function is called in the main loop. More precisely, in the main loop of most BLE SDK examples, you will find function call power_manage which calls the sd_app_event_wait function in turn.&lt;/p&gt;
&lt;p&gt;The BLE peripheral device and the BLE central device aggree on when to turn on the radio and communicate, in a so called connection event. This is how data is exchanged and how the connection is maintained. In between connection events, the radio of the peripheral device is inactive and the peripheral device only needs to keep track of time in order to know when to enable the radio for the next connection event. So in between connection events, the peripheral device (nRF51822 with S110 peripheral softdevice) will enter System On low power mode to save power. The only thing normally running in between connection events is the RTC0 timer and the 32kHz low frequency clock which is required to operate the RTC0.&lt;/p&gt;
&lt;p&gt;The RTC0 keeps track of time and generates an event momentarily for the next connection event. This will make the peripheral device exit System On low power mode and enter normal mode. This means that the CPU will be enabled and start code execution in the RTC0 interrupt handler (performed internally in the softdevice). When the radio event has passed, the code execution will fall back to the main loop (which has lower priority than interrupts) where sd_app_event_wait is executed again, making the peripheral device enter System On low power mode until the next connection event.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; When the S110 softdevice is enabled, the current draw should be around 3.1uA in between connection events. The System On low power mode draws 2.6uA, RTC0 0.1uA and the 32kHz low frequency crystal draws 0.4uA, accumulating to the 3.1uA. You can read more about how it works and how to figure out different current consumption numbers in the following threads:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/index.php/how-to-minimize-current-consumption-for-ble-application-on-nrf51822#reply-5187"&gt;Current consumption guide 1&lt;/a&gt;
&lt;a href="https://devzone.nordicsemi.com/index.php/what-is-the-power-and-clock-model-of-peripheral-in-nrf51"&gt;Current consumption guide 2&lt;/a&gt;
&lt;a href="https://devzone.nordicsemi.com/index.php/what-low-frequency-clock-sources-can-i-use"&gt;Low frequency clock guide&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt;  To use RSSI when the S110 softdevice is enabled, use the &lt;a href="http://devzone.nordicsemi.com/documentation/nrf51/5.2.0/html/a00845.html#gaa58161bb20610aa9a6223980c837ed19"&gt;sd_ble_gap_rssi_start()&lt;/a&gt; and &lt;a href="http://devzone.nordicsemi.com/documentation/nrf51/5.2.0/html/a00845.html#ga6a4a22fdfcab344701c6ab3b27bff339"&gt;sd_ble_gap_rssi_stop()&lt;/a&gt; functions. The RSSI value will be reported back to the application in the form of an event, and as soon as you call sd_ble_gap_rssi_start() you should start seeing the events coming in.&lt;/p&gt;
&lt;p&gt;You can process the events by adding the following case in the on_ble_evt() function:&lt;/p&gt;
&lt;p&gt;case BLE_GAP_EVT_RSSI_CHANGED:
current_rssi = p_ble_evt-&amp;gt;evt.gap_evt.params.rssi_changed.rssi;
break;&lt;/p&gt;
&lt;p&gt;The current_rssi variable should be defined as int8_t&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8842?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2014 07:48:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a9ba364-b1ec-41bb-9b05-b8b4f7129884</guid><dc:creator>mahone</dc:creator><description>&lt;p&gt;About the quetion 4,can I say that the data is the twos complement?And the really value is -56dbm?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8841?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2014 01:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ec03193-989c-475c-8af5-1591214f4316</guid><dc:creator>mahone</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks a lot,but still there are some problems puzzle me.
1.How to go out from the sub power mode,or is this like the function  sd_app_event_wait that can go out automatically?
2.I don&amp;#39;t know where to find the electric current cost of the Low Power mode.
3.what&amp;#39;s the period of the sd_app_event_wait function?or can I consider it as a while(1) and it can scan over and over again till a event come out?
4.Recently I use the ant to test the value of RSSI,it says it&amp;#39;s about 200,I don&amp;#39;t know if it&amp;#39;s normal?or is there some kind of translation I missed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sleep mode</title><link>https://devzone.nordicsemi.com/thread/8840?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2014 11:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0085283-92e3-40d1-b7b3-123718e32b08</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The sd_app_event_wait function will put the device to System On low power mode. When an event occurs, the device will enter normal mode again.&lt;/p&gt;
&lt;p&gt;The sd_power_mode_set function determines the power mode (submode) for the System On low power mode. There are two possible settings NRF_POWER_MODE_CONSTLAT and NRF_POWER_MODE_LOWPWR, defined in nrf_soc.h. These modes are described on &lt;a href="https://devzone.nordicsemi.com/index.php/what-is-the-power-and-clock-model-of-peripheral-in-nrf51"&gt;this thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>