<?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>Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103704/disabling-softdevice-stops-the-sampling-of-saadc</link><description>I am using nrf52811, sdk 16.00 and s112 
 When I disable softdevice in my code, there is no further Saadc sample taking, 
 I want to disable and enable softdevice for the purpose of power saving for long times based on certain threshold of attached sensors</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Sep 2023 06:09:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103704/disabling-softdevice-stops-the-sampling-of-saadc" /><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/446559?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 06:09:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af6a012c-ea13-4c46-bbc9-cc6f0b350757</guid><dc:creator>AIRAM</dc:creator><description>&lt;p&gt;&lt;strong&gt;Do you mean that you get the error when running debugging, without setting any breakpoints?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;yes,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the time being I just left it because in normal running it doesn&amp;#39;t create a problem and we will be running this normally without debugger&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/446438?ContentTypeID=1</link><pubDate>Mon, 18 Sep 2023 10:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b99411f7-b2d1-40b5-8bfa-f2f6d3419797</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;This code is part of the SoftDevice Handler library, where events are polled from the SoftDevice. There should not be any error codes generated by this.&lt;/p&gt;
&lt;p&gt;Do you have the logger module in your application? Can you see any error codes on UART/RTT logger?&lt;/p&gt;
[quote userid="124874" url="~/f/nordic-q-a/103704/disabling-softdevice-stops-the-sampling-of-saadc/446330"] i have not set any breakpoints in my code[/quote]
&lt;p&gt;Do you mean that you get the error when running debugging, without setting any breakpoints?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/446330?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 14:54:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a979b2f8-87c3-4c37-b22d-86aa294c7fad</guid><dc:creator>AIRAM</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1694789616808v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/joh2"&gt;Jørgen Holmefjord&lt;/a&gt;&amp;nbsp;in this part of code error is shown and i have not set any breakpoints in my code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/446260?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 12:01:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a743d858-c3b5-4e19-8c51-b49c5c9c97ca</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you check the output on the logger? This should indicate the location and error code of the failure (you might have to build the application in &amp;quot;Debug&amp;quot; configuration if you are not doing this already).&lt;/p&gt;
[quote user="Maryamaria"]And this behavior is seen while debugging only.[/quote]
&lt;p&gt;Do you set any breakpoints or similar in the application when debugging? Note that while the softdevice is enabled, it is not possible to resume execution from a breakpoint, as stopping at a breakpoint will halt the CPU and mess up the timing of the softdevice operations.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/445986?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2023 06:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb881f63-db2f-49c1-929c-dc63bd746181</guid><dc:creator>AIRAM</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/joh2"&gt;Jørgen Holmefjord&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your assistance so far; it has been helpful. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, I&amp;#39;m encountering an issue when attempting to reinitialize the soft device&amp;nbsp;only sometimes. Could you please review the relevant portion of my code to ensure that it adequately handles the soft device reinitialization process, restarting advertising, and enabling reconnection to the mobile application?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And this behavior is seen while debugging only.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1694686064258v1.png" /&gt;&lt;span id="pastedimage1694686080367v2" class="mceItem mceNonEditable mceInsertMediaItem mceInsertMediaItem mceInsertMediaItemImage" style="color:transparent;height:240px;width:320px;"&gt;...&lt;/span&gt;&lt;span id="pastedimage1694686094834v3" class="mceItem mceNonEditable mceInsertMediaItem mceInsertMediaItem mceInsertMediaItemImage" style="color:transparent;height:240px;width:320px;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ble_stack_init();
uint32_t err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
// Register a handler for BLE events.
NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
uint16_t len = sprintf(data, &amp;quot;0C11&amp;quot;);
ble_nus_data_send(&amp;amp;m_nus, data, &amp;amp;len, m_conn_handle);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/445916?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 17:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7a43ad3-c328-4038-8f11-ed4df6c8edb0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Simply make sure you call the following before ble_stack_init() in the start of your main():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t err_code = nrf_drv_clock_init();
APP_ERROR_CHECK(err_code);
nrf_drv_clock_lfclk_request(NULL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can find more details about how to integrate and configure the clock driver in your application in the &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;nRF5 SDK Application Timer Tutorial&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/445913?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 16:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a151ff9-0b0d-4896-b9d5-0783092eb5ca</guid><dc:creator>AIRAM</dc:creator><description>&lt;p&gt;Hi Jorgen,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Can you please let me an example with such functionality or any helping material through which i can implement this in my code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling Softdevice stops the sampling of saadc</title><link>https://devzone.nordicsemi.com/thread/445867?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 13:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc16e421-476c-40d7-9dda-ee0508d22114</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When the SoftDevice is enabled, the LFCLK will be turned on all the time. The LFCLK is also required for the RTC/app_timer used in your application to run. If you do not explicitly start the LFCLK in your application after disabling the SoftDevice, any RTC based timers will stop running.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This can be resolved by using the clock driver to request the LFCLK before enabling the SoftDevice the first time, using the nrf_drv_clock_lfclk_request() API. The clock driver should then make sure that the LFCLK keeps running if the SoftDevice is disabled.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>