<?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: ROM_USB_msc for LPC1347 has RAM allocation problem</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525904#M8540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by aakicee on Mon Apr 06 22:31:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt; is it the proper solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:56:43 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:56:43Z</dc:date>
    <item>
      <title>ROM_USB_msc for LPC1347 has RAM allocation problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525902#M8538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CC58 on Mon Jan 21 14:29:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The ROM_USB_msc ROM code uses RAM space with a pointer without allocating space for its use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to add variable (2K array) in main.c and write to it, subsequent USB connect causes a hard fault.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I allocate a 2K array and do no write to it, the thumbdrive comes up normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears the ROM routines are using RAM space from 0x800 to 0x1000 without informing the C compiler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the code in app_usbd_cfg.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MSC_PARAM_MEM&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x10000800&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MSC_RARAM_SIZE&amp;nbsp;&amp;nbsp; 0x00000800&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which is then reference in main.c for init of USB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; usb_param.mem_base = MSC_PARAM_MEM;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; usb_param.mem_size = MSC_RARAM_SIZE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've managed to get around this in an ugly way by editing the MCU settings&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;such that RAM starts at 0x1000 and ends at 0x2000.&amp;nbsp; This is not a proper solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the proper solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it entails changing the project's linker directives somehow regarding sections?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525902#M8538</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: ROM_USB_msc for LPC1347 has RAM allocation problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525903#M8539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fcarlo on Tue Feb 05 06:46:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that you should use USB RAM as base memory location from where data and buffers are allocated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the data sheet to know which alignment is required for the data (see "mem_base" for both USBD_API_INIT_PARAM and USBD_MSC_INIT_PARAM)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525903#M8539</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: ROM_USB_msc for LPC1347 has RAM allocation problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525904#M8540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by aakicee on Mon Apr 06 22:31:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt; is it the proper solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ROM-USB-msc-for-LPC1347-has-RAM-allocation-problem/m-p/525904#M8540</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:43Z</dc:date>
    </item>
  </channel>
</rss>

