<?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>Functions running outside the main loop?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27241/functions-running-outside-the-main-loop</link><description>Hi there, 
 quite a beginner here and tring to figure some stuff out about the nordic programming style. 
 when sniffing around the given examples in the newest SDK(SES IDE) I was suprised to see that the functions(For example in the &amp;quot;blinky_freertos</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Nov 2017 11:49:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27241/functions-running-outside-the-main-loop" /><item><title>RE: Functions running outside the main loop?</title><link>https://devzone.nordicsemi.com/thread/107524?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 11:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e8a39d7-d30b-44ff-9ce5-cba590511030</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;There is also the &amp;quot;pure&amp;quot; blinky example (without the rtos). That one doesn&amp;#39;t use timers etc. There is an eternal struggle between tech support, product management, and the SDK team regarding the level of complexity of the SDK examples. We get a constant stream of suggestions for the SDK from large and small customers, and we also want to provide drivers and examples for all new SoC features and specifications. Hence we have to prioritise. From a tech support view though, I tend to agree with you and would rather see many simple examples, than just a few complex ones showcasing everything at once.&lt;/p&gt;
&lt;p&gt;Regarding SES tutorials my only suggestion is to take a look at some of &lt;a href="https://devzone.nordicsemi.com/blogs/search/?query=segger+embedded+studio"&gt;these blog posts&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Functions running outside the main loop?</title><link>https://devzone.nordicsemi.com/thread/107523?ContentTypeID=1</link><pubDate>Sat, 11 Nov 2017 11:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:592b76e8-2e22-4f7a-b23a-b2969834dc9c</guid><dc:creator>MikeLemon</dc:creator><description>&lt;p&gt;Thansk the UNUSED_VARIABLE() function now makes sense but I don&amp;#39;t understand why would you make the examples use timers and interrupts for the beginners? It just makes it harder to understand and makes you dive way dipper into the code and hides things you want to understand and another exmpale is the SAADC there I couldn&amp;#39;t find where and how an ADC sample function it related to any timer or interrupt.&lt;/p&gt;
&lt;p&gt;If we are on it do you maybe have a source of tutorials for the basic use of SES IDE with the NRF52 that includes things like importing external libraries and libraries from the sdk?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Functions running outside the main loop?</title><link>https://devzone.nordicsemi.com/thread/107522?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2017 20:13:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8560a7d0-2f02-417c-8f6c-5c5e29f40ab9</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The freeRTOS (and our BLE) examples uses timers and interrupts to call functions on certain events. So even if there is nothing going on in the main() while loop the timers are running in the background and wakes up the system now and then. In the case of the blinky_freertos example, led_toggle_timer_callback() is fed to the freeRTOS &amp;quot;engine&amp;quot; in the function called xTimerCreate(). The freeRTOS then handles the calling of the function for you. Callbacks like this is used a lot in our SDKs.&lt;/p&gt;
&lt;p&gt;Regarding the UNUSED_VARIABLE() function, you can find an explanation here: &lt;a href="https://devzone.nordicsemi.com/question/89089/what-is-the-purpose-of-unused_variable-when-the-effect-is-the-same-without-it/"&gt;https://devzone.nordicsemi.com/question/89089/what-is-the-purpose-of-unused_variable-when-the-effect-is-the-same-without-it/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>