<?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>Embedded Software and Tools Clinic中的主题 Re: Freertos on 5748G stuck in portTASK_FUNCTION</title>
    <link>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072001#M35</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;portTASK_FUNCTION() is a macro that wraps the functions that implement tasks (I think there is only one of the 40+ FreeRTOS ports that actually requires it, so it is likely implemented as an empty macro in your case), so you have accidentally not actually said which function you are 'stuck' in.&amp;nbsp; I'm going to guess you are taking about the &lt;A href="https://www.freertos.org/RTOS-idle-task.html"&gt;idle &lt;/A&gt;task&amp;nbsp;&lt;A class="link-titled" href="https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/tasks.c#L3392" title="https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/tasks.c#L3392"&gt;FreeRTOS-Kernel/tasks.c at master · FreeRTOS/FreeRTOS-Kernel · GitHub&lt;/A&gt;&amp;nbsp;(that is a link to the source file in Github, in this post it has added the title of the page).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are in the idle task, then&amp;nbsp;my question would be how do you determine you are stuck there?&amp;nbsp; It is likely your application will spend most of its time in the idle task, so it may appear you are stuck there as each time you pause the debugger you happen to be there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the RTOS tick interrupt actually executing?&amp;nbsp; You can determine that by inspecting the xTickCount variable in FreeRTOS/source/tasks.c, or just by putting a break point in the tick interrupt hander.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Apr 2020 17:31:49 GMT</pubDate>
    <dc:creator>FreeRTOS_org</dc:creator>
    <dc:date>2020-04-09T17:31:49Z</dc:date>
    <item>
      <title>Freertos on 5748G stuck in portTASK_FUNCTION</title>
      <link>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072000#M34</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community guys:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;My freertos on 5748G stuck in&amp;nbsp;portTASK_FUNCTION(), It can not switch tasks, I have already checked the pit configure, It seems configured correctly. Does anybody encounter the seem problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2020 03:49:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072000#M34</guid>
      <dc:creator>sunnnn</dc:creator>
      <dc:date>2020-04-08T03:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Freertos on 5748G stuck in portTASK_FUNCTION</title>
      <link>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072001#M35</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;portTASK_FUNCTION() is a macro that wraps the functions that implement tasks (I think there is only one of the 40+ FreeRTOS ports that actually requires it, so it is likely implemented as an empty macro in your case), so you have accidentally not actually said which function you are 'stuck' in.&amp;nbsp; I'm going to guess you are taking about the &lt;A href="https://www.freertos.org/RTOS-idle-task.html"&gt;idle &lt;/A&gt;task&amp;nbsp;&lt;A class="link-titled" href="https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/tasks.c#L3392" title="https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/tasks.c#L3392"&gt;FreeRTOS-Kernel/tasks.c at master · FreeRTOS/FreeRTOS-Kernel · GitHub&lt;/A&gt;&amp;nbsp;(that is a link to the source file in Github, in this post it has added the title of the page).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are in the idle task, then&amp;nbsp;my question would be how do you determine you are stuck there?&amp;nbsp; It is likely your application will spend most of its time in the idle task, so it may appear you are stuck there as each time you pause the debugger you happen to be there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the RTOS tick interrupt actually executing?&amp;nbsp; You can determine that by inspecting the xTickCount variable in FreeRTOS/source/tasks.c, or just by putting a break point in the tick interrupt hander.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2020 17:31:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072001#M35</guid>
      <dc:creator>FreeRTOS_org</dc:creator>
      <dc:date>2020-04-09T17:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Freertos on 5748G stuck in portTASK_FUNCTION</title>
      <link>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072002#M36</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Richard:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your response.&amp;nbsp;Here is my debug test:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. I create 2 tasks(idle task is not included), And put breakpoint in each of them(in task while(1){}&amp;nbsp; body), So when task running, i can know it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. I put a breakpoint in tick interrupt handler, And disable the ' freeze bit ' to make sure it ticks in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. This 2 task run just for once. After create idle task. Freertos seems like stop task switch. Just run in idle task.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2. The tick interrupt executing frequently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;So does anything else i have ignored? Or maybe exists any other possibilities?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 01:58:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Embedded-Software-and-Tools/Freertos-on-5748G-stuck-in-portTASK-FUNCTION/m-p/1072002#M36</guid>
      <dc:creator>sunnnn</dc:creator>
      <dc:date>2020-04-10T01:58:19Z</dc:date>
    </item>
  </channel>
</rss>

