<?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: How to use USB RAM as ordinary RAM?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1341448#M46469</link>
    <description>&lt;P&gt;Hi, Alice.&lt;/P&gt;&lt;P&gt;First off: Thank you for this quick reply. I opened this thread just before I finished work for the day and when I started today, your answer just sat there waiting for me. Perfect!&lt;/P&gt;&lt;P&gt;Then I unpacked the example and had a good look at it.&lt;/P&gt;&lt;P&gt;I tried your suggestions. I already had the USB_RAM section yesterday, labelled &lt;EM&gt;RAM3&lt;/EM&gt;. So I did&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#include "cr_section_macros.h"
__DATA(RAM3) uint32_t array[10];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in global scope. Later I did&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POWER_EnablePD(kPDRUNCFG_PD_RAM3);
array[0] = 0x01234567;
array[9] = 0x89abcdef;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then stepped through the code. The address of &lt;EM&gt;array&lt;/EM&gt; is correct:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hoberg_2-1631781998414.png" style="width: 263px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/156279i9EDC8D899B8F413C/image-dimensions/263x432?v=v2" width="263" height="432" role="button" title="hoberg_2-1631781998414.png" alt="hoberg_2-1631781998414.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But as you can see, all data is 0. In fact, all the USB_RAM is 0s. I tried omitting the &lt;EM&gt;POWER_EnablePD()&lt;/EM&gt; line but then instead of 0s I get all 0xFFFFFEFFs (i.e.: 4294967039s).&lt;/P&gt;&lt;P&gt;Seems to me like for some reason the USB_RAM section is not writable. Odd.&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;Garry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 09:06:50 GMT</pubDate>
    <dc:creator>Garry_Hoberg</dc:creator>
    <dc:date>2021-09-16T09:06:50Z</dc:date>
    <item>
      <title>How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1340655#M46467</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using an LPC54628 with SDK 2.9 and trying to use the USB RAM (at addresses 0x40100000 to 0x40101fff) as additional ordinary RAM. So I do:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;POWER_EnablePD(kPDRUNCFG_PD_RAM3);&lt;/LI-CODE&gt;&lt;P&gt;In the Memory View after this instruction, instead of all ff all 00 is displayed. So power is actually on, it seems.&lt;/P&gt;&lt;P&gt;Then I do:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;unsigned int *i = (unsigned int *)0x40101ffc;
*i = 0x12345678;&lt;/LI-CODE&gt;&lt;P&gt;But that doesn't do anything. I then enabled &lt;EM&gt;USB0 clock&lt;/EM&gt;, &lt;EM&gt;USB1 clock&lt;/EM&gt; and &lt;EM&gt;USBPLL clock&lt;/EM&gt; in the Clocks Tool, rebuilt and redebugged but no luck neither.&lt;/P&gt;&lt;P&gt;I also put .bss.* data via the managed linker script there (which was the idea, obviously) but the failed asserts tell that no values could be written there.&lt;/P&gt;&lt;P&gt;What am I missing? Do I have to set another register bit to make that area writable?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:44:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1340655#M46467</guid>
      <dc:creator>Garry_Hoberg</dc:creator>
      <dc:date>2021-09-15T13:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1341188#M46468</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/147486" target="_self" aria-label="View Profile of hoberg"&gt;&lt;SPAN class=""&gt;hoberg&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;There is a demo steps you can refer to:&lt;/P&gt;
&lt;P&gt;1) Create USB RAM space to save data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1631770105284.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/156204i3CAA392D26C35562/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1631770105284.jpeg" alt="Alice_Yang_0-1631770105284.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2) Initialize data to USB RAM:&lt;/P&gt;
&lt;DIV align="left"&gt;&lt;STRONG&gt;#include&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;"cr_section_macros.h"&lt;/DIV&gt;
&lt;DIV align="left"&gt;__DATA(RAM5) uint32_t array[10];&lt;/DIV&gt;
&lt;DIV align="left"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV align="left"&gt;3) You can check the address of “array”：&lt;/DIV&gt;
&lt;DIV align="left"&gt;&lt;BR /&gt;PRINTF("array address is %x\n",array);&lt;/DIV&gt;
&lt;DIV align="left"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV align="left"&gt;4） Also can printf the data of address 0x40102000:&lt;/DIV&gt;
&lt;DIV align="left"&gt;&lt;SPAN&gt;PRINTF("array is %x\n",*(uint32_t *)(0x40102000));&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I attached the test project to you, you can have a look.&lt;/P&gt;
&lt;P&gt;This project base on LPC55s69, the same method with LPC54628.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 06:02:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1341188#M46468</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-09-16T06:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1341448#M46469</link>
      <description>&lt;P&gt;Hi, Alice.&lt;/P&gt;&lt;P&gt;First off: Thank you for this quick reply. I opened this thread just before I finished work for the day and when I started today, your answer just sat there waiting for me. Perfect!&lt;/P&gt;&lt;P&gt;Then I unpacked the example and had a good look at it.&lt;/P&gt;&lt;P&gt;I tried your suggestions. I already had the USB_RAM section yesterday, labelled &lt;EM&gt;RAM3&lt;/EM&gt;. So I did&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#include "cr_section_macros.h"
__DATA(RAM3) uint32_t array[10];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in global scope. Later I did&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POWER_EnablePD(kPDRUNCFG_PD_RAM3);
array[0] = 0x01234567;
array[9] = 0x89abcdef;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then stepped through the code. The address of &lt;EM&gt;array&lt;/EM&gt; is correct:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hoberg_2-1631781998414.png" style="width: 263px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/156279i9EDC8D899B8F413C/image-dimensions/263x432?v=v2" width="263" height="432" role="button" title="hoberg_2-1631781998414.png" alt="hoberg_2-1631781998414.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But as you can see, all data is 0. In fact, all the USB_RAM is 0s. I tried omitting the &lt;EM&gt;POWER_EnablePD()&lt;/EM&gt; line but then instead of 0s I get all 0xFFFFFEFFs (i.e.: 4294967039s).&lt;/P&gt;&lt;P&gt;Seems to me like for some reason the USB_RAM section is not writable. Odd.&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;Garry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 09:06:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1341448#M46469</guid>
      <dc:creator>Garry_Hoberg</dc:creator>
      <dc:date>2021-09-16T09:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1342130#M46477</link>
      <description>&lt;P&gt;Hello Garry,&lt;/P&gt;
&lt;P&gt;Could you please share your project or a simple project that can reproduce your issue, I will check it on my side, thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 10:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1342130#M46477</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-09-17T10:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1371099#M46996</link>
      <description>&lt;P&gt;I'm afraid the hardware design is going to change such that it includes an external RAM and I won't pursue this route any longer.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 07:16:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1371099#M46996</guid>
      <dc:creator>Garry_Hoberg</dc:creator>
      <dc:date>2021-11-15T07:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use USB RAM as ordinary RAM?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1409254#M47824</link>
      <description>&lt;P&gt;you have to enable the usb ram clock:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_UsbRam1);&lt;/P&gt;</description>
      <pubDate>Sun, 06 Feb 2022 07:16:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-USB-RAM-as-ordinary-RAM/m-p/1409254#M47824</guid>
      <dc:creator>Kaisa</dc:creator>
      <dc:date>2022-02-06T07:16:48Z</dc:date>
    </item>
  </channel>
</rss>

