<?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>S32K中的主题 Init task is stuck on xQueueSemaphoreTake()</title>
    <link>https://community.nxp.com/t5/S32K/Init-task-is-stuck-on-xQueueSemaphoreTake/m-p/991481#M5830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;I am using FreeRTOS to run some tasks in my software on S32K144 board . Currently my init task is getting stuck on xQueueSemaphoreTake() function in Queue.c&lt;BR /&gt;When I start my program the program runs for a while and then resets and starts with init again. When I see the call stack it shows its stuck on the function i mentioned above. The xQueueSemaphore is invoked while trying to do a blocking receive data from UART peripheral.&lt;BR /&gt;In the xQueueSemaphoreTake() function its stuck on portYIELD_WITHIN_API();&lt;/P&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;I have checked several posts with similiar behavior. I followed their solutions such as stack overflow, or priority setting. I have them all in order.&lt;BR /&gt;The configMAX_SYSCALL_INTERRUPT_PRIORITY(5) is number is lower than my UART interrupt(6). I do not have stack issues.&lt;/P&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;Also when the init task is stuck on the xQueueSemaphore take, the IDLE task is parallely into vApplicationIdleHook() (which i expect is expected behaviour) and then into xPortGetFreeHeapSize() which returns free bytes remaining.&lt;BR /&gt;I am new to FreeRTOS and I have exhausted all the solutions online. Can anyone help me?! what could be other possible reasons for this behavior?&lt;BR /&gt;Below is the picture of my call stack.&lt;BR /&gt;Kindly let me know, if any other details are required.&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9612iD47B4FC7A16F7B08/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2020 13:16:32 GMT</pubDate>
    <dc:creator>c_joshi</dc:creator>
    <dc:date>2020-03-05T13:16:32Z</dc:date>
    <item>
      <title>Init task is stuck on xQueueSemaphoreTake()</title>
      <link>https://community.nxp.com/t5/S32K/Init-task-is-stuck-on-xQueueSemaphoreTake/m-p/991481#M5830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;I am using FreeRTOS to run some tasks in my software on S32K144 board . Currently my init task is getting stuck on xQueueSemaphoreTake() function in Queue.c&lt;BR /&gt;When I start my program the program runs for a while and then resets and starts with init again. When I see the call stack it shows its stuck on the function i mentioned above. The xQueueSemaphore is invoked while trying to do a blocking receive data from UART peripheral.&lt;BR /&gt;In the xQueueSemaphoreTake() function its stuck on portYIELD_WITHIN_API();&lt;/P&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;I have checked several posts with similiar behavior. I followed their solutions such as stack overflow, or priority setting. I have them all in order.&lt;BR /&gt;The configMAX_SYSCALL_INTERRUPT_PRIORITY(5) is number is lower than my UART interrupt(6). I do not have stack issues.&lt;/P&gt;&lt;P style="color: #222222; background-color: rgba(255, 255, 255, 0.95); font-size: 16px;"&gt;Also when the init task is stuck on the xQueueSemaphore take, the IDLE task is parallely into vApplicationIdleHook() (which i expect is expected behaviour) and then into xPortGetFreeHeapSize() which returns free bytes remaining.&lt;BR /&gt;I am new to FreeRTOS and I have exhausted all the solutions online. Can anyone help me?! what could be other possible reasons for this behavior?&lt;BR /&gt;Below is the picture of my call stack.&lt;BR /&gt;Kindly let me know, if any other details are required.&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9612iD47B4FC7A16F7B08/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 13:16:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Init-task-is-stuck-on-xQueueSemaphoreTake/m-p/991481#M5830</guid>
      <dc:creator>c_joshi</dc:creator>
      <dc:date>2020-03-05T13:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Init task is stuck on xQueueSemaphoreTake()</title>
      <link>https://community.nxp.com/t5/S32K/Init-task-is-stuck-on-xQueueSemaphoreTake/m-p/991482#M5831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/c.joshi@spike.global"&gt;c.joshi@spike.global&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I have figured about what was wrong about this error, this happens due to the lack of heap and stack of the&amp;nbsp;task, so to avoid this increment the&amp;nbsp;configMINIMAL_STACK_SIZE and the Total heap size&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/104012i59173E5874224DEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Let me know if this helps you.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Best Regards,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:51:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Init-task-is-stuck-on-xQueueSemaphoreTake/m-p/991482#M5831</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2020-03-31T20:51:13Z</dc:date>
    </item>
  </channel>
</rss>

