<?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: usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581267#M20402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Idanba on Thu Feb 12 02:08:47 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Wouter,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the quick answer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another question I have is In case we'd like to be a mass storage DEVICE, using USB ROM API, Do we have to store the data received only on RAM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From the example given it looks like *buff_adr will only hold the address we'd like to write into rather than data itself and this address, if I understand it right, must be accessible&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for the USB DMA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static void translate_wr(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*buff_adr =&amp;nbsp; &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32)) + length];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where g_memDiskArea located on chip's SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to use the USB ROM API provided but define the 'Storage' as external RAM or External flash? How would these write/read function should look like?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Idan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:21:49 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:21:49Z</dc:date>
    <item>
      <title>usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581265#M20400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Idanba on Tue Feb 10 23:41:11 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Keil's MCB4300 eval board and trying to run the above lpcopen example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can see in the code that MSC_MEM_DISK_SIZE&amp;nbsp;&amp;nbsp; is defined to&amp;nbsp; be ((uint32_t) (32 * 1024)) and while trying to format it ( From the PC) the size shown&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is really 32KB, BUT right clicking on the mass storage device and then properties reveals the PC recognize it as 12KB.... Why is that ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried to change the MSC_MEM_DISK_SIZE&amp;nbsp; but still no change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using windows 7 and LPCXpresso v7.5.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Idan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:21:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581265#M20400</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581266#M20401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Wouter on Wed Feb 11 09:56:33 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Idan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The physical memory of the 'drive' is 32kB, but the FAT table already takes ~20kB of that, leaving ~12kB of usable space. This usable space is what Windows reports.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wouter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:21:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581266#M20401</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581267#M20402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Idanba on Thu Feb 12 02:08:47 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Wouter,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the quick answer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another question I have is In case we'd like to be a mass storage DEVICE, using USB ROM API, Do we have to store the data received only on RAM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From the example given it looks like *buff_adr will only hold the address we'd like to write into rather than data itself and this address, if I understand it right, must be accessible&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for the USB DMA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static void translate_wr(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*buff_adr =&amp;nbsp; &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32)) + length];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where g_memDiskArea located on chip's SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to use the USB ROM API provided but define the 'Storage' as external RAM or External flash? How would these write/read function should look like?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Idan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:21:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581267#M20402</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581268#M20403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Thu Feb 12 09:24:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Idanba,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can store data in a buffer in the internal SRAM as done in the example. You can also increase buffer size and transfer data from SRAM to flash when it gets fill.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Another question I have is In case we'd like to be a mass storage DEVICE, using USB ROM API, Do we have to store the data received only on RAM?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will have to use IAP to program data in the flash&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;where g_memDiskArea located on chip's SRAM.&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is in internal SRAM at 0x20004000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Is there a way to use the USB ROM API provided but define the 'Storage' as external RAM or External flash? How would these write/read function should look like?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, define buffer at external SRAM location, instead of internal SRAM. You will have to use&amp;nbsp; programming algorithm to program data in an External Flash &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:21:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581268#M20403</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: usbd_rom_msc_ram example shows wrong disk size while connecting it to PC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581269#M20404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Idanba on Wed Feb 25 23:16:49 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks mc !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:21:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/usbd-rom-msc-ram-example-shows-wrong-disk-size-while-connecting/m-p/581269#M20404</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:21:50Z</dc:date>
    </item>
  </channel>
</rss>

