<?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>FreeRTOS sleep optimization from main task</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55181/freertos-sleep-optimization-from-main-task</link><description>Hello - 
 
 We are using the nRF52840-DK with the 15.3.0 SDK on FreeRTOS. Our application is configured for tickless idle and based on the ble_app_hrs_freertos example. I have confirmed that sd_app_event_wait() is being called from the vPortSuppressTicksAndSleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Dec 2019 08:59:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55181/freertos-sleep-optimization-from-main-task" /><item><title>RE: FreeRTOS sleep optimization from main task</title><link>https://devzone.nordicsemi.com/thread/224088?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 08:59:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94fbaa68-c3fa-4e79-baf5-308cc6916624</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="bfriedk1"]If we enable the SoftDevice when our application launches, can we still set the bit in the SCB to enable System ON sleep and achieve the same sleep management result after the SoftDevice is enabled?[/quote]
&lt;p&gt;&amp;nbsp;Yes, you can enable it even with the softdevice enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS sleep optimization from main task</title><link>https://devzone.nordicsemi.com/thread/224048?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:44:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4c8971-7858-4025-87cc-af51ab091951</guid><dc:creator>bfriedk1</dc:creator><description>&lt;p&gt;Susheel -&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Great! Thank you for the additional details.&amp;nbsp;One more small follow-up question... If we enable the SoftDevice when our application launches, can we still set the bit in the SCB to enable System ON sleep and achieve the same sleep management result after the SoftDevice is enabled?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS sleep optimization from main task</title><link>https://devzone.nordicsemi.com/thread/223773?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 07:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36f7b80c-9db7-4f13-b28b-53a70684fe10</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Brian,&lt;/p&gt;
&lt;p&gt;Your understanding is correct. There should not be any other sleep management in the tickless idle apart from the one in&amp;nbsp;&lt;span&gt;vPortSuppressTicksAndSleep. The call to&amp;nbsp;xQueueReceive will block the calling task if there are no messages in the queue and hence will call the scheduler. Which means that this task is yielding correctly in this scenario and if there are no other tasks to run apart from the idle task, then&amp;nbsp;vPortSuppressTicksAndSleep will be called and the system will go to sleep mode. You do not need to worry about the softdevice wakeup routines as sd_app_evt_wait call will only wake the application if it is application specific event.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>