<?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中的主题 LPC55S16 USB1 HS using the USB_RAM USB: 0x4010_0000</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S16-USB1-HS-using-the-USB-RAM-USB-0x4010-0000/m-p/2130833#M58471</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to use USB1 on an LPC55S16. I can do this easily by changing the following two defines in the SDK example lpcxpresso55s16_dev_cdc_vcom_bm:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511FS (1U)&lt;BR /&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511HS (0U) &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;to:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;BR /&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511HS (1U) &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I look at the linkerscript, I notice that — regardless of the configuration — the USB always uses the same RAM section:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;EM&gt;USB_RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 0x4000 /* 16 KB (alias RAM2) */ &lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;But according to Chapter 45 of the &lt;EM&gt;UM11295&lt;/EM&gt; user manual, the USB1 peripheral has its own dedicated RAM located at address range &lt;STRONG&gt;0x40100000&lt;/STRONG&gt; to &lt;STRONG&gt;0x40103FFF&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So, when using the USB1 peripheral, I would expect it to use this dedicated USB1 RAM region rather than the general SRAM.&lt;/P&gt;&lt;P&gt;I also checked the lpcxpresso55s16_dev_cdc_vcom_bm.map file, and found that nothing is allocated at the 0x40100000 region.&lt;/P&gt;&lt;P&gt;On the other hand, if I modify the linkerscript to place USB_RAM at 0x40100000, the application crashes during usb-initialization with a hardfault exception.&lt;/P&gt;&lt;P&gt;So here are my questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Do I need to rewrite parts of the USB stack to make this work?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there any examples available that demonstrate how to use this memory with USB1?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Would using this dedicated USB RAM result in better performance compared to regular SRAM?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jul 2025 09:57:55 GMT</pubDate>
    <dc:creator>Nico3</dc:creator>
    <dc:date>2025-07-09T09:57:55Z</dc:date>
    <item>
      <title>LPC55S16 USB1 HS using the USB_RAM USB: 0x4010_0000</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S16-USB1-HS-using-the-USB-RAM-USB-0x4010-0000/m-p/2130833#M58471</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to use USB1 on an LPC55S16. I can do this easily by changing the following two defines in the SDK example lpcxpresso55s16_dev_cdc_vcom_bm:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511FS (1U)&lt;BR /&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511HS (0U) &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;to:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;EM&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;BR /&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;define&lt;/SPAN&gt;&lt;/SPAN&gt; USB_DEVICE_CONFIG_LPCIP3511HS (1U) &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I look at the linkerscript, I notice that — regardless of the configuration — the USB always uses the same RAM section:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;EM&gt;USB_RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 0x4000 /* 16 KB (alias RAM2) */ &lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;But according to Chapter 45 of the &lt;EM&gt;UM11295&lt;/EM&gt; user manual, the USB1 peripheral has its own dedicated RAM located at address range &lt;STRONG&gt;0x40100000&lt;/STRONG&gt; to &lt;STRONG&gt;0x40103FFF&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So, when using the USB1 peripheral, I would expect it to use this dedicated USB1 RAM region rather than the general SRAM.&lt;/P&gt;&lt;P&gt;I also checked the lpcxpresso55s16_dev_cdc_vcom_bm.map file, and found that nothing is allocated at the 0x40100000 region.&lt;/P&gt;&lt;P&gt;On the other hand, if I modify the linkerscript to place USB_RAM at 0x40100000, the application crashes during usb-initialization with a hardfault exception.&lt;/P&gt;&lt;P&gt;So here are my questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Do I need to rewrite parts of the USB stack to make this work?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there any examples available that demonstrate how to use this memory with USB1?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Would using this dedicated USB RAM result in better performance compared to regular SRAM?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 09:57:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S16-USB1-HS-using-the-USB-RAM-USB-0x4010-0000/m-p/2130833#M58471</guid>
      <dc:creator>Nico3</dc:creator>
      <dc:date>2025-07-09T09:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S16 USB1 HS using the USB_RAM USB: 0x4010_0000</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S16-USB1-HS-using-the-USB-RAM-USB-0x4010-0000/m-p/2133836#M58493</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238142"&gt;@Nico3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do I need to rewrite parts of the USB stack to make this work?&lt;/P&gt;
&lt;P&gt;I think you can try the following steps.&lt;/P&gt;
&lt;P&gt;1. Modify the USB stack initialization to allocate buffers (like endpoint buffers) from the new section at 0x40100000.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. Update the linker script to define a new memory region for USB1 RAM:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;USB1_RAM (rwx) : ORIGIN = 0x40100000, LENGTH = 0x4000 /* 16 KB */&lt;/P&gt;
&lt;P&gt;3. Add a new section for USB buffers in your .ld file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.usb1_ram (NOLOAD) :&lt;BR /&gt;{&lt;BR /&gt;. = ALIGN(512); /* Align to match USB controller requirements */&lt;BR /&gt;*(.usb1_ram)&lt;BR /&gt;} &amp;gt; USB1_RAM&lt;/P&gt;
&lt;P&gt;4. Place the USB buffers explicitly into this section using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;__attribute__((section(".usb1_ram"))) uint8_t usbBuffer[4096];&lt;/P&gt;
&lt;P&gt;Are there any examples available that demonstrate how to use this memory with USB1?&lt;/P&gt;
&lt;P&gt;No.&lt;/P&gt;
&lt;P&gt;Would using this dedicated USB RAM result in better performance compared to regular SRAM?&lt;/P&gt;
&lt;P&gt;In general, yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 07:08:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S16-USB1-HS-using-the-USB-RAM-USB-0x4010-0000/m-p/2133836#M58493</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2025-07-15T07:08:59Z</dc:date>
    </item>
  </channel>
</rss>

