<?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 check Thread states in Zephry</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68008/how-to-check-thread-states-in-zephry</link><description>Hi 
 I have created 4 threads in nRF9160 application, I have to go to sleep if none of the thread is running. 
 For this how do I check whether the created threads are running or waiting for an event. 
 If any documentation or any sample code please point</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Nov 2020 13:05:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68008/how-to-check-thread-states-in-zephry" /><item><title>RE: How to check Thread states in Zephry</title><link>https://devzone.nordicsemi.com/thread/279003?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 13:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4cbec9b-2dc8-4608-8a93-bc4a9e985df4</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;when no other threads are running on the nRF9160, the Zephyr kernel starts the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/kernel/threads/system_threads.html"&gt;idle thread&lt;/a&gt; which will trigger the sleep state by default. You might need to have the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_SYS_POWER_MANAGEMENT.html#cmdoption-arg-CONFIG_SYS_POWER_MANAGEMENT"&gt;CONFIG_SYS_POWER_MANAGEMENT&lt;/a&gt; option enabled, but it should be enabled by default as far as I know. I don&amp;#39;t think it&amp;#39;s necessary to manually check if there are any threads running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>