<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Debuggign FreeRTOS in KDS in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768697#M9710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a problem with Free RTOS and the timer service queue gettign full.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm usign FreeRTOS with Kinetis Design Studio - I have task aware debugging (see below for screenshots).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've tried increasing the queue length but that doesn't stop the problem.&lt;/P&gt;&lt;P&gt;As I undertsand it the Timer Service queue is for timers waiting to be set, i.e. once a timer has been set it's removed from the queue (regardless of wether the timer has requried). So my thoughts are either:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a - The Timer Service Task is being blocked meanign it can't service the queue&lt;BR /&gt;Or&lt;BR /&gt;b - We're over-loading the timer task by sendign too many timers at once.&lt;/P&gt;&lt;P&gt;So I have two questions:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 - Are either of the above theories plausible?&lt;BR /&gt;2 - How can I debug the timer task/queue and work out what's causing my issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/fVu1fd/temp1.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/fVu1fd/temp1.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp1" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/dAAk6J/temp2.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/dAAk6J/temp2.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp2" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/eMEdRJ/temp3.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/eMEdRJ/temp3.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp3" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2018 12:58:19 GMT</pubDate>
    <dc:creator>beng_</dc:creator>
    <dc:date>2018-05-18T12:58:19Z</dc:date>
    <item>
      <title>Debuggign FreeRTOS in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768697#M9710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a problem with Free RTOS and the timer service queue gettign full.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm usign FreeRTOS with Kinetis Design Studio - I have task aware debugging (see below for screenshots).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've tried increasing the queue length but that doesn't stop the problem.&lt;/P&gt;&lt;P&gt;As I undertsand it the Timer Service queue is for timers waiting to be set, i.e. once a timer has been set it's removed from the queue (regardless of wether the timer has requried). So my thoughts are either:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a - The Timer Service Task is being blocked meanign it can't service the queue&lt;BR /&gt;Or&lt;BR /&gt;b - We're over-loading the timer task by sendign too many timers at once.&lt;/P&gt;&lt;P&gt;So I have two questions:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 - Are either of the above theories plausible?&lt;BR /&gt;2 - How can I debug the timer task/queue and work out what's causing my issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/fVu1fd/temp1.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/fVu1fd/temp1.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp1" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/dAAk6J/temp2.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/dAAk6J/temp2.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp2" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;img src="&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/image.ibb.co/eMEdRJ/temp3.jpg" rel="nofollow" target="_blank"&gt;https://image.ibb.co/eMEdRJ/temp3.jpg&lt;/A&gt;&lt;SPAN&gt;" alt="temp3" border="0"&amp;gt;&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 12:58:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768697#M9710</guid>
      <dc:creator>beng_</dc:creator>
      <dc:date>2018-05-18T12:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Debuggign FreeRTOS in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768698#M9711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ben,&lt;/P&gt;&lt;P&gt;Please check your timer callback function , whether it bock .&lt;/P&gt;&lt;P&gt;And please have a look at the below words from FreeRTOS sit:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;H3&gt;&lt;A name="important-information-on-writing-timer-callback-functions"&gt;&lt;/A&gt;Important information on writing timer callback functions&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial;"&gt;Timer callback functions execute in the context of the timer service task. It is therefore &lt;STRONG&gt;essential&lt;/STRONG&gt; that timer callback functions never attempt to block. For example, a timer callback function must not call vTaskDelay(), vTaskDelayUntil(), or specify a non zero block time when accessing a queue or a semaphore. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial;"&gt;Hope it helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 09:36:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768698#M9711</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-05-22T09:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Debuggign FreeRTOS in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768699#M9712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the queue is used to pass commands from other threads to the timer task. So that queue should be large enough to hold as many parallel commands you send to the queue. E.g. if you set up 10 timers before starting up the RTOS, you very likely need 10 queue elements to queue up the commands (e.g. with start timer).&lt;/P&gt;&lt;P&gt;Once the timers are running and if you don't call any timer API calls, the queue will be empty as the timers are handled in a private list inside the timer module.&lt;/P&gt;&lt;P&gt;In your screenshots your timer task has a priority assiged which looks fine. If your timer queue does not get handled even with a high timer priority, could it be that your timer callbacks are the problem? Make sure thay are not blocking. For testing purposes, have them 'empty' to find out if this is a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 09:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768699#M9712</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-05-22T09:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Debuggign FreeRTOS in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768700#M9713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;I have discussed the FreeRTOS timer queues here: &lt;A class="link-titled" href="https://mcuoneclipse.com/2018/05/27/tutorial-understanding-and-using-freertos-software-timers/" title="https://mcuoneclipse.com/2018/05/27/tutorial-understanding-and-using-freertos-software-timers/"&gt;Tutorial: Understanding and Using FreeRTOS Software Timers | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this helps as well?&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2018 18:04:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768700#M9713</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-05-27T18:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Debuggign FreeRTOS in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768701#M9714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the slow respsone (I've been away on holiday). The problem was caused by a timer call back that could block. I'd kept all my timer call backs intentially short/small, but didn't check them for the possibility to block.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 11:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debuggign-FreeRTOS-in-KDS/m-p/768701#M9714</guid>
      <dc:creator>beng_</dc:creator>
      <dc:date>2018-05-29T11:08:20Z</dc:date>
    </item>
  </channel>
</rss>

