<?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 enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39549/how-to-enable-and-disable-freertos-tickless-idle-anyway-to-wakeup-when-there-is-ble-activities-detected</link><description>How to enable and disable FreeRTOS tickless idle(RTC or Systick)? Anyway to wakeup from tickless idle mode when there is BLE activities detected? 
 Setup: 
 1. nRF5_SDK_15.2.0_9412b96 
 2. Window 10 
 3. PCA10056</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Nov 2018 08:08:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39549/how-to-enable-and-disable-freertos-tickless-idle-anyway-to-wakeup-when-there-is-ble-activities-detected" /><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/155678?ContentTypeID=1</link><pubDate>Fri, 02 Nov 2018 08:08:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cec5ede-4f7f-4e41-b0a6-d34236244388</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/155675?ContentTypeID=1</link><pubDate>Fri, 02 Nov 2018 08:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f55624f8-0082-4bea-a847-6a2b5ffcd75a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;before the system goes to sleep and as soon as your device wakes up you can call xTaskGetTickCount()&amp;nbsp;and you can do a diff and add the difference to the timestamp you are maintaining.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/155665?ContentTypeID=1</link><pubDate>Fri, 02 Nov 2018 06:15:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c6bd08d-429a-4ff7-80ce-452cca9a0512</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the BLE CTS profile, do you know what are the best method to obtain tick offset when wakeup from tickless idle mode? If my device doesn&amp;#39;t connect to BLE for long period of time, my time offset when wakeup from tickless idle mode and the logging data time stamp will have huge offset on it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please advice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/155637?ContentTypeID=1</link><pubDate>Thu, 01 Nov 2018 17:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d75c009-2efd-4acd-8d25-094d0dc84e1d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Please take a look at the example provided in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_cts_c.html&amp;amp;cp=4_0_0_4_1_2_7"&gt;SDK &lt;/a&gt;to get the current time from the peer device (if it implements the BLE CTS profile).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/155455?ContentTypeID=1</link><pubDate>Thu, 01 Nov 2018 01:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f7b22ff-0c1e-4f91-9fc8-05fa24a2d47e</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt; Thanks. I notice there is a similiar request (outdated) as per the link below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/610/sample-code-for-rtc-to-update-current-time-of-device/3168"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/610/sample-code-for-rtc-to-update-current-time-of-device/3168&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I want to keep track of the time using internal RTC and want to sync the time from a external device, such as a phone.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And the most important part is...is there any sample code available? Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/154797?ContentTypeID=1</link><pubDate>Mon, 29 Oct 2018 07:28:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b580ee7-2841-4867-aaea-2ff364665c28</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="inghowe83"]Is there any timer which is running during FreeRTOS Tickless IDLE period which I could use as reference for the world clock in my embedded application?[/quote]
&lt;p&gt;There is RTC1 running which is being used by FreeRTOS kernel to keep the RTOS tick count.&lt;/p&gt;
&lt;p&gt;I do not think you need to access this RTC1. You can get the ticks from the kernel by using &lt;a href="https://www.freertos.org/a00021.html#xTaskGetTickCount"&gt;xTaskGetTickCount&lt;/a&gt;..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Aryan"]which is running during FreeRTOS Tickless IDLE [/quote]
&lt;p&gt;During the IDLE period the system is in sleep mode, but the RTC1 is still running (will not wake the system up on every tick though). When the system wakes up from tickless idle sleep, then a correction is made to the internal RTOS tick based on how long the system slept in tickles idle and this calculation will be based on RTC1&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/154787?ContentTypeID=1</link><pubDate>Mon, 29 Oct 2018 02:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68cbf763-9521-4b64-a6de-51db9c31a331</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Sorry, my error. I was referring to RTC which is driven by external crytstal XTAL. Maybe I should rephasemy question. Is there any timer which is running during FreeRTOS Tickless IDLE period which I could use as reference for the world clock in my embedded application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/154449?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 10:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f74e5eb9-b9b2-48d8-bd6c-ca6cb1836408</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;the accuracy of the timers are as good as the accuracy of the RTC used underneath. so no other special mechanism is implemented in FreeRTOS port to address the RTC clock drifting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The softdevice on the other hand does LFCLK calibration if internal RC is used for RTC clock.&lt;/p&gt;
[quote user="inghowe83"]We plan to have a external RTC driven World Clock for logging purpose.[/quote]
&lt;p&gt;I am not sure why you would need an external RTC for maintaining clock. Your external RTC would also be almost the same as the RTC in our device as they will be driven by the same clocks. It is the clock that contributes to the drift and not the RTC itself.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/154375?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 06:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eb9cccd-8a3c-41e0-bb92-97e23d365f35</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Another question, during tickless idle mode. Have you guys seen any good example to overcome RTC clock drifting issue during Tickless IDLE on/off? We plan to have a external RTC driven World Clock for logging purpose.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable and disable FreeRTOS tickless idle? Anyway to wakeup when there is BLE activities detected?</title><link>https://devzone.nordicsemi.com/thread/153291?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 14:44:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be75c7d0-6313-4792-a8f1-a1d7317b666a</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]How to enable and disable FreeRTOS tickless idle(RTC or Systick)?[/quote]
&lt;p&gt;&amp;nbsp;&lt;span&gt;tickless idle functionality is enabled by defining configUSE_TICKLESS_IDLE as 1 in FreeRTOSConfig.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Anyway to wakeup from tickless idle mode when there is BLE activities detected?[/quote]
&lt;p&gt;This is done automatically for you, as tickless idle uses __WFE sleep, any activity will implicitly wake the chip and after processing is, the tickless mode will make the chip go to sleep again.&lt;/p&gt;
&lt;p&gt;You might like reading &lt;a href="https://www.freertos.org/low-power-tickless-rtos.html"&gt;this&lt;/a&gt; page.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>