<?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: File writing tasks silently failing on K60 and K64F in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374128#M12420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for more information. I can confirm that my issues are not related to the append functionality (writing either works, or fails completely if I'm using the SD card), and I haven't written far enough to find the cluster size append error. I have even changed to "w" mode to overwrite new files and the issue is still the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The caches are all set to write-through for my application, as it's more resilient to power loss or SD card removal. But the functionality fails before writing anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am testing again now, and once the fopen() executes on the MFS:, which is installed without error on the sdcard:, the LED beside the card on the K64 turns red and blue, and the task ceases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 21:19:22 GMT</pubDate>
    <dc:creator>ironsean</dc:creator>
    <dc:date>2014-11-05T21:19:22Z</dc:date>
    <item>
      <title>File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374122#M12414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Hello, I've experienced an issue using MFS and a file writing task on &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;both a K60 custom board, and a K64F FRDM board: When the fopen() or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;write() function is called the function will never return and the task will &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;cease operating. There are no errors thrown and I don't know where to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;look to figure out why the function ceased. If I step through line by line&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;in the debugger eventually the debugger will just stop responding as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;It happened first with a custom K60 based board, using MFS on the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Internal Flash (to facilitate developing the file logic until a new board with &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;better storage was developed). When a specialized test task wrote to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Flash it worked, and when ONLY the file writing task (not the webserver, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;telnet server, sensor reading, or data uploading tasks) it also worked. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;But when all the tasks were running the file writing would silently stop &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;the task. By lowering the priority of the file writing task to the lowest &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;priority it began to function properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Now, on the K64F FRDM board we are attempting to refactor that task&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;to use the SD card. The internal flash writing still works. We have also&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;used the SD card example application to verify the SD card writing &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;works. I moved the SD card initialization into our full project and it &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;installs and uninstalls the SD card appropriately, but whenever we try to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;write to it the task silently fails again. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Any idea where or how I could try and Troubleshoot this, or what might&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;be happening? Because of the task priority and the way it just ceases, I &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;wondered if there's some sort of deadlock that occurs with the file &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;writing task and one of the others. Priority doesn't seem to be helping &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;the SD card case though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;We're using CodeWarrior Version: 10.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Build Id:130916&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:33:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374122#M12414</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-03T14:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374123#M12415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which MQX version are you using??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sol &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:14:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374123#M12415</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-11-03T21:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374124#M12416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the K60 custom board it was MQX 4.0.x (we updated to .4 or .5 as the latest I believe), and with the K64F we are using MQX 4.1.0, from the FRDM board's specific MQX release package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry, this was copied from a service ticket where the MQX versions were already listed as part of the ticket metadata and I forgot to include them here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:19:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374124#M12416</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-03T21:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374125#M12417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please specify which priorities you used for your tasks?&lt;/P&gt;&lt;P&gt;General recommendation is do not use priority levels below 8 for tasks, because they could block some internal interrupts typically used for io operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please specify your parameters for fopen()?&lt;/P&gt;&lt;P&gt;Unfortunately MQX up to 4.1.1 contains bug in append mode. Unfortunately, append mode is implemented wrongly.&lt;/P&gt;&lt;P&gt;As workaround, please use r+/w/w+ modes instead of append mode and seeks manually according your needs.&lt;/P&gt;&lt;P&gt;Next MQX release will contain complete redesigned MFS subsystem which will solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also one additional bug in MFS specific only for MQX for FRDMK64F/TWRK64F120M and MQX 4.1.1:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-message-small" data-containerid="2023" data-containertype="14" data-objectid="441581" data-objecttype="2" href="https://community.freescale.com/message/441581#441581"&gt;https://community.freescale.com/message/441581&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;RadekS&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>Wed, 05 Nov 2014 15:52:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374125#M12417</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2014-11-05T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374126#M12418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No priorities below 8, and in fact the file writing only worked on the K60 with the lowest priority of the tasks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;{ MAIN_TASK,&lt;/TD&gt;&lt;TD&gt;main_task,&lt;/TD&gt;&lt;TD&gt;1200,&lt;/TD&gt;&lt;TD&gt;9,&lt;/TD&gt;&lt;TD&gt;"Main",&lt;/TD&gt;&lt;TD&gt;MQX_AUTO_START_TASK,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ HTTP_TASK,&lt;/TD&gt;&lt;TD&gt;http_task,&lt;/TD&gt;&lt;TD&gt;1200,&lt;/TD&gt;&lt;TD&gt;16,&lt;/TD&gt;&lt;TD&gt;"http",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ SONAR_TASK,&lt;/TD&gt;&lt;TD&gt;sonar_task,&lt;/TD&gt;&lt;TD&gt;1200,&lt;/TD&gt;&lt;TD&gt;11,&lt;/TD&gt;&lt;TD&gt;"sonar",&lt;/TD&gt;&lt;TD&gt;MQX_FLOATING_POINT_TASK,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ TEST_TASK,&lt;/TD&gt;&lt;TD&gt;test_task,&lt;/TD&gt;&lt;TD&gt;1000,&lt;/TD&gt;&lt;TD&gt;13,&lt;/TD&gt;&lt;TD&gt;"test",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ TELNET_TASK,&lt;/TD&gt;&lt;TD&gt;telnet_task,&lt;/TD&gt;&lt;TD&gt;1000,&lt;/TD&gt;&lt;TD&gt;14,&lt;/TD&gt;&lt;TD&gt;"telnet",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ SENDER_TASK,&lt;/TD&gt;&lt;TD&gt;sender_task,&lt;/TD&gt;&lt;TD&gt;1000,&lt;/TD&gt;&lt;TD&gt;12,&lt;/TD&gt;&lt;TD&gt;"sender",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ READ_TASK,&lt;/TD&gt;&lt;TD&gt;read_task,&lt;/TD&gt;&lt;TD&gt;1000,&lt;/TD&gt;&lt;TD&gt;12,&lt;/TD&gt;&lt;TD&gt;"read",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{ LOG_TASK,&lt;/TD&gt;&lt;TD&gt;log_task,&lt;/TD&gt;&lt;TD&gt;1000,&lt;/TD&gt;&lt;TD&gt;18,&lt;/TD&gt;&lt;TD&gt;"log",&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0,&lt;/TD&gt;&lt;TD&gt;0},&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in fact using the append modes, with this call:&lt;/P&gt;&lt;P&gt;logfile = fopen("MFS:level_log.dat", "a+");&lt;/P&gt;&lt;P&gt;Weirdly, the append mode seems to work fine on the internal flash, and on the previous chip, just not with the SD card. Also, the task doesn't stop on the fopen() call but on the write() call. Do you have any more information about this append bug so I can find out what's going on and what to expect, and if this may be the cause of my issue? Also, any ETA on the next MQX release? With that K64 specific bug in fseek, and append mode not working properly I might need to just wait.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374126#M12418</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-05T16:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374127#M12419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for additional information.&lt;/P&gt;&lt;P&gt;MQX 4.0.2 has problem in flashX (I am not sure if you use it) with data in cache. Write followed by read caused that you read wrong data. MQX4.1 contains fix with invalidate this cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem with append mode appears when file size is multiply of cluster size. See also:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="2023" data-containertype="14" data-objectid="441854" data-objecttype="2" href="https://community.nxp.com/message/441854#441854"&gt;https://community.freescale.com/message/441854&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, it typically works for few hundreds writes and after that it stops.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 17:33:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374127#M12419</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2014-11-05T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374128#M12420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for more information. I can confirm that my issues are not related to the append functionality (writing either works, or fails completely if I'm using the SD card), and I haven't written far enough to find the cluster size append error. I have even changed to "w" mode to overwrite new files and the issue is still the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The caches are all set to write-through for my application, as it's more resilient to power loss or SD card removal. But the functionality fails before writing anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am testing again now, and once the fopen() executes on the MFS:, which is installed without error on the sdcard:, the LED beside the card on the K64 turns red and blue, and the task ceases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 21:19:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374128#M12420</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-05T21:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374129#M12421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone else have any ideas where to even look to debug this? How to figure out what happened to the task that ceased operation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 14:18:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374129#M12421</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-21T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374130#M12422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you pause the debugger when the task is stuck what does the call stack for the stuck task look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 15:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374130#M12422</guid>
      <dc:creator>pbanta</dc:creator>
      <dc:date>2014-11-21T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374131#M12423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Thread which is my logging task (0x10006) is this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Thread [ID: 0x10006] (Suspended: Signal 'Process Suspended' received.&lt;BR /&gt; Description: Process Suspended.)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;7 (AsmSection)() dispatch.S:178 0x0000044a&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;6 _time_delay_internal() time.c:554 0x000299c0&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;5 _time_delay_for() time.c:484 0x000298fc&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;4 _lwevent_wait_internal() lwevent.c:1163 0x0002dd54&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;3 _lwevent_wait_ticks() lwevent.c:1345 0x0002dde4&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;2 _esdhc_send_command() esdhc.c:557 0x0000fada&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;1 _esdhc_read() esdhc.c:1509 0x000107da&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Log_task is no longer even showed as the root task, and my debugger ends up looping through dispatch.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 20:39:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374131#M12423</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-24T20:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374132#M12424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see something similar to this with MQX 4.1.1 with a K70. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is my beleif that this has something to do with MQX kernel memory being overwritten. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have debugged into the write functions and I am "hanging" when the indirect function is being called suguesting that the function address in kernel memory has been zapped somehow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am actually using arm-none-eabi-gdb --tui to debug rather than CW but see the same debugger hanging issue. &lt;/P&gt;&lt;P&gt;I can often trace further by stepping by assembler instruction rather than C instruction. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 12:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374132#M12424</guid>
      <dc:creator>asmith</dc:creator>
      <dc:date>2014-11-25T12:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374133#M12425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took a quick look myself, and found this for an approximate code flow:&lt;/P&gt;&lt;P&gt;log_task.c&lt;/P&gt;&lt;P&gt;io_fopen.c:48-97&lt;/P&gt;&lt;P&gt;mfs_init.c:323-418&lt;/P&gt;&lt;P&gt;mfs_create.c:58&lt;/P&gt;&lt;P&gt;mfs_dir_entry.c:462&lt;/P&gt;&lt;P&gt;mfs_dir_entry.c:58-93&lt;/P&gt;&lt;P&gt;mfs_search.c:121&lt;/P&gt;&lt;P&gt;mfs_rw.c:437 MFS_Read_device_sector&lt;/P&gt;&lt;P&gt;mfs_rw.c:311 &lt;/P&gt;&lt;P&gt;mfs_rw:256 read()&lt;/P&gt;&lt;P&gt;io_read.c:53&lt;/P&gt;&lt;P&gt;io_read.c:78 res = (*dev_ptr-&amp;gt;IO_READ)(file_ptr, data, num);&lt;/P&gt;&lt;P&gt;part_mgr.c:1420 read() io_read, sdcard.c:285&lt;/P&gt;&lt;P&gt;sdcard_esdhc.c:363-408&lt;/P&gt;&lt;P&gt;io_read.c:74 in _mqx_int _io_read:&lt;/P&gt;&lt;P&gt;if (file_ptr-&amp;gt;HAVE_UNGOT_CHARACTER) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res = (*dev_ptr-&amp;gt;IO_READ)(file_ptr, data+1, num-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res = (*dev_ptr-&amp;gt;IO_READ)(file_ptr, data, num);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the debugger to hang on that final call to io_read.c:74 after getting through the sdcard_esdhc.c code, and it gets to the if statement at line 74 where if (file_prt-&amp;gt;HAVE_UNGOT_CHARACTER) can be seen as false through the debugger, but stepping over or into that statement doesn't lead to either of the res = calls. I'll see if I can step through assembly code and get any further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 21:59:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374133#M12425</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-25T21:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374134#M12426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to be failing mush as I am at the indirect call &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;res = (*dev_ptr-&amp;gt;xxxx)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that the memory where dev_ptr points has been trashed. &lt;/P&gt;&lt;P&gt;I have been trying to chase down MQX memory corruption thus far without success. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 14:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374134#M12426</guid>
      <dc:creator>asmith</dc:creator>
      <dc:date>2014-11-26T14:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374135#M12427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be right, after some further testing the exact moment it loses it is inconsistent, but it's usually at one of those DEV_PTR calls. And a couple times when I've checked the variable right before losing it the contents of the struct are almost all 0x59D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 15:24:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374135#M12427</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-11-27T15:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374136#M12428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately it doesn’t exactly fit to any of known issues.&lt;/P&gt;&lt;P&gt;Is it possible place watchpoint at this DEV_PTR (and address where it points) and check whether dev pointer is modified somewhere between fopen on fclose? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try different SD card?&amp;nbsp; I know about one old and slow SD card here which has similar issue (it just stop working after few writes). We suppose that there is some issue due to timeouts during card transfers, but we didn’t have time for investigation till now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 14:55:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374136#M12428</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2014-12-04T14:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374137#M12429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case I am using a K70.&amp;nbsp; I am not using an SD. &lt;/P&gt;&lt;P&gt;I am building MQX using GCC from the command line under Ubuntu 14.04. I have used both the ubuntu Mutli-arch arm gcc compiler an the recomended kinetis GCC toolchain. &lt;/P&gt;&lt;P&gt;I have built for DDR and SDRAM all with the same results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eventually I execute and indirect call inside MQX and things go to hell. &lt;/P&gt;&lt;P&gt;I can play games with the code and delay this, but ultimately it is happening. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a clue where to look to try to find this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also trying to build my application with KDS to see if somehow that makes a difference, but it is a fair amount of effort creating a project file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 21:01:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374137#M12429</guid>
      <dc:creator>asmith</dc:creator>
      <dc:date>2014-12-04T21:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374138#M12430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experience on a K60 board writing to internal flash via MFS failing also supports that it isn't an SD card issue. In that case, I could write to the flash when only the testing task was running, but I could not write while my other tasks were running until I changed the file writing to have a lower task priority (possibly causing whatever task was wiping the memory to not run during the call anymore?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As well, if I simply compile an SD card example project I can read and write to the SD card fine. but when incorporating the same code in my project it fails. I will try and set the watchpoints and see if I can find it changing for sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 21:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374138#M12430</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-12-04T21:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374139#M12431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David, what stack size are you allocating for the task doing file writing? I found out I was getting a stack overflow during the file write call (actually debugging another task). When I bumped my allocation up from 1000 to 2000, I see my stack usage jump up to 71% during file writing, which is well above what the old limit would have been. Now writing works properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 20:41:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374139#M12431</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2014-12-05T20:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374140#M12432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried so many things it is hard to recall details about all of them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I beleive I have had failures with single tasking examples and 2000+ stacks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I am stalled because something caused USB to quit working entirely, and I can not get back to where it was. &lt;/P&gt;&lt;P&gt;Need to push to the SCM more frequently&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 16:42:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374140#M12432</guid>
      <dc:creator>asmith</dc:creator>
      <dc:date>2014-12-08T16:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: File writing tasks silently failing on K60 and K64F</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374141#M12433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would have little problem beleiving this was a stack issue, &lt;/P&gt;&lt;P&gt;though there is still the question of why kernel data is getting corrupted ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stacks are supposed to come from free memory. Why would a stack overflow encroach on kernel data ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really not happy with the magic numbers in the link files. &lt;/P&gt;&lt;P&gt;Explicitly placing one kind of memory at an absolute address while allocating other memory out of a pool that overlaps seems like a recipe for disaster to me. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 16:46:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/File-writing-tasks-silently-failing-on-K60-and-K64F/m-p/374141#M12433</guid>
      <dc:creator>asmith</dc:creator>
      <dc:date>2014-12-08T16:46:35Z</dc:date>
    </item>
  </channel>
</rss>

