<?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>&amp;quot;Switching off&amp;quot; nRF51 beacon</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15703/switching-off-nrf51-beacon</link><description>I&amp;#39;m using a nRF51 beacon as a receiver that produces a pulse when it receives a byte from the transmitter. The code is based on the ble_app_uart example. And I set the connection interval to minimum to minimise the latency. 
 #define MIN_CONN_INTERVAL</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Aug 2016 11:50:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15703/switching-off-nrf51-beacon" /><item><title>RE: "Switching off" nRF51 beacon</title><link>https://devzone.nordicsemi.com/thread/59950?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 11:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80180440-556b-4dce-a167-917a3a0df086</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Johnson&lt;/p&gt;
&lt;p&gt;Thank you for you questions.&lt;/p&gt;
&lt;p&gt;As explained in the &lt;a href="https://devzone.nordicsemi.com/tutorials/11/"&gt;nRF51 current consumption guide&lt;/a&gt;, System On and System Off low power modes are enabled with the the sd_app_event_wait() and sd_power_system_off() commands respectively when using softdevice.&lt;/p&gt;
&lt;p&gt;To get action on a button, but stay in System On low power mode, you can just insert the following code in the bsp_event_handler in the ble_app_uart example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case BSP_EVENT_KEY_0:
    //Do whatever  
    break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you press Button 1 on the nRF51-DK, then your &amp;quot;Do whatever&amp;quot; code will execute. When the key is not pressed, the nRF51 will stay in System On low power mode (CPU disabled) as code execution falls back to the main loop where power_manage() function (sd_app_event_wait) is executed.&lt;/p&gt;
&lt;p&gt;To see how to enter System Off with softdevice, an example is shown in e.g. in the sleep_mode_enter() function in the ble_app_uart example, which also sets up a GPIO pin for waking up again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>