<?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: MQX 3.6 MCF52255 - Problems with USB MFS file read in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240351#M6775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angelo,&lt;/P&gt;&lt;P&gt;i would strongly recommend moving to MQX4.0.&amp;nbsp; There has been much change, inprovements, enhancements with the RTOS components (especially MFS and USB) since MQX3.6.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2013 13:24:20 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2013-03-26T13:24:20Z</dc:date>
    <item>
      <title>MQX 3.6 MCF52255 - Problems with USB MFS file read</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240350#M6774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an application with an MCF52255 is tied to a USB Flash drive and an MP3 CODEC.&amp;nbsp; It opens an MP3 file on the drive, reads a small chunk of data,&amp;nbsp; streams it to the CODEC via SPI, and repeats.&amp;nbsp; This continues until the file read command returns 0 bytes read, at which time it stops playback.&amp;nbsp; This all works fine under the majority of cases, but for some unknown reason it occasionally fails.&amp;nbsp; This has happened when reading different files of varying length, and the time at which it happens in the file also varies (a few MB to over 50 MB).&amp;nbsp; I can tell when it's happening because I get back a 0 byte read even though the file pointer has not reached the end of file (I check the file size before starting to play).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I determine this condition exists (which has been reliable) I then try to recover.&amp;nbsp; I would certainly prefer to know why it fails in the first place (and prevent it), but at a minimum to start with I need to be able to recover from this condition.&amp;nbsp; I have first tried to simply close the file and reopen which didn't help.&amp;nbsp; For some reason when it gets in this state I can do the fopen and fclose, and also fseek (to find the the file size), but a read always returns 0 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then tried to reset the USB task, but I'm evidently doing something wrong because I end up with new tasks each time I try this.&amp;nbsp; The code I'm using is based closely on an example project (I don't remember exactly which now, but probably 'hvac' for the Tower 52259 board).&amp;nbsp; The 'USB_Task' has the highest priority in the application, and it spawns another 'KHCI task'.&amp;nbsp; When I try to do a _task_restart on the USB task, the KHCI task doesn't get aborted so a new one starts when the USB task restarts.&amp;nbsp; (I'm going to try having it abort that task as well.)&amp;nbsp; Regardless, after this happens when I try to reopen the file and start reading from it again, I start seeing "USBMSF retrying read sector" messages which I don't normally get.&amp;nbsp; It does still seek, but when I try to read I still get 0 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen some rare random anomalies in the USB MSF behavior on other projects, but I suppose now that the volume of USB activity on this project is so much higher I'm seeing it much more often, and it's potentially a showstopper.&amp;nbsp; Is this a bug in the stack, or something I'm doing wrong?&amp;nbsp; I see there are a number of bugs fixed for MQX 4.0 - can I expect this problem to go away if I attempt to port the code to 4.0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any insight or suggestions.&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 02:01:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240350#M6774</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-03-26T02:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 3.6 MCF52255 - Problems with USB MFS file read</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240351#M6775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angelo,&lt;/P&gt;&lt;P&gt;i would strongly recommend moving to MQX4.0.&amp;nbsp; There has been much change, inprovements, enhancements with the RTOS components (especially MFS and USB) since MQX3.6.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 13:24:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240351#M6775</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2013-03-26T13:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 3.6 MCF52255 - Problems with USB MFS file read</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240352#M6776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Angelo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did the moving to MQX 4.0 really solved your problem? I have got a similar problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 09:38:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240352#M6776</guid>
      <dc:creator>foo86</dc:creator>
      <dc:date>2014-11-11T09:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 3.6 MCF52255 - Problems with USB MFS file read</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240353#M6777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin, as it turns out, I finally just got to upgrading the project to MQX 4.0 recently.&amp;nbsp; I haven't done enough testing to say there is an improvement, although I did see some of the same behavior.&amp;nbsp; I'll have to do some better testing to say for sure, but I have a new problem in that I'm not able to reach the same maximum data rates that I did with 3.6, so I need to determine the reason for that first.&amp;nbsp; If I can't resolve the speed issue, I'll have to roll back to 3.6 anyway.&amp;nbsp; In 3.6 I was able to simultaneously read and stream files to the CODEC that are encoded at over 320kbps.&amp;nbsp; The same code running in 4.0 can't handle that speed and the audio is distorted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it might have something to do with what I believe is a bug in MQX (which I reported here: &lt;A href="https://community.nxp.com/thread/329251"&gt;How to adjust a timer interval?&lt;/A&gt;), but I'm not sure if that problem is strictly on the Kinetis device or the Coldfire also.&amp;nbsp; I changed various short 5ms delays to 1 tick to be sure, but it didn't help.&amp;nbsp; Maybe this issue isn't causing my problem, but I'll need to put a scope on the signals next to see what's happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 12:21:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-6-MCF52255-Problems-with-USB-MFS-file-read/m-p/240353#M6777</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2014-11-11T12:21:56Z</dc:date>
    </item>
  </channel>
</rss>

