<?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 fflush vs WRITE_THROUGH for mfs in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/fflush-vs-WRITE-THROUGH-for-mfs/m-p/319539#M10201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am using 52259 with mqx 4.0.1.&amp;nbsp; I was originally doing an fprintf followed by an fflush for every write to a file.&amp;nbsp; I am doing a write every 50ms.&amp;nbsp; After several hours of run-time, my USB device just randomly detaches mid write and creates an unhandled exception.&amp;nbsp; I thought maybe the fflush was causing it, so I tried to get rid of that and change to using&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;param = MFS_WRITE_THROUGH_CACHE;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;(usb_fs_ptr-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;FS_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, IO_IOCTL_SET_WRITE_CACHE_MODE, &amp;amp;param);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;For some reason now the writes to file are taking almost 10x longer than they were when I was using fflush.&amp;nbsp; Any ideas why?&amp;nbsp; Is that normal?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jul 2014 14:34:24 GMT</pubDate>
    <dc:creator>njk909</dc:creator>
    <dc:date>2014-07-12T14:34:24Z</dc:date>
    <item>
      <title>fflush vs WRITE_THROUGH for mfs</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fflush-vs-WRITE-THROUGH-for-mfs/m-p/319539#M10201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am using 52259 with mqx 4.0.1.&amp;nbsp; I was originally doing an fprintf followed by an fflush for every write to a file.&amp;nbsp; I am doing a write every 50ms.&amp;nbsp; After several hours of run-time, my USB device just randomly detaches mid write and creates an unhandled exception.&amp;nbsp; I thought maybe the fflush was causing it, so I tried to get rid of that and change to using&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;param = MFS_WRITE_THROUGH_CACHE;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;(usb_fs_ptr-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;FS_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, IO_IOCTL_SET_WRITE_CACHE_MODE, &amp;amp;param);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;For some reason now the writes to file are taking almost 10x longer than they were when I was using fflush.&amp;nbsp; Any ideas why?&amp;nbsp; Is that normal?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jul 2014 14:34:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fflush-vs-WRITE-THROUGH-for-mfs/m-p/319539#M10201</guid>
      <dc:creator>njk909</dc:creator>
      <dc:date>2014-07-12T14:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: fflush vs WRITE_THROUGH for mfs</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fflush-vs-WRITE-THROUGH-for-mfs/m-p/319540#M10202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the below threads,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/305975"&gt;MFS Corruption&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/112014"&gt;Howto flush MFS? (Use case: mfs onto ramdisk)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol &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>Fri, 18 Jul 2014 16:42:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fflush-vs-WRITE-THROUGH-for-mfs/m-p/319540#M10202</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-07-18T16:42:06Z</dc:date>
    </item>
  </channel>
</rss>

