<?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>topic Re: SPIFI reading in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-reading/m-p/545759#M13124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Quiggers on Mon Feb 29 03:18:15 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We had a similar issue, the red and blue bytes were swapped when read by the LPC, by changing our filler to BGR instead of RGB we fixed this. its not elegant but it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:29:58 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:29:58Z</dc:date>
    <item>
      <title>SPIFI reading</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-reading/m-p/545758#M13123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lintovincent88 on Mon Feb 08 05:11:48 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi nxp,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i am currently working with a project using spifi for saving images in to my external flash. i saved the images to flash from sdcard. at the beginning it works fine. when we declare more variables the&amp;nbsp; RGB data is shifted ,while reading from flash.Flash memory is spansion S25FL127S.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i use the following code to read from flash memory.(WC_A=0x28136000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pSpifiHandle = spifiInitDevice(&amp;amp;lmem, sizeof(lmem), LPC_SPIFI_BASE,SPIFLASH_BASE_ADDRESS);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevSetMemMode(pSpifiHandle, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;send_image_data(BUFFER1,0,0,480,272,WC_A); //this function reads the data from flash and sent to ssd1963 controller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/*send image data function*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void send_image_data(uint16_t mem_location,uint16_t x_cord,uint16_t y_cord,uint16_t img_width,uint16_t img_hieght,unsigned char *img_data )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint64_t i=0,x,y,z=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint16_t x_start_cord,x_end_cord,y_start_cord,y_end_cord,hieght,width;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint8_t flag=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;x_start_cord = x_cord;//x_cord-1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x_end_cord = x_cord+img_width-1;//x_cord+img_width-2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;y_start_cord = y_cord + mem_location;//y_cord-1 + mem_location;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;y_end_cord = y_cord+mem_location+img_hieght-1;//y_cord+img_hieght-2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hieght =img_hieght;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;width= img_width;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WindowSet(x_start_cord,x_end_cord,y_start_cord,y_end_cord);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;write_command(0x2C);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for (y=0;y&amp;lt;hieght;y++)//272&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (x=0;x&amp;lt;width;x++)//480&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i= z*3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;send_pixel((img_data[i+2]&amp;lt;&amp;lt;16)|(img_data[i+1]&amp;lt;&amp;lt;8)|(img_data&lt;/SPAN&gt;&lt;I&gt;));&lt;BR /&gt;&lt;BR /&gt;z++;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;every time reading from flash i use these functions.&lt;BR /&gt;&lt;BR /&gt;pSpifiHandle = spifiInitDevice(&amp;amp;lmem, sizeof(lmem), LPC_SPIFI_BASE,SPIFLASH_BASE_ADDRESS);&lt;BR /&gt;spifiDevSetMemMode(pSpifiHandle, true);&lt;BR /&gt;&lt;BR /&gt;is it because of using this functions&amp;nbsp; repeatedly??&lt;BR /&gt;&lt;BR /&gt;please advice. am attaching the original and shifted RGB data image. &lt;BR /&gt;&lt;BR /&gt;thanks and regards &lt;BR /&gt;&lt;BR /&gt;Linto&lt;/I&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:29:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-reading/m-p/545758#M13123</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: SPIFI reading</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-reading/m-p/545759#M13124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Quiggers on Mon Feb 29 03:18:15 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We had a similar issue, the red and blue bytes were swapped when read by the LPC, by changing our filler to BGR instead of RGB we fixed this. its not elegant but it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:29:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-reading/m-p/545759#M13124</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:29:58Z</dc:date>
    </item>
  </channel>
</rss>

