<?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>How to create something akin to a thread in nRF SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72944/how-to-create-something-akin-to-a-thread-in-nrf-sdk</link><description>I&amp;#39;m running OpenThread on a nrf52840-mdk from maker diary. I&amp;#39;m using the nRF SDK for thread and zigbee. 
 I would like to poll a sensor periodically. OpenThread does not offer this kind of service. Is there anything i can use in the SDK to accomplish</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Mar 2021 16:59:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72944/how-to-create-something-akin-to-a-thread-in-nrf-sdk" /><item><title>RE: How to create something akin to a thread in nRF SDK</title><link>https://devzone.nordicsemi.com/thread/300765?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 16:59:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f615825b-e1b3-46da-a2b9-aab846a0b24e</guid><dc:creator>purvisb</dc:creator><description>&lt;p&gt;Never mind, I didn&amp;#39;t follow the doc all the way to configure sdk_config.h.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create something akin to a thread in nRF SDK</title><link>https://devzone.nordicsemi.com/thread/300763?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 16:47:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6adfb0b4-0af4-4030-84d8-29ded801e779</guid><dc:creator>purvisb</dc:creator><description>&lt;p&gt;When I implement&amp;nbsp;the code from that tutorial in my application - OpenThread doesn&amp;#39;t start at all. The timer does seem to start for a few seconds, then stops. Here&amp;#39;s my main function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(int argc, char *argv[])
{
    nrf_gpio_init();
    nrf_gpiote_init();
    nrf_bsp_init();
    leds_init();
    lfclk_request();
    app_timer_init();
    create_timers();
    thread_instance_init();
    otIp6SetEnabled(thread_ot_instance_get(), true);
    thread_customCommands_init();
    thread_CoAP_init();
    thread_joiner_init();
    //starting thread happens in joiner_evt_handler function
    start_timers();

    while (true)
    {
        while (!thread_soft_reset_was_requested())
        {
            thread_process();
        }
        thread_instance_finalize();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I comment out start_timers() and create_timers(), the device seems to reboot every second. I think it restarts after thread is started in the joiner handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create something akin to a thread in nRF SDK</title><link>https://devzone.nordicsemi.com/thread/300690?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 13:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15ae0143-c5c3-4fb9-9ccf-3c06926758e2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you need threads for this? It sounds like you can achieve this easily by using a timer that generates a regular interrupt where you can read the sensor.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;Application Timer tutorial&lt;/a&gt;.&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>