<?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>MQX Software SolutionsのトピックRe: System Task ***OVERFLOW***</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192838#M3889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I will use _lwmem_alloc for now and see how it behaves. If I find anything that I dont like I will go either for a preallocated buffer and semaphores to share this resource or a flash swap. Flash swap might be suitable for my application since I will have an external big flash memory.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2009 22:00:41 GMT</pubDate>
    <dc:creator>JaimeR</dc:creator>
    <dc:date>2009-06-24T22:00:41Z</dc:date>
    <item>
      <title>System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192831#M3882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I wonder if anyone knows what does this mean and how could I solve it.&lt;/P&gt;&lt;P&gt;I do not have a task named System task. I have search for those words into the kernel libraries without any luck. My application is crashing and this has brought my project to halt. Thank you in advanced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 23:24:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192831#M3882</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-06-22T23:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192832#M3883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The System TD is used when there is no other task to run. It is not actually a task - the kernel executes a STOP instruction.&lt;/P&gt;&lt;P&gt;There is a small stack associated with it, defined by PSP_MINSTACKSIZE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your problem may be caused by either an overflow of this stack, or a bad pointer corrupting the stack, making it appear like an overflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 23:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192832#M3883</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-06-22T23:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192833#M3884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, another task was running out of stack. When I added more stack to that task the System task overflow was solved. Now the problem is that I have a function that writes to flash memory and since the flash memory is erasable in 4k blocks, this function has a 4k buffer. Thus, each task that calls this function automatically requires 4k of RAM, therefore, I am running out of RAM. What options do I have to avoid this huge RAM leakage I am having. I tried to look into light weight memory functions in order to share this 4k resource, but it seems those only work with ROM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 01:20:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192833#M3884</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-06-23T01:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192834#M3885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lw mem functions work on ram. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have a few options for solving your problem. It may depend on how frequently you write to flash.&amp;nbsp; if you are doing this most of the time, you could preallocate one buffer. You would want to protect your flash write routines with a semaphore so that multiple tasks can share the single buffer.&amp;nbsp; If you write to flash occasionally, just use _lwmem_alloc( 4096) and free it once done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 02:04:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192834#M3885</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-06-23T02:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192835#M3886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Jaime R wrote:&lt;BR /&gt;&lt;P&gt;.... Now the problem is that I have a function that writes to flash memory and since the flash memory is erasable in 4k blocks, this function has a 4k buffer...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The cfm hardware requires no buffer at all for erase, and can write flash in units of 4 bytes at a time. While the speed can be improved by writing 8 or more bytes at once, your 4K buffer seems to be a colossal waste of memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 20:00:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192835#M3886</guid>
      <dc:creator>bkatt</dc:creator>
      <dc:date>2009-06-23T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192836#M3887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mmm... Suppose I want to CHANGE the value of 2 bytes in the same flash memory sector. Obviously&lt;/P&gt;&lt;P&gt;this sector has more information that I need and I cannot lose that information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I need to erase these 2 bytes(so that I can write new information in them) but since flash&lt;/P&gt;&lt;P&gt;is only eraseable by 4k blocks... I will have to erase the whole 4k...&lt;/P&gt;&lt;P&gt;Now, If I dont want to lose the other 4094 bytes of information in this sector I need to have a place&lt;/P&gt;&lt;P&gt;to store&amp;nbsp; this bytes. This is what I am calling buffer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, let me know if there is a better and more efficient way of doing what I need to do without&amp;nbsp;&lt;/P&gt;&lt;P&gt;wasting that amount of memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 21:30:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192836#M3887</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-06-23T21:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192837#M3888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can you use a flash swap space so you will be wasting 4K flash instead of 4K ram. So, erase one block, copy your other block over to the erased block, you can modifiy just the data you need... Would that work?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 07:43:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192837#M3888</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-06-24T07:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192838#M3889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I will use _lwmem_alloc for now and see how it behaves. If I find anything that I dont like I will go either for a preallocated buffer and semaphores to share this resource or a flash swap. Flash swap might be suitable for my application since I will have an external big flash memory.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 22:00:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192838#M3889</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-06-24T22:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192839#M3890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes, the function&amp;nbsp;&amp;nbsp; _lwmem_alloc &amp;nbsp; returns a NULL pointer.&amp;nbsp; This is how I am using it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; flash_buffer = _lwmem_alloc( 4096);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (flash_buffer == NULL){&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; printf("\nError al obtener buffer en eraseBottomPage");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clues about what is going on? , Why does it only happen sometimes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 04:26:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192839#M3890</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-06-25T04:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: System Task ***OVERFLOW***</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192840#M3891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;function lwmem_alloc returns NULL in case that it can not allocate requsted memory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Probably your are sometimes out of memory - there is no 4K memory space to allocate.&lt;/P&gt;&lt;P&gt;You can check all allocated block in MQX Task Aware Debugging menu: MQX/Lw memory blocks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;PetrL&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 04:01:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/System-Task-OVERFLOW/m-p/192840#M3891</guid>
      <dc:creator>PetrL</dc:creator>
      <dc:date>2009-06-29T04:01:07Z</dc:date>
    </item>
  </channel>
</rss>

