LPC2468 external memories issues

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

LPC2468 external memories issues

771 Views
gablipinski
Contributor I

Hi all!  We've got an project with an LPC2468 microcontroller, with internal flash memory of 512kb. Some topics will be explainde in the following lines.

- The problem started when our products code got bigger than the internal flash capacity.

- To solve the problem, we made an new CPU project, using an external NOR memory, that was going to serve us as the main program memory. We are actually using the external RAM memory, the NAND and the NOR memory, all at the same time.

- The program uses the RTX RTOS, and we are currently using more than 32 actives tasks at the same time. - The system bootloader is beign executed on the first 5000 addresses of the internal flash (from address 0x0000 to address 0x5000) and the main programm is beign executed in the NOR memory (from address 0x80000000 to adderss 0x80100000).

When executing the firmware on the external NOR memory, the program start to be slow, the comunication interfaces (TCP, FTP, etc ....) start to be slow, the tasks start to crash, the watchdog begins to kill the program execuition, and it seems like the system wont work properly again. Any ideas, any clues, and is anybody facing the same problem, and could help us? Best regards.

2 Replies

676 Views
frank_m
Senior Contributor III

I would avoid such configurations.

Not sure if the ext. memory bus of the LPC2468 is 16 or 32 bit, bit it does not make too much difference. Instruction fetch on basically all modern Cortex M MCUs is 128 bits wide, often with an additional buffer (hidden cache) to make up for the wait times. This way, an MCU can run at 100...200MHz core clock speed, while the Flash actually runs with 25...40MHz. With the external bus interface, this advantage is lost. Thus the drastic differences in runtime, which crash the application either via interrupt runtimes, or task overlap due to mentioned runtime differences.

0 Kudos

686 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Gabriel,

Frankly speaking, the LPC2468 is a bit old, if you develop new project, I suggest you consider LPC546xx, LPC540xx family.

For the issue that the LPC2468 is slow when you run it in external NOR flash, I have to say it is complicated. Anyway, this is a clue, I do not guarantee it can solve your issue.

pls check the EMC module configuration so that the core can read code/data as fast as possible.

1)do not use extended mode by clearing the EMCStaticConfig0[Extended wait]=0

2)Try to reduce the bits in EMCStaticWaitTurn0[WAITTURN]

3)try to reduce the value in both  EMCStaticWaitRd0 and EMCStaticWaitOen0, sure that the EMCStaticWaitRd0 is greater than  EMCStaticWaitOen0.

Hope it can help you

BR

XiangJun Rong

 

0 Kudos