<?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>disable SD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10616/disable-sd</link><description>Hello,
I use nrf51422 for my project. I have to collect data via BLE nus from phone, but after that i don&amp;#39;t need SD anymore. Can i use blocked hardware, like RTC0, after disable sd?
I try to do that, but i get Hard Fault. 
 Regards Michał,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 13 Dec 2015 15:58:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10616/disable-sd" /><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39589?ContentTypeID=1</link><pubDate>Sun, 13 Dec 2015 15:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d1a05b8-c4a3-49d4-a813-b9e6e455c189</guid><dc:creator>michalmmz</dc:creator><description>&lt;p&gt;it&amp;#39;s works! Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39588?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2015 16:28:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f26dac7-1d93-4102-8060-b22674784771</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;That should be all yes. Does the device hardfault if you don&amp;#39;t step through the code in debug? Debug stepping the SoftDevice functions may lead to a hardfault sometimes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39587?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 21:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:917c0b3d-96b9-4dd5-ba21-4a5e2faf4755</guid><dc:creator>michalmmz</dc:creator><description>&lt;p&gt;I did like you said, I wait for BLE_GAP_EVT_DISCONNECT, but still after sd_disable next step in debugger is going to hardfault. What i need to do before i use softdevice_handler_sd_disable()?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;disconect&lt;/li&gt;
&lt;li&gt;wait for BLE_GAP_EVT_DISCONNECT&lt;/li&gt;
&lt;li&gt;and not go into advertising.
some thing more?
I will be grateful for your response.
Regards&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39586?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 09:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e2bab3f-8e98-4a85-9322-4fb03cab4bec</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You should wait for &lt;code&gt;BLE_GAP_EVT_DISCONNECT&lt;/code&gt; after calling disconnect before disabling the SoftDevice, and not go into advertising which is the default behaviour of the SDK examples, see &lt;code&gt;ble_advertising_on_ble_evt(...)&lt;/code&gt; in ble_advertising.c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39585?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 22:11:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c91220ef-b900-46ea-8802-0e7e94abfae8</guid><dc:creator>michalmmz</dc:creator><description>&lt;p&gt;Thank you for answer.
But its still not work. After collect my data i use function
sd_ble_gap_disconnect and softdevice_handler_sd_disable.
When i want to take another step in debug after this function, its going to hardfault.
its look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	test=sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION );
	
	test=softdevice_handler_sd_disable();
	
	ppi_init();
	rtc_config();
	timer1_init();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do i need call other function before sd disable?&lt;/p&gt;
&lt;p&gt;Regrads Michal,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable SD</title><link>https://devzone.nordicsemi.com/thread/39584?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 11:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:332183bb-2c64-41bb-90b2-3cc5d3b72a7c</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Yes, you can use blocked hardware after disabling the SoftDevice. Using blocked hardware while SoftDevice is enabled will lead to hardfault.&lt;/p&gt;
&lt;p&gt;You are sure you are not calling any SoftDevice functions? A common mistake is to call &lt;code&gt;power_manage()&lt;/code&gt;, which will call &lt;code&gt;sd_app_evt_wait()&lt;/code&gt;. This have to be changed to this if the SoftDevice is disabled:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;__SEV();
__WFE();
__WFE();
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>