<?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>Understand Zephyr Task states</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92074/understand-zephyr-task-states</link><description>Hi, 
 
 I am moving from FreeRTOS to Zephyr. So I jused some of your simple example for trying to understand basics. I edited it little bit. 
 I have some default task from example called main . In the main is while loop and in this loop is checked variable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Sep 2022 12:06:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92074/understand-zephyr-task-states" /><item><title>RE: Understand Zephyr Task states</title><link>https://devzone.nordicsemi.com/thread/387287?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 12:06:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d0d9877-a453-4f75-a963-f2d3f31e385a</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="witc"]understand, problem is that this main loop works only when I add k_sleep or LOG(..) at the end, when I comment it, so nothing in the main loop is working - only once.&amp;nbsp;[/quote]
&lt;p&gt;Have you attempted to debug? If you step in the code, what do you see?&lt;/p&gt;
[quote user="witc"]BTW is there any fast way how to disable all logging in my project?&amp;nbsp;&lt;span&gt;&lt;span&gt;LOG_DBG,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;LOG_ERR,&amp;nbsp; LOG_INF?[/quote]
&lt;p&gt;You can disable logging using this in your prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=n
CONFIG_SERIAL=n&lt;/pre&gt;&lt;/p&gt;
[quote user="witc"]When I edit&amp;nbsp;&lt;span&gt;CONFIG_ESB&lt;/span&gt;&lt;span&gt;&lt;span&gt;=y to&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;CONFIG_ESB&lt;/span&gt;&lt;span&gt;=n in prj.conf, so erros during building appears.&lt;/span&gt;[/quote]
&lt;p&gt;That should normally not be a problem, but if your application use some ESB functionality, it would be different and you will get expected build errors (I have only seen your main loop so I do not know what else is there).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understand Zephyr Task states</title><link>https://devzone.nordicsemi.com/thread/387244?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 09:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db309829-9029-48c3-ae00-e0db3c295593</guid><dc:creator>witc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;understand, problem is that this main loop works only when I add k_sleep or LOG(..) at the end, when I comment it, so nothing in the main loop is working - only once.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am just a novice in Nordic world, need more time to get oriented. BTW is there any fast way how to disable all logging in my project?&amp;nbsp;&lt;span&gt;&lt;span&gt;LOG_DBG,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;LOG_ERR,&amp;nbsp; LOG_INF?&lt;/p&gt;
&lt;p&gt;When I edit&amp;nbsp;&lt;span&gt;CONFIG_ESB&lt;/span&gt;&lt;span&gt;&lt;span&gt;=y to&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;CONFIG_ESB&lt;/span&gt;&lt;span&gt;=n in prj.conf, so erros during building appears.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understand Zephyr Task states</title><link>https://devzone.nordicsemi.com/thread/386856?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 12:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a26e8d40-6206-4c8a-87bb-bbf6c6770eb9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The snippet you have here is just an eternal loop that calls some functions, and skips parts of it depending on the value of the two variables startTx and ready. There is no task related functionality here (except for the commented out call to k_sleep()), so this task and this main loop will run at all times. Could it be that you just don&amp;#39;t set ready to true somewhere?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>