Using all SRAM in LPC4088

cancel
Showing results for 
Search instead for 
Did you mean: 

Using all SRAM in LPC4088

436 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kruftin on Wed Dec 16 22:47:43 MST 2015
Hi,

I'm try using all SRAM memory in LPC 4088.
SRAM divided on:
- 64 kB of Main SRAM on the CPU code/data bus for high-performance CPU
access.
- two 16 kB SRAM blocks with separate access paths for higher throughput.
These SRAM blocks may be used for Ethernet, USB, LCD, and DMA memory, as
well as for general purpose instruction and data storage.

In IAR I'm modify icf:
define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ROM_end__   = 0x0007FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x10000000;
define symbol __ICFEDIT_region_RAM_end__   = 0x1000FFFF;
define symbol __ICFEDIT_region_RAM2_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM2_end__   = 0x20003FFF;
define symbol __ICFEDIT_region_RAM3_start__ = 0x20004000;
define symbol __ICFEDIT_region_RAM3_end__   = 0x20007FFF;


define region RAM_region    = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__] | mem:[from __ICFEDIT_region_RAM2_start__   to __ICFEDIT_region_RAM2_end__] | mem:[from __ICFEDIT_region_RAM3_start__   to __ICFEDIT_region_RAM3_end__];

But If I use all SRAM my program periodically crashed in Hard Fault. If I use for my code only main SRAM block all works correctly. Could I use two 16kB SRAM blocks for my rw data?

Original Attachment has been moved to: LPC4088_Flash_SPIFI_1_copy.txt.zip

Labels (1)
0 Kudos
3 Replies

192 Views
frank_meyer
Senior Contributor II

I suspect your stack is too small, and an overflow causes your application to crash.

This might go unnoticed less RAM is used, and there is a gap between the assigned stack space and the used data space.

 

0 Kudos

200 Views
brkhanduri12
Contributor I

I am using LPC4088 some time my program reset, i cut not find the cause,

please help me.

0 Kudos

190 Views
frank_meyer
Senior Contributor II

I didn'r realize how old the original post is.

However, the hint still applies.

> I am using LPC4088 some time my program reset, i cut not find the cause, ...

This is a very superficial description of your problem, don't expect precise answers. No one here has a magic crystal ball.

 

0 Kudos