Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: External memory access

2005-07-02 by lpc_2294

Hello all,

Sonny, thanks for the hint.

I tried to start the project and IAR doesn't recognize it at a valid
project.

I created a new project with IAR and I took care to include all the
files of the project (*.c and *.h) at the root of the new project.

I got 100 errors and 33 warnings, when I was looking into the files, I
saw many definition in the main.c that were nowhere in the files (*.c
and *.h) involved in the project.

I found weird the fact that 2114 files are necessary for a 2294.

Does anybody successfuly compiled this project ?


--- In lpc2000@yahoogroups.com, "sonny945852001" <icruz@s...> wrote:
> Go to www.sparkfun.com, click on the 2294 and there is a demo
> (includes source code) that shows read/write external flash,
> read/write external ram.
> 
> Sonny
> 
> 
> --- In lpc2000@yahoogroups.com, "lpc_2294" <lpc_2294@y...> wrote:
> > 
> > Hello all,
> > 
> > I recently purchased an Olimex LPC - H2294 board with 1MB External
> > SRAM and 4 MB External Flash.
> > 
> > I have the following problem :
> > 
> > I can't access to the External SRAM memory to write or read into it.
> > 
> > I know that the start addresses of both SRAM are :
> > 
> > Internal SRAM       0x40000000
> > External SRAM       0x81000000
> > 
> > I know that I have to set the EMC controller but I don't know how.
> > 
> > I would like to know if somebody know how to do this.
> > 
> > I would like to do the same application as below with :
> > 
> > SRAM_BASE     0x81000000    
> > 
> > instead of
> > 
> > SRAM_BASE     0x40000040
> > 
> > I am using the Rowley CrossStudio Evaluation version, I wrote the
> > following program and it works well in the Internal 16K SRAM of the
> > LPC2294.
> > 
> > The following code do :
> > 
> > pointer address initialisation
> > 
> > copy integers from 0 to 15 in the internal SRAM
> > 
> > do the sum of these integers and copy this value to the pointer
result.
> > 
> > /*
> > 
> >     LPC2294 Internal 16K SRAM Testing
> > 
> > */
> > 
> > #include <targets/lpc22xx.h>
> > 
> > #define     SRAM_BASE     0x40000040
> > #define     RESULT        0x400000A0
> > 
> > int *sramIptr = (int *)SRAM_BASE;
> > int *result   = (int *)RESULT;
> > 
> > int main(void){
> > 
> >   int i;
> >   int sum = 0;
> > 
> >   sramIptr = (int *)SRAM_BASE;
> > 
> >   for(i = 0; i < 16; i++){
> >     
> >     *sramIptr++ = i;
> > 
> >   }
> > 
> >   sramIptr = (int *)SRAM_BASE;
> > 
> >   for(i = 0; i < 16; i++){
> >     
> >     sum += *sramIptr++;
> > 
> >   }
> > 
> >   result   = (int *)RESULT;
> > 
> >   *result = (int)sum;
> > 
> >   while(1);
> > 
> >   return 0;
> > }

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.