<?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 - Events, timer and tasks stop coming after a few minute</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58270/freertos---events-timer-and-tasks-stop-coming-after-a-few-minute</link><description>Environment - nrf52832 - SDK 15.3 
 - SD 6.1.1 - with FreeRTOS 
 - Project: ble_app_buttonless_dfu 
 
 I have project with 4 timers and 3 tasks. Everything works fine when I start program. But after a few minute, timer and tasks stop coming, BLE is off</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Feb 2020 09:27:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58270/freertos---events-timer-and-tasks-stop-coming-after-a-few-minute" /><item><title>RE: FreeRTOS - Events, timer and tasks stop coming after a few minute</title><link>https://devzone.nordicsemi.com/thread/236740?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 09:27:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e32590c-6dbc-4542-a3c1-da2a96c1837f</guid><dc:creator>BangNguyen</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to add semaphore. It looks good now. Will share with you late.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS - Events, timer and tasks stop coming after a few minute</title><link>https://devzone.nordicsemi.com/thread/236689?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 07:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a6fb7a0-bb99-4764-8036-07fbe63ccb25</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;BangNquyen,&lt;/p&gt;
[quote user="BangNguyen"]The issue happens after 5 mins. If I remove task &amp;quot;PedoSample&amp;quot;, the issue will happen after a few hour.[/quote]
&lt;p&gt;it seems very likely that there is an issue with the priorities of your tasks and how/when they&amp;nbsp;communicate. It is still very hard for anyone to narrow down the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you revisit your Tasks architecture and how they communicate and see if there is a need of any critical sections for the inter task communication variables you use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS - Events, timer and tasks stop coming after a few minute</title><link>https://devzone.nordicsemi.com/thread/236492?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 10:55:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:420187fe-7958-4f41-a81d-afc39ea8523a</guid><dc:creator>BangNguyen</dc:creator><description>&lt;p&gt;I have 2 queues and 3 tasks as below.&lt;/p&gt;
&lt;p&gt;nus_queue = xQueueCreate(3, sizeof(nus_command_t));// 149 bytes *3&lt;br /&gt; pedo_queue = xQueueCreate(32, sizeof(accelVector_t));//4 bytes x, 4 bytes y, 4 bytes z , 4 bytes amplytude* 32 sample&lt;br /&gt; UNUSED_VARIABLE(xTaskCreate(bleCommandTask, &amp;quot;CMD&amp;quot;, 256, NULL, 3, NULL));&lt;br /&gt; UNUSED_VARIABLE(xTaskCreate(blePedoSampleTask, &amp;quot;PedoSample&amp;quot;, 256, NULL, 4, NULL));&lt;br /&gt; UNUSED_VARIABLE(xTaskCreate(timeTask, &amp;quot;TimeTASK&amp;quot;, 256, NULL, 2, NULL));&lt;/p&gt;
&lt;p&gt;The issue happens after 5 mins. If I remove task &amp;quot;PedoSample&amp;quot;, the issue will happen after a few hour.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nus_queue = xQueueCreate(3, sizeof(nus_command_t));// 149 bytes *3&lt;/span&gt;&lt;br /&gt;&lt;span&gt;//pedo_queue = xQueueCreate(32, sizeof(accelVector_t));//4 bytes x, 4 bytes y, 4 bytes z , 4 bytes amplytude* 32 sample&lt;/span&gt;&lt;br /&gt;&lt;span&gt;UNUSED_VARIABLE(xTaskCreate(bleCommandTask, &amp;quot;CMD&amp;quot;, 256, NULL, 3, NULL));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;//UNUSED_VARIABLE(xTaskCreate(blePedoSampleTask, &amp;quot;PedoSample&amp;quot;, 256, NULL, 4, NULL));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;UNUSED_VARIABLE(xTaskCreate(timeTask, &amp;quot;TimeTASK&amp;quot;, 256, NULL, 2, NULL));&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS - Events, timer and tasks stop coming after a few minute</title><link>https://devzone.nordicsemi.com/thread/236436?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 08:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da846c6b-b875-46d2-a11d-28ef7e013afa</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]I have project with 4 timers and 3 tasks. Everything works fine when I start program. But after a few minute,&amp;nbsp;timer and tasks stop coming, BLE is off.[/quote]
&lt;p&gt;&amp;nbsp;Seems like a deadlock. Hard to tell what caused it with the information given.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I can click pause and continue debug on Segger, PC pointer will run around in tasks.c. After that I see this error &amp;quot;SOFTDEVICE: ASSERTION FAILED&amp;quot;.[/quote]
&lt;p&gt;&amp;nbsp;You cannot halt a program which has enabled the softdevice and continue the execution without softdevice asserting. If you search this forum for &amp;quot;debug softdevice&amp;quot; or &amp;quot;softdevice assert when debugging&amp;quot; you will get many related threads on this behavior. For example this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17/how-can-i-debug-a-softdevice-application"&gt;one&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>