<?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>application code flow(threads)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35162/application-code-flow-threads</link><description>int main(void) { initialize(); execution_start(start); 
 for (;;) { (void)sd_app_evt_wait(); } } 
 can you explain me the execution of code flow in the main with these APIs? 
 Thanks,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Jun 2018 09:18:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35162/application-code-flow-threads" /><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135523?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 09:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daa3316c-c008-4533-a500-583e570e1197</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Is the file located ìn the given path? If it is located in another path, you need to remove the file from the project and add it again from the correct path.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135403?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 16:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82a32364-574e-434b-9172-6a5faadbc6c7</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528474005036v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Also, when i am trying open any file from nRF5 SDK folder, i get this error&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135402?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 16:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2efde9e5-483d-4f45-95ce-c441b3ce4b39</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528473739638v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I have removed it. still the same error while building&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135388?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 14:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7a82054-59f4-4d66-9f35-e1b4810c53b9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You can place it wherever you want as long as you add the correct paths to your&amp;nbsp;project include directories.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135361?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 12:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8e440a8-44f6-4d4d-914a-a77eec90e45a</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Okay, that might be the case then. i have the SDK 15 directory inside the same folder as of Mesh , shown in picture below:&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528460642039v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is this not a correct place for the folder?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135296?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 07:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e87a46c0-6261-409e-9349-bb05b40865ab</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Unfortunately, we do not get notified by new replies if you have marked the case as &amp;quot;Verified Answer&amp;quot;, please create a new case when you have more issues.&lt;/p&gt;
&lt;p&gt;Your include paths are not correct, It looks like you have copied this from a GCC makefile. You should remove &amp;#39;$(SDK_ROOT:&amp;#39; part of the path. Did you place SDK 15 directory inside root of Mesh SDK folder?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135234?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 15:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:833da98b-48ab-4515-bdd7-e5a45fe15ffb</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;okay, i should do a further research on this. Also, yesterday Bjorn, left me unattended. I was having trouble in building the example project using my SES environment. i am getting the following error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528386973312v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I have mentioned the path to my board files.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528387159953v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Ca you help me with this? Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135227?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 15:26:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd331e78-173c-4bf8-a0a4-5b3a6087f475</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I see, yes in mesh the nodes will work as relays. The timer library should work with with Mesh SDK, but it is not included. Please have a look at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v2.0.1/md_doc_getting_started_how_to_nordicSDK.html?cp=4_1_0_3_6"&gt;getting started guide&lt;/a&gt; for details on integration with nRF5x SDK 15.0.0. I did link you to the documentation for SDK 15.0.0 application timer library. Please make sure you follow the section &amp;quot;Migration note&amp;quot;, otherwise the library should work as described in the tutorial.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135224?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 15:12:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37a7958f-7b2c-4ae9-b713-4788ccc0dc9a</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;I forgot to mention,&amp;nbsp; i am using ble mesh for my project. And am using nrf5 SDK v 2.0.1. According to my research, the server example in light switch demo does work as a relay. So, would i just flash the as it is example code to my nrf52832 kit and put them in between to relay my data?? And the application timer library tutorial wont work with this new SDK version? Can you provide me with updated tutorials or any documentation? Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135218?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 14:45:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b4ea5ff-6a27-425d-b912-7e38b2849980</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, using a timer sounds like the best approach. I&amp;#39;m assuming your are talking about sending the data wirelessly? With BLE or some proprietary protocol?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For such long delays, I would recommend that you use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_timer.html?cp=4_0_0_3_48"&gt;application timer library&lt;/a&gt; for creating timers. This use the RTC peripheral, which is lower power than TIMER peripherals. There is a &lt;a href="https://devzone.nordicsemi.com/tutorials/b/software-development-kit/posts/application-timer-tutorial"&gt;tutorial&lt;/a&gt; available, but note that this is written for an old SDK version.&lt;/p&gt;
&lt;p&gt;For relaying data using BLE, &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ble_sdk_app_rscs_relay.html?cp=4_0_0_4_1_1_2"&gt;this example&lt;/a&gt; could be usefull. You can also use proprietary protocols like &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ant_examples_ant_scan_and_forward.html?cp=4_0_0_4_0_13"&gt;ANT&lt;/a&gt;, or higher level protocols like &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk/keydef/PLUGINS_ROOT/com.nordic.infocenter.meshsdk.v2.0.1/index.html?cp=4_1_0"&gt;Bluetooth Mesh&lt;/a&gt;. It is hard to say what is the best solution for your application, this is something you need to figure out yourself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135215?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 14:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea6b6db4-6b41-4fb4-b44d-92fcc84dc2f5</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;I am using a simple DHT11 temp and humidity sensor data and want the node to send this data after every 30 seconds to a far placed node which could then send the data to my mobile application. So, the best way would be to setup a timer that generates an interrupt after every 30 seconds and then place a few relay nodes in between my sensor node and the final destination node. is that correct? If this sounds right to you, can you please refer me to some good links to follow, in order to generate timer based interrupts and also how to relay the data through the in between placed nodes? Thank you&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135211?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 14:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a719e2a5-f918-4b47-93f7-72d7648de781</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, that is correct.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure I understand your question. What sensor data are you sending, and how/where are you sending it? If you want to send data at a fixed interval, you need to setup a timer that sample the sensor and send the data. The timer will generate interrupts. If you don&amp;#39;t want to use interrupts, you need to constancly pull the sensor data, and stall the CPU to generate delays. This is bad practise, and is not something I would recommend. If you want something to happen on a button press, you either need interrupts or you need to constantly check the state of the button/GPIO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135207?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 14:13:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22cccb11-35da-45bb-8562-3dcee8fca5e4</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Thank you jorgen, so in the light switch example, is pressing a button on the kit producing an interrupt that wakes up my processor? If that is correct, then what do i do to continuously send the sensor data at a fixed interval and do not trigger it with any interrupt, like pressing a button.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: application code flow(threads)</title><link>https://devzone.nordicsemi.com/thread/135119?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 10:58:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a4bc04-7fb1-470b-937a-3f9c874af3e2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Your code will do some initialization, then start execution of something, then enters a endless loop.&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga11d88d38ac99fb72cde74c9385d36433"&gt;sd_app_evt_wait&lt;/a&gt; will put the device into &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_1_0_17_2#unique_1349410009"&gt;system on sleep mode&lt;/a&gt;. If you have initialized and started something that generates interrupts, your code will wake and handle events whenever they occur.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>