(LPCLink-2) Trouble setting up SPIFI while running application from external Flash

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

(LPCLink-2) Trouble setting up SPIFI while running application from external Flash

718 Views
cheuschkel
Contributor III

This is more of a fundamental question, so please feel free to correct me if I'm wrong in my understanding.

As of now I cannot set up SPIFI to read/write data when my application is running from the same external Flash on the LPCLink-2. 

Specifically, I am getting stuck when trying to write to the SPIFI CMD register in spifilib_chiphw.h:

static INLINE void spifi_HW_SetCmd(LPC_SPIFI_CHIPHW_T *pSpifi, uint32_t cmd)

I'm using IAR with the default linker script to load my application into external Flash (iar_linker_scripts\lpc18xx_43xx_spifi_heap.icf) on the LPCLink-2.  I am trying to set up my SPIFI peripheral so that I can access my own section of Flash to read/write data.  In the linker file, the code section is set up as follows:

define symbol __ICFEDIT_region_ROM_start__ = 0x14000140;

define symbol __ICFEDIT_region_ROM_end__   = 0x140FFFFF;

So my basic question is: can I set up SPIFI and access data stored in 0x14100000?  Thanks in advance.

Labels (2)
0 Kudos
2 Replies

483 Views
cheuschkel
Contributor III

See my post here for an answer to the problem:

https://community.nxp.com/message/828579 

0 Kudos

483 Views
cheuschkel
Contributor III

I suppose another approach would be:

How should I go about relocating my application and the SPIFI library code to RAM?  I read the FAQ Relocating code from FLASH to RAM | www.LPCware.com but that really only applies to projects using LPCXpresso.  I am locked into using IAR for this project.

0 Kudos