<?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: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399582#M13386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Isaac&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw that my USB drive was assigned letter a:. I just had to add a:\\ to the file path at fopen call and now it's working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no words to thank you for the patience with a beginner at FATfs like me. I really appreciated it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2015 17:38:28 GMT</pubDate>
    <dc:creator>MAPC</dc:creator>
    <dc:date>2015-08-31T17:38:28Z</dc:date>
    <item>
      <title>Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399577#M13381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm need to do a USB stick Data Logger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MQX 4.2 and CodeWarrior 10.6 for that. The MCU used here is a MK70FN1M0. And I'm using TWR-K70 for development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, I'm trying to mount a FAT file system, open a pre-created .txt file and write a string to it every second just as a test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the mfs_usb_twrk70f120m demo from MQX 4.2. In USB_task, I set a lw_event after the interface is detected the file system is mounted:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52992iE392679B172C18F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also cleared the same event if the USB memory stick is dettached, as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new task to wait for this event, open a pre-created .txt file, and write a string to it, and close the file, every second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see in the image bellow, the event is set, but it looks like the file cannot be opened in the USB memory stick for a reason that I don't know yet.&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/52993i3A9A12ABE1347360/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;Where did I go wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me on this, please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 14:25:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399577#M13381</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-08-26T14:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399578#M13382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just found out the point where the problem is at. It looks like it has to do with the file name, but I can't undertand why:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52997iCE44FEDFF359D5F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 16:55:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399578#M13382</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-08-26T16:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399579#M13383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco Aurelio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure your USB stick is mounted as c: ? I have tested this example, inserted an USB stick, open a pre-created file (also named as MARCO.TXT) wrote some characters and then read them back, everything worked well. In my case, USB stick was mountes as a:, please check the image below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Absolute path.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54809iB655ED9ADA981B72/image-size/large?v=v2&amp;amp;px=999" role="button" title="Absolute path.jpg" alt="Absolute path.jpg" /&gt;&lt;/span&gt;Here is the shell view:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Write and Read to USB stick.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54846iDB058A82CD5A3808/image-size/large?v=v2&amp;amp;px=999" role="button" title="Write and Read to USB stick.jpg" alt="Write and Read to USB stick.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could you please validate this path?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 23:36:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399579#M13383</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2015-08-28T23:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399580#M13384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Isaac&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application, I don't use shell task. I just left it commented and called fopen, fputc and fclose functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where can I see in the code which unit my USB stick was mounted at? I'm not experienced at FATfs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Aurelio Coelho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 12:23:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399580#M13384</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-08-29T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399581#M13385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is assigned in usb_file.c file, in msd_assing_driver_letter function when calling mfs_mount function. (line 146 from usb_file.c).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please validate which letter is assigned to your USB drive?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 13:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399581#M13385</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2015-08-29T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399582#M13386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Isaac&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw that my USB drive was assigned letter a:. I just had to add a:\\ to the file path at fopen call and now it's working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no words to thank you for the patience with a beginner at FATfs like me. I really appreciated it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 17:38:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399582#M13386</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-08-31T17:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't open a file in a USB memory stick using MQX 4.2 MFS_USB_twrk70f120m demo as reference</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399583#M13387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are welcome. It is a pleasure to help you on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 18:18:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-open-a-file-in-a-USB-memory-stick-using-MQX-4-2-MFS-USB/m-p/399583#M13387</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2015-08-31T18:18:14Z</dc:date>
    </item>
  </channel>
</rss>

