<?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 Re: FreeRTOS always show stack over usage in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675382#M27072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for fast reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I remove any variable and API, actually, the task is almost empty.&lt;/P&gt;&lt;P&gt;But it also happen the stack size usage is over. So I think the cause is not the task itself.&lt;/P&gt;&lt;P&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/26491i2592770F8542BFFB/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&gt;&lt;/P&gt;&lt;P&gt;I am not sure where to enabled stack overflow hook and FreeRTOS asserts.&lt;/P&gt;&lt;P&gt;I will confirm it soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2017 11:34:05 GMT</pubDate>
    <dc:creator>kensu</dc:creator>
    <dc:date>2017-07-19T11:34:05Z</dc:date>
    <item>
      <title>FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675380#M27070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am debugging with my application with FreeRTOS on LPC1830,&lt;/P&gt;&lt;P&gt;At first, I find my application have different running result with enable debug message out and disable.&lt;/P&gt;&lt;P&gt;When I enable my debug message, the result is correct.&lt;/P&gt;&lt;P&gt;In my experience, my application may has something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find one of my task always show the stack usage is too much,&lt;/P&gt;&lt;P&gt;I don't know why, no mater how I increase the stack size, and I remove all variable and function call in this task,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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/26363iB310EEA020E4A7B8/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&gt;&lt;/P&gt;&lt;P&gt;It still happens?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is any possible reason to cause this condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 10:53:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675380#M27070</guid>
      <dc:creator>kensu</dc:creator>
      <dc:date>2017-07-19T10:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675381#M27071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;can you share the code how you crate the MainControl task? Of interest is how much of stack you actually are requesting for the task.&lt;/P&gt;&lt;P&gt;Otherwise it could be that a dangling pointer changes/corrupts your TCB (Task Control Block), causing the task list to report a wrong stack size?&lt;/P&gt;&lt;P&gt;I assume you have enabled the stack overflow hook and the FreeRTOS asserts too?&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>Wed, 19 Jul 2017 11:08:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675381#M27071</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-07-19T11:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675382#M27072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for fast reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I remove any variable and API, actually, the task is almost empty.&lt;/P&gt;&lt;P&gt;But it also happen the stack size usage is over. So I think the cause is not the task itself.&lt;/P&gt;&lt;P&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/26491i2592770F8542BFFB/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&gt;&lt;/P&gt;&lt;P&gt;I am not sure where to enabled stack overflow hook and FreeRTOS asserts.&lt;/P&gt;&lt;P&gt;I will confirm it soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 11:34:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675382#M27072</guid>
      <dc:creator>kensu</dc:creator>
      <dc:date>2017-07-19T11:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675383#M27073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't enable hook function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:05:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675383#M27073</guid>
      <dc:creator>kensu</dc:creator>
      <dc:date>2017-07-19T12:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675384#M27074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;I was interested in how you create that task with xTaskCreate().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And why are you not using&lt;/P&gt;&lt;P&gt;vTaskDelay(pdMS_TO_TICKS(1000));&lt;/P&gt;&lt;P&gt;in your task instead of that utilTaskSleepMilliSec()?&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>Wed, 19 Jul 2017 12:08:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675384#M27074</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-07-19T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675385#M27075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Erich&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I create the task with the API,&lt;/P&gt;&lt;P&gt;xTaskCreate(taskSystemMainControl, "MainControl", TASK_SYSTEM_MAIN_CONTROL_STACK_SIZE, NULL, (tskIDLE_PRIORITY + 1UL), (TaskHandle_t *) NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And My &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;utilTaskSleepMilliSec() is called&amp;nbsp;&lt;SPAN&gt;vTaskDelay API,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;I verify the application on LPC1857 evaluation broad , I also check again&amp;nbsp;the stack usage in LPC1857, it's no problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;But when I transfer the code to LPC1830,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;these problem happens.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Hard to know why.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Ken&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 13:01:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675385#M27075</guid>
      <dc:creator>kensu</dc:creator>
      <dc:date>2017-07-19T13:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS always show stack over usage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675386#M27076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;what is the content of TASK_SYSTEM_MAIN_CONTROL_STACK_SIZE ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 13:59:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-always-show-stack-over-usage/m-p/675386#M27076</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-07-19T13:59:54Z</dc:date>
    </item>
  </channel>
</rss>

