<?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>nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70067/nrf5_sdk_17-0-2-when-freertos-is-used-how-to-sleep-for-a-specific-time-say-30-minutes-in-system-on-low-powermode</link><description>There are more than one task, after completing the periodic work,the 52832 module should enter system on low power mode,sleep 30 minutes,then wake up and continue with the periodic work. 
 Any suggestions would be appreciated. Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Jan 2021 08:15:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70067/nrf5_sdk_17-0-2-when-freertos-is-used-how-to-sleep-for-a-specific-time-say-30-minutes-in-system-on-low-powermode" /><item><title>RE: nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/thread/287410?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2021 08:15:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e42f5922-028b-4672-8881-4d7d41f74139</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes, your understanding is correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/thread/287388?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2021 06:02:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bd8dfa7-9564-4fca-b728-5b3057fa19e0</guid><dc:creator>ble_fantasy</dc:creator><description>&lt;p&gt;Thank you.This answer is very helpful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With Tickless idle enabled&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Task called vTaskDelay(30 * 60 * 1024)&amp;nbsp; or suspend and then resume by a 30 minutes timer callback&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The effect of these two ways is the same, right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Without tickless enabled&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I will try&amp;nbsp;sleep function (__SEV,__WFE,__WFE)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/thread/287221?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 12:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60935710-d348-41d2-a5f6-5e894ccbf7e9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you have enabled the tickless idle functionality, then you have asked the RTOS to decide when to sleep. If you want to control the sleep cycle of your device, then you should NOT enable the tickless idle in your FreeRTOSConfig.h file.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;With Tickless Idle enabled&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a timer for 30 minutes (register a callback) inside a task (Lets say Task A) and start the timer.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freertos.org/a00130.html"&gt;Suspend &lt;/a&gt;your task just after starting the timer. If there are no other tasks that are active, then the idle task will be called and will make the chip go to sleep due to the tickless feature.&lt;/li&gt;
&lt;li&gt;After 30 minutes the RTOS will wake the chip up and call your callback registered in the timer, just &lt;a href="https://www.freertos.org/a00131.html"&gt;resume &lt;/a&gt;the task&amp;nbsp;that you suspended before sleep.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Without tickless enabled&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You need your application to control its own sleep cycle.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enable application idle hook and&amp;nbsp;call the sleep function (__SEV,__WFE,__WFE) inside the application idle hook handler.&lt;/li&gt;
&lt;li&gt;just call vTaskDelay(30 * 60 * 1024). This will block the task for 30 mintues and if no other tasks are running, your idle hook handler will make the chip go to sleep. If any interrupt woke the chip before 30 minutes expired, then the idle hook handle will be called again to make the chip go to sleep. After the minutes, the delay will expire and your task is unblocked so idle hook handler will not be called until every task is blocked&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/thread/287143?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 08:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1c93148-aa2f-46e6-b191-71aef59f6f1d</guid><dc:creator>ble_fantasy</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I tried WFE and app_timer,when freertos is used,&lt;/p&gt;
&lt;p&gt;WFE is unable to put the module into sleep mode due to the existence of freertos tick.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5_SDK_17.0.2 When FreeRTOS is used, how to sleep for a specific time, say 30 minutes, in system on low powermode</title><link>https://devzone.nordicsemi.com/thread/287135?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 08:34:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d05c485c-c85c-4b3a-89bc-55111454a3d0</guid><dc:creator>Hamza_HK</dc:creator><description>&lt;p&gt;Hi, what comes to my mind is the following:&amp;nbsp;&lt;br /&gt;Create a timer that will trigger an event (callback) after 30 minutes. When there is no tasks available and the RTOS can go in idle, set WFE() (wait for event). You will leave sleep mode when your timer runout (30 minutes).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Maybe someone can confirm this?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Hopefully this helps!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>