<?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>Unclear on softdevice sleeping</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9633/unclear-on-softdevice-sleeping</link><description>I need to write an application that is mostly in sleep (not OFF) mode, waking once a second or so, and occasionally discovering that it has to do things. Without the softdevice, this is easy...I set up RTC1 to interrupt once a second an in the handler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 10 Oct 2015 00:33:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9633/unclear-on-softdevice-sleeping" /><item><title>RE: Unclear on softdevice sleeping</title><link>https://devzone.nordicsemi.com/thread/35604?ContentTypeID=1</link><pubDate>Sat, 10 Oct 2015 00:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:408110e8-15f5-4232-9642-1de6c93c74e0</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No, app_timer is decoupled from the softdevice, look at the code for it, there&amp;#39;s nothing there softdevice-related at all. And __wfe() most definitely works, it can&amp;#39;t not work. If there is an event or interrupt, __wfe() will return.&lt;/p&gt;
&lt;p&gt;Do you have a LFCLK source running? If you&amp;#39;ve enabled the softdevice and disabled it again, the LFCLK you picked should still be running, if however you&amp;#39;ve haven&amp;#39;t enabled it at all then there won&amp;#39;t be and the timer won&amp;#39;t do anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unclear on softdevice sleeping</title><link>https://devzone.nordicsemi.com/thread/35603?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2015 16:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ab62a9b-3041-4326-9c83-9f7209ef3d86</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m aware that it&amp;#39;s actually app_timer that&amp;#39;s using the IRQ, and I am using app_timer and app_scheduler. These seem to be not entirely decoupled from the softdevice; for example, initializing them and starting the timers, then going to sleep with __WFE() doesn&amp;#39;t work--the IRQ is never called. The only way to sleep while waiting for events is sd_app_evt_wait(), but this returns a &amp;quot;softdevice not enabled&amp;quot; error unless the SD is initialized. So, yes, I&amp;#39;ll have to either re-invent timer and scheduler from scratch, or else find a way to turn off most of the SD while keeping sd_app_evt_wait() active.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unclear on softdevice sleeping</title><link>https://devzone.nordicsemi.com/thread/35602?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2015 01:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d4c43fa-0b78-483d-b6d9-99ff1ebfa3db</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Your assumption that RTC1_IRQHandler is being used by the softdevice when you &amp;#39;link&amp;#39; with it, is incorrect. You don&amp;#39;t really link with the softdevice anyway, you just call into it. So if there&amp;#39;s an RTC1 handler it&amp;#39;s because you have an RTC1 handler in the application code you have built.&lt;/p&gt;
&lt;p&gt;Most likely that&amp;#39;s because you&amp;#39;ve included something which uses Nordic&amp;#39;s app_timer module which in turn uses RTC1. Most of Nordic&amp;#39;s sample code uses app_timer somewhere, the board support module uses it for button debouncing, the advertising module uses it to change advertising states, so if you have any of the boiler plate code you&amp;#39;ve built app_timer and it&amp;#39;s using RTC1.&lt;/p&gt;
&lt;p&gt;Which means all you have to do to get your timer is use an app_timer of your own. Since app_timer itself has nothing at all to do with the softdevice, you can turn the softdevice on and off as much as you like, the timers will continue to work, they are an independent module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>