<?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>LPC MicrocontrollersのトピックHow to Data Read or Write in USB(Full Speed/High Speed)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Data-Read-or-Write-in-USB-Full-Speed-High-Speed/m-p/1658334#M52751</link>
    <description>&lt;P&gt;Hi NXP Team&lt;/P&gt;&lt;P&gt;I am beginner to the NXP controllers,I am currently working on a board OM13098LPCxpresso54628.I am trying create a new txt file write some data on to it in microUSB port J2/J3.I am using the example project provided in the SDK example(host_msd_fatfs_bm).USB Device was connected to the micro AB port to USB(J3) was detected. But i was structed in where to open the file and write the file.&lt;/P&gt;&lt;P&gt;In main function&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_HostTaskFn(g_HostHandle);&lt;BR /&gt;USB_HostMsdTask(&amp;amp;g_MsdFatfsInstance);&lt;/P&gt;&lt;P&gt;function was called but i dont know how to write data onto the file.Is there any function i need to call.&lt;/P&gt;&lt;P&gt;Please provide me the example project which can open the file and write the data onto it or provide how to i start working. what are the procedure i need to follow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;A. Ajith Kumar&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 10:23:23 GMT</pubDate>
    <dc:creator>aajithkumarr</dc:creator>
    <dc:date>2023-05-26T10:23:23Z</dc:date>
    <item>
      <title>How to Data Read or Write in USB(Full Speed/High Speed)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Data-Read-or-Write-in-USB-Full-Speed-High-Speed/m-p/1658334#M52751</link>
      <description>&lt;P&gt;Hi NXP Team&lt;/P&gt;&lt;P&gt;I am beginner to the NXP controllers,I am currently working on a board OM13098LPCxpresso54628.I am trying create a new txt file write some data on to it in microUSB port J2/J3.I am using the example project provided in the SDK example(host_msd_fatfs_bm).USB Device was connected to the micro AB port to USB(J3) was detected. But i was structed in where to open the file and write the file.&lt;/P&gt;&lt;P&gt;In main function&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_HostTaskFn(g_HostHandle);&lt;BR /&gt;USB_HostMsdTask(&amp;amp;g_MsdFatfsInstance);&lt;/P&gt;&lt;P&gt;function was called but i dont know how to write data onto the file.Is there any function i need to call.&lt;/P&gt;&lt;P&gt;Please provide me the example project which can open the file and write the data onto it or provide how to i start working. what are the procedure i need to follow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;A. Ajith Kumar&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 10:23:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Data-Read-or-Write-in-USB-Full-Speed-High-Speed/m-p/1658334#M52751</guid>
      <dc:creator>aajithkumarr</dc:creator>
      <dc:date>2023-05-26T10:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Data Read or Write in USB(Full Speed/High Speed)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Data-Read-or-Write-in-USB-Full-Speed-High-Speed/m-p/1659281#M52777</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217924"&gt;@aajithkumarr&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;The SDK example(host_msd_fatfs_bm) that you are using is the recommended one to start to open, create, write and read files.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Follow the next steps to find the relevant functions to open and write a file to the USB in the example:&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;Ctrl + click on &lt;EM&gt;USB_HostMsdTask(&amp;amp;g_MsdFatfsInstance);&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_0-1685386167958.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/225241i6179D4EF15EEAFB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RaulRomero_0-1685386167958.png" alt="RaulRomero_0-1685386167958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;[app.c file in host_msd_fatfs_bm SDK example]&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;Then in the function search for &lt;EM&gt;USB_HostMsdFatfsTest(msdFatfsInstance);&lt;/EM&gt; and ctrl + click on it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_1-1685386168226.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/225242i205EF46DF4E66281/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RaulRomero_1-1685386168226.png" alt="RaulRomero_1-1685386168226.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;[host_msd_fatfs.c file in host_msd_fatfs_bm SDK example]&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Now you are in the function that performs all the testing/actions this example mentions in the readme.pdf file.&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;Nonetheless, the file opening and writing is almost at the end of the function. You may want to search for the following line that starts the open/create a file test: &lt;EM&gt;usb_echo("file operation:\r\n");&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_2-1685386168228.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/225243i51CE129CD1ACC2E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RaulRomero_2-1685386168228.png" alt="RaulRomero_2-1685386168228.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;[host_msd_fatfs.c file in host_msd_fatfs_bm SDK example]&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;In here you will find the &lt;EM&gt;f_open&lt;/EM&gt;&amp;nbsp;function that is used for open/creating a non-existing file, while &lt;EM&gt;f_write&lt;/EM&gt; is used for writing onto the file.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;We recommend you work with the example, and to debug it to see how it works.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;EM&gt;Caution: The SDK example erases all the content of the connected USB stick (performs&amp;nbsp;a format).&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 18:53:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Data-Read-or-Write-in-USB-Full-Speed-High-Speed/m-p/1659281#M52777</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-05-29T18:53:50Z</dc:date>
    </item>
  </channel>
</rss>

