<?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 lock timer problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81005/freertos-lock-timer-problem</link><description>Greetings , I have implemented an application with freertos (sdk 15.3) which goes into low power and wakes up on two irqs (rtc and button). When the button irq arrive turns on the system, performs operations and then return to a low power state. When</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Nov 2021 10:00:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81005/freertos-lock-timer-problem" /><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336815?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 10:00:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0de58899-30a3-44fb-b1e5-140990171f13</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Going back to your main description of the problem.&lt;/p&gt;
[quote user=""]When entering low power the task/int rtc are suspended , restored &lt;br /&gt;on wake up.[/quote]
&lt;p&gt;Which RTC int are your suspending? I hope that it is not the same as the one freertos is using? I am not able to replicate this error in my tests using button and different RTC as wakeup sources. vTaskDelay after wakeup behaves as it should and i have the test running for many hours.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There seems to be something in your code that creates this anomaly and I need your project to replicate and debug this on my end.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336788?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 08:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc5dd3a8-ce06-49f6-ac61-8a8589bd3a97</guid><dc:creator>andrea_s</dc:creator><description>&lt;p&gt;Hi , &lt;br /&gt;here are some answers .&lt;br /&gt;&lt;br /&gt;Something is not right here. Where is this vTaskDelay come into picture from? &lt;br /&gt;was there a delay executed in the task just before the sleep or was this vTaskDelay called after wakeup?&lt;br /&gt;What is the wakeup Disabling this feature fixes the issue does not sound architecturally correct. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Yes,the lock is present after the restart from low power&lt;br /&gt;&lt;br /&gt;How are you observing this problem? are you in the debug mode while this problem happens?&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I inserted some gpio (+ vTaskDelay) to see the passage in the function. &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;There is one task to manage low consumption in and out, and one to manage the event .&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The two tasks stop immediately ,after the exit from low consumption, in the delay functions.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;This test was done in release . &lt;br /&gt;&lt;br /&gt;In a subsequent test in debug mode I tried to find the function that could &lt;br /&gt;slow down the system and i went back to the xPortSysTickHandler and the &lt;br /&gt;configUSE_DISABLE_TICK_AUTO_CORRECTION_DEBUG .&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;Best regards&lt;br /&gt;Andy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336557?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 18:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eef0148-f15e-485b-940f-09791377a1cd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&lt;span&gt;configUSE_DISABLE_TICK_AUTO_CORRECTION_DEBUG&amp;nbsp; was designed for tickless sleep and is helpful to have the application have normal debugging experience in the debug mode. In tickless sleep the RTC IRQ is disabled but service the RTC irq is crucial for keeping the internal rtos timer tick updated. So after wakeup from sleep from tickless , the rtc tick handler checks if any ticks handling was missed and updates the internal rtos ticks as needed. In debug mode you do not want to have this feature because you can halt the cpu and you do not want to internal rtos ticks to be updated while the cpu is halted in the debug mode. This will cause all the timers to expire due to internal tick corrections. Hence this config gives you the ability to disable autocorrection and should only be useful when you are debugging the code using a debugger, stepping or halting the CPU.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]when I wake up i find that the task&lt;br /&gt;remains frozen / paused (in vTaskDelay / xEventGroupWaitBits ) for a time&lt;br /&gt;proportional to the time it remained in low consumption .[/quote]
&lt;p&gt;Something is not right here. Where is this vTaskDelay come into picture from? was there a delay executed in the task just before the sleep or was this&amp;nbsp;&lt;span&gt;vTaskDelay&amp;nbsp;called after wakeup? What is the wakeup Disabling this feature fixes the issue does not sound architecturally correct.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How are you observing this problem? are you in the debug mode while this problem happens?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336275?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 15:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d86cc1b-44ea-41fe-bac9-5920bc275e62</guid><dc:creator>andrea_s</dc:creator><description>&lt;p&gt;Hi , &lt;/p&gt;
&lt;p&gt;i have found something , if i set a define to 1 ( configUSE_DISABLE_TICK_AUTO_CORRECTION_DEBUG 1 ) &amp;nbsp;&amp;nbsp; &lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;the problem does not arise.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Have any idea what it might mean ?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Best regards&lt;br /&gt;Andy&lt;/span&gt;&lt;/span&gt;&lt;/span&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 lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336119?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 08:12:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37f352fd-975f-45f3-9f12-c7b0ab593e96</guid><dc:creator>andrea_s</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;in the zip files with some notes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://sendgb.com/FBVOHl1io9j"&gt;https://sendgb.com/FBVOHl1io9j&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance ,&lt;br /&gt;Best regards&lt;br /&gt;Andy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/336055?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 18:20:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ef9bdb-2820-4820-ab75-40b9429b61ab</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you can try sending me the freertos config files but I doubt that the issue can be reproduced just using those changes. But i can give it a try to reproduce the error from your config changes. Also give me your sdk_config.h file and main.c if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/335977?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 12:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9952f876-36bb-4fcf-9157-68af6f96f3a2</guid><dc:creator>andrea_s</dc:creator><description>&lt;p&gt;Hi ,&lt;br /&gt;the application runs on a custom hw (i don&amp;#39;t have a demo board), &lt;br /&gt;turning the complete project to you i think would be useless, &lt;br /&gt;but if you think it can be useful to identify the problem i can send &lt;br /&gt;you individual files (freertos config ...) . &lt;br /&gt;&lt;br /&gt;Best regards&lt;br /&gt;Andy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/335959?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 12:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa771ec5-6268-4144-b389-cc9fb1ecba87</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You do not normally need to change the priority of timer threads from the template examples we have in the SDK. Can you please attach your project so that i can quickly test this behavior. I haven&amp;#39;t seen it before&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/335952?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 11:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e80afdde-5173-4b9f-83b3-b06c7aad3fee</guid><dc:creator>andrea_s</dc:creator><description>&lt;p&gt;Hi , &lt;br /&gt;i am in sleep mode ( with nrf_pwr_mgmt_run ) , &lt;br /&gt;i haven&amp;#39;t changed the priorities of the timer threads ,but &amp;nbsp;&lt;br /&gt;in the config file&amp;nbsp; which parameters you suggest to modify&lt;br /&gt;in order to increase the priority of the timer thread ?&lt;br /&gt;which value you suggest ?&lt;br /&gt;&lt;br /&gt;Thanks in advance for your kind collaboration&lt;br /&gt;Best regards&lt;br /&gt;Andy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos lock timer problem</title><link>https://devzone.nordicsemi.com/thread/335911?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 10:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:129fd16d-40e7-41d5-8967-1328955f841f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;That is interesting. What low power mode is your device going into? It looks like the FreeRTOS internal timers are frozen during the lower power mode and does not get updated as soon as they wake up. Have you changed the priorities of the timer threads in the config file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>