<?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のトピックRe: USB Mass Storage Host LPC4350</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Mass-Storage-Host-LPC4350/m-p/586860#M21508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jun 2016 01:07:04 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-19T01:07:04Z</dc:date>
    <item>
      <title>USB Mass Storage Host LPC4350</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Mass-Storage-Host-LPC4350/m-p/586859#M21507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gregd on Sat Apr 02 09:51:37 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on developing a USB Mass Storage Host application running on the LPC4350 using LPCOpen v2.12 with IAR EWARM.&amp;nbsp; I have an application based off the Mass Storage Host example using LPCUSBLIB.&amp;nbsp; In my application, I need to periodically power up the USB and thumb drive write some data to a file and then power down the USB and thumb drive.&amp;nbsp; Everything works fine for 2 attempts, but on the third attempt I start running out of memory when Pipe_ConfigurePipe (Pipe.c) calls USB_Memory_Alloc.&amp;nbsp; The problem seems to be that USB_Mem_Buffer is not being cleared out when I shut down the USB Host.&amp;nbsp; As a test, I added code to force clearing out USB_Mem_buffer but then I started having problems in AllocQhd (EHCI.c) with HCD_STATUS_NOT_ENOUGH_ENDPOINT.&amp;nbsp; As far as I can tell, the memory and pipes handling is not cleared out unless an interrupt triggers the USB_Host_DeEnumerate() function through the PortSatusChangeIsr() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the proper sequence to shut down the Mass Storage USB Host and clear out all memory/resource allocations to allow a clean restart later.&amp;nbsp; My application is very power sensitive and must only power up the USB host periodically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the current sequence I am using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_USB1_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_Init(FlashDisk_MS_Interface.Config.PortNumber, USB_MODE_Host);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_ReadWriteFile();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_Host_SetDeviceConfiguration(FlashDisk_MS_Interface.Config.PortNumber, 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_Disable(FlashDisk_MS_Interface.Config.PortNumber, USB_MODE_Host);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg Dunn&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:11:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Mass-Storage-Host-LPC4350/m-p/586859#M21507</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: USB Mass Storage Host LPC4350</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Mass-Storage-Host-LPC4350/m-p/586860#M21508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:07:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-Mass-Storage-Host-LPC4350/m-p/586860#M21508</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:07:04Z</dc:date>
    </item>
  </channel>
</rss>

