<?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 Tick time modification</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49526/freertos-tick-time-modification</link><description>I need to minimize current consumption when using FreeRTOS. I have merged freertos with the ble_app_uart example using SDK 15.3.0. I am getting the average current as 9.162 uA when FreeRTOS is configured with NRF_LOG_ENABLED set to 0. The FreeRTOS ticks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 May 2020 02:46:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49526/freertos-tick-time-modification" /><item><title>RE: FreeRTOS Tick time modification</title><link>https://devzone.nordicsemi.com/thread/251809?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 02:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ac8b056-030e-460f-9098-f9b58d700fd8</guid><dc:creator>Август</dc:creator><description>&lt;p&gt;Thanks for your sharing.&lt;/p&gt;
&lt;p&gt;I am still confused by a question.&lt;/p&gt;
&lt;p&gt;When you open the log log task will be created and&amp;nbsp;vApplicationIdleHook() will run and it&amp;#39;s electric currents is 6ma.&lt;/p&gt;
&lt;p&gt;Here is the setting&lt;/p&gt;
&lt;p&gt;#define configUSE_IDLE_HOOK 1&lt;br /&gt;#define NRF_LOG_ENABLED 1&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#if 1 // With FreeRTOS sd_app_evt_wait increases power consumption with FreeRTOS compared to _WFE (NRFFOSDK-11174)&lt;br /&gt;#ifdef SOFTDEVICE_PRESENT&lt;br /&gt; if (nrf_sdh_is_enabled())&lt;br /&gt; {&lt;br /&gt; uint32_t err_code = sd_app_evt_wait();&lt;br /&gt; APP_ERROR_CHECK(err_code); &lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt;#endif&lt;br /&gt;#endif // (NRFFOSDK-11174)&lt;br /&gt; {&lt;br /&gt; /* No SD - we would just block interrupts globally.&lt;br /&gt; * BASEPRI cannot be used for that because it would prevent WFE from wake up.&lt;br /&gt; */&lt;br /&gt; do{&lt;br /&gt; __WFE();&lt;br /&gt; } while (0 == (NVIC-&amp;gt;ISPR[0] | NVIC-&amp;gt;ISPR[1]));&lt;br /&gt; }&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;void main(void)&lt;br /&gt;{&lt;br /&gt; log_init();&lt;br /&gt; clock_init();&lt;br /&gt;#if NRF_LOG_ENABLED&lt;br /&gt; // Start execution.&lt;br /&gt; if (pdPASS != xTaskCreate(logger_thread, &amp;quot;LOGGER&amp;quot;, 256, NULL, 1, &amp;amp;m_logger_thread))&lt;br /&gt; {&lt;br /&gt; APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);&lt;br /&gt; }&lt;br /&gt;#endif &lt;br /&gt; // Activate deep sleep mode.&lt;br /&gt; SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;&lt;br /&gt; ble_stack_init();&lt;br /&gt; gap_params_init();&lt;br /&gt; gatt_init();&lt;br /&gt; advertising_init();&lt;br /&gt; services_init(); &lt;br /&gt; conn_params_init(); &lt;br /&gt; nrf_sdh_freertos_init(NULL, NULL);&lt;br /&gt;// advertising_start();&lt;br /&gt; LogD(&amp;quot;ble_init_ok\r\n&amp;quot;); &lt;br /&gt; // Start FreeRTOS scheduler.&lt;br /&gt; vTaskStartScheduler(); &lt;br /&gt; for (;;)&lt;br /&gt; {&lt;br /&gt; APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS Tick time modification</title><link>https://devzone.nordicsemi.com/thread/199278?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 12:29:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c889ec-e105-490c-88f7-196259326833</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Hi @sara,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was banging my head for several weeks on a similar&amp;nbsp;phenomena (in SDK 14.2)&lt;/p&gt;
&lt;p&gt;Apparently, there is a shortcoming in freeRTOS power optimization.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39918/going-low-power-in-freertos-app"&gt;this post&lt;/a&gt; for details and workaround.&lt;/p&gt;
&lt;p&gt;I Hope this helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Good luck.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS Tick time modification</title><link>https://devzone.nordicsemi.com/thread/197506?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 07:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9568079f-a431-449d-aa5c-e04a25cb6560</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;yes, Jared I have done the steps that are mentioned in the guide. I got the desired low current consumption when freeRTOS was not merged. But after adding freeRTOS I am not able to get the low current.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS Tick time modification</title><link>https://devzone.nordicsemi.com/thread/197503?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 07:08:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c82d4f77-519e-40ad-8c2d-bcf0310316ec</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Increasing the frequency of the FreeRTOS ticks will not minimize the current consumption. Have you done the steps mentioned in &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs"&gt;this guide&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>