LPC1817 with extended SPIFI Flash don't work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1817 with extended SPIFI Flash don't work

365 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Uwe99 on Mon Dec 02 05:14:40 MST 2013
Hi all,

I' ve changed my controller from LPC1830 with external SPIFI Flash (16M) to LPC1817 with the same external Flash.
The LPC1817 works fine, when I boot with SPIFI. Is works fine, wenn I boot from internal Flash.
But now I want to use the internal Flash for the program and the extenal SPIFI Flash for large constant, because my internal flash is not enough.

It dosn't work. I've included the spifi_drv_M3.lib.

I use Keil. You can see my scatter file:

LR_IROM1 0x1A000000 0x00080000  {    ; load region size_region
  ER_IROM1 0x1A000000 0x00080000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x10000000 0x00008000  {  ; RW data
   rt_memcpy_w.o(.text)
   .ANY (+RW +ZI)
  }
  RW_IRAM2 0x20000000 0x00010000  {
   .ANY (+RW +ZI)
   *spifi_drv_M3.lib (+RO +ZI +RW)   ; spifi library
  }
  RW_CODE  0x2000FF00 0x00000100{  ;
   *.o (RAMCODESECTION)              ; used for firmware update copy-function
  }


LR_IROM2 0x1B000000 0x00080000  {
  ER_IROM2 0x1B000000 0x00080000  {  ; load address = execution address
   .ANY (+RO)
  }
}

LR_ROM1 0x14000000 0x1000000  {    : EXTERNAL FLASH MEMORY
  ER_ROM1 0x14000000 0x1000000  { 
   *.o (FW_STATIC);                ; DeviceClass, SW+HW Number
   ;  screen_splashscreen.o(.constdata)
  }
}

I hope somebody can help me!!

Best regards
Uwe



Labels (1)
0 Kudos
3 Replies

288 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Uwe99 on Tue Dec 03 03:28:10 MST 2013
Thank you Noah!!!

it was the initialization of the SPIFI Ports !!!
Now it works fine. :)

Uwe
0 Kudos

288 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by noahk on Mon Dec 02 20:01:03 MST 2013
Hi Uwe,

Is it possible that the constants are being accessed before SPIFI is set up? The bootrom will only configure the SPIFI memory range if it is booting from the SPIFI peripheral. If the bootrom boots from another source then the SPIFI memory range is not configured and any access to the SPIFI memory range is aborted. Can you attempt to initialize the SPIFI from within SystemInit? Make sure that SystemInit keeps all of its memory in internal FLASH and SRAM so as to not abort while trying to set the SPIFI up.

I downloaded the IAR/EWARM/Keil MDK-ARM version of LPCOpen 2.02 for the NGX Xplorer LPC1830 board from this page:
http://www.lpcware.com/content/nxpfile/lpcopen-platform
Direct link: http://www.lpcware.com/system/files/lpcopen_v2_02_keil_iar_ngx_xplorer_1830.zip

In that package there is a project called spifi_prog:
applications\lpc18xx_43xx\keil_uvision_projects\hitex_eva_1850\misc\spifi_prog\
The source used is here:
applications\lpc18xx_43xx\examples\misc\spifi_prog\

That project should give a decent example for how to call spifi init in your program. From there you should be able to call set_mem_mode to put SPIFI into memory mode. At that point, reads in the SPIFI memory range should work.

Let me know if you run into any issues.

Noah
0 Kudos

288 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Mon Dec 02 15:34:17 MST 2013
Hi Uwe99,
Could you please also post map file?

0 Kudos