<?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中的主题 LPC1788 lcd controller configuration：How to configure LCD_VRAM_BASE_ADDR</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1463613#M48904</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi，&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In the project,&amp;nbsp; LPC1788 use external SDRAM as framebuffer to&amp;nbsp;drive TFT-LCD(320 x 240)。In the routines(LCD) ,there is a code snippet description：&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;#define LCD_VRAM_BASE_ADDR ((unsigned long)SDRAM_BASE + &lt;FONT color="#FF0000"&gt;0x00010000&lt;/FONT&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; // Frame Base Address doubleword aligned&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LPC_LCD-&amp;gt;UPBASE = LCD_VRAM_BASE_ADDR &amp;amp; ~7UL ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LPC_LCD-&amp;gt;LPBASE = LCD_VRAM_BASE_ADDR &amp;amp; ~7UL ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Now I have a confusion about the address setting，why address offset is&amp;nbsp;&lt;FONT color="#FF0000"&gt;0x00010000。What is the consideration of this offset setting?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2022 02:25:11 GMT</pubDate>
    <dc:creator>Mrzhong</dc:creator>
    <dc:date>2022-05-25T02:25:11Z</dc:date>
    <item>
      <title>LPC1788 lcd controller configuration：How to configure LCD_VRAM_BASE_ADDR</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1463613#M48904</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi，&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In the project,&amp;nbsp; LPC1788 use external SDRAM as framebuffer to&amp;nbsp;drive TFT-LCD(320 x 240)。In the routines(LCD) ,there is a code snippet description：&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;#define LCD_VRAM_BASE_ADDR ((unsigned long)SDRAM_BASE + &lt;FONT color="#FF0000"&gt;0x00010000&lt;/FONT&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; // Frame Base Address doubleword aligned&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LPC_LCD-&amp;gt;UPBASE = LCD_VRAM_BASE_ADDR &amp;amp; ~7UL ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LPC_LCD-&amp;gt;LPBASE = LCD_VRAM_BASE_ADDR &amp;amp; ~7UL ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Now I have a confusion about the address setting，why address offset is&amp;nbsp;&lt;FONT color="#FF0000"&gt;0x00010000。What is the consideration of this offset setting?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 02:25:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1463613#M48904</guid>
      <dc:creator>Mrzhong</dc:creator>
      <dc:date>2022-05-25T02:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 lcd controller configuration：How to configure LCD_VRAM_BASE_ADDR</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1464147#M48922</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201281"&gt;@Mrzhong&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you specify what project you are using? Are you using an LPCOpen example code? Where did you find this code snippet?&lt;/P&gt;
&lt;P&gt;Most likely, this is to offset the address into the correct section of the memory map. Please look into section 2.1 of the User Manual for more information on peripheral addressing:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=UM10470" target="_blank"&gt;https://www.nxp.com/webapp/Download?colCode=UM10470&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 18:08:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1464147#M48922</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2022-05-25T18:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 lcd controller configuration：How to configure LCD_VRAM_BASE_ADDR</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1464488#M48927</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;Hi，&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In LPCOpen example code, I didn't find example about LCD.In the website：&lt;A href="https://www.embeddedartists.com/products/lpc1788-developers-kit/，" target="_blank" rel="noopener"&gt;https://www.embeddedartists.com/products/lpc1788-developers-kit/&lt;/A&gt;there is an example s_display_truly_lcd_32 in lpc1788_samples_150612 software resources. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In this example code，&lt;SPAN&gt;there is a code snippet description in sdram.h&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp; &lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define SDRAM_SPEED SDRAM_SPEED_60 &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define SDRAM_CONFIG_32BIT&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define SDRAM_SIZE 0x2000000&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define SDRAM_BASE 0xA0000000&amp;nbsp; &amp;nbsp; /*CS0*/&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Chapter 2: LPC178x/7x Memory map,&amp;nbsp; 0xA000 0000 - 0xAFFF FFFF is&amp;nbsp; Dynamic memory chip select 0 (up to 256MB).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; We use&amp;nbsp; RGB888 color depth and put framebuffer in external SDRAM。In the main.c ,&amp;nbsp;&lt;SPAN&gt;there is a code snippet description&amp;nbsp; about&amp;nbsp; framebuffer:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;EM&gt;&amp;nbsp; &amp;nbsp; &lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp;#define DISPLAY_WIDTH 240&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define DISPLAY_HEIGHT 320&lt;/EM&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int32_t framebuf = (int32_t)(SDRAM_BASE+&lt;FONT color="#FF0000"&gt;0x10000&lt;/FONT&gt;);&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sdram_init();&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memset((void*)(framebuf), 0x00, 240*320*2);&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*dev_lcd = */truly_lcd_open(framebuf);&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fblog = (COLOR_T*)framebuf;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Combined with other example code related LCD ,&amp;nbsp; the&amp;nbsp;framebuffer&amp;nbsp; was always setted&amp;nbsp; equal&amp;nbsp; to&amp;nbsp;SDRAM_BASE&amp;nbsp; plus&amp;nbsp;&amp;nbsp;&lt;FONT color="#FF0000"&gt;0x10000&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt;no mater what&amp;nbsp; the&amp;nbsp;resolution of LCD&amp;nbsp; is, such as 240x320, 480 x 272.&amp;nbsp;My confusion is why not use&amp;nbsp;SDRAM_BASE&amp;nbsp; as the beginning address of frambuffer?&amp;nbsp;In this scenario, the offset&amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;0x10000&lt;/FONT&gt; is a fixed value or a random value?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 05:45:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1788-lcd-controller-configuration-How-to-configure-LCD-VRAM/m-p/1464488#M48927</guid>
      <dc:creator>Mrzhong</dc:creator>
      <dc:date>2022-05-26T05:45:57Z</dc:date>
    </item>
  </channel>
</rss>

