Yahoo Groups archive

Lpc2000

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

Thread

cant seem to use external sdram on phytec 2294

cant seem to use external sdram on phytec 2294

2005-02-07 by wunny83

Hi im new at this but im having trouble storing data to the adress 
0x81000000, while my program will run fine if internal memory is 
used.

Im using keil and uvision ulink with the gcc compiler.

I have set up the text start 0x80000000 and data start 0x81000000 in 
the linker while my top stack is 0x81010000 while I have tried many 
others because i dont know the exact value of the top stack for 
external memory; my linker script file is also se up properly.
I have also tried different memmap settings 0x02 and 0x03.

When debugging using ulink jtag, the variable that are initailized 
do not get values and eventually the pc will go to 0x00-0x14 range.

Everything works fine when using internal mem with data start 
0x40000000 and top stack 0x40004000

Thanks in advance

Wun

Re: [lpc2000] cant seem to use external sdram on phytec 2294

2005-02-07 by 42Bastian Schick

Hi

> I have set up the text start 0x80000000 and data start 0x81000000 in
> the linker while my top stack is 0x81010000 while I have tried many
> others because i dont know the exact value of the top stack for
> external memory; my linker script file is also se up properly.

Sure. Just post it so we might have a look at it.

Memory is ok ? You can write into the external RAM ?


> I have also tried different memmap settings 0x02 and 0x03.

Thats to the vectors only. I'd suggest leaving them in the internal RAM.

-- 
42Bastian Schick

Re: cant seem to use external sdram on phytec 2294

2005-02-07 by didier_edna

Hello,

I was having similar problems, trying to run code from the external
RAM. We are using the IAR environment, with a Macraigor clone
(chamelion from amontec). But the solution should be simular for you.

The solution I found was setting the PINSEL2 register to the correct
value for activating the address and data bus lines. The value I used
for the phytec board is 0x 0FE1 69EC (at address 0x E002 C014).

Then you have to set the BCFG1 register to 0x 2000 0400 (at address 0x
FFE0 0004), this to get the correct access to the RAM (zero waitstates
, ...).

In IAR you can do this in a macro file, so every time you upload the
executable, the registers are set to these values. Otherwise there is
no way of getting the executable in external RAM. I suppose there is a
simular way of working for KEIL. If not, you can use the 30 day trial
version of IAR (www.iar.com)

The same has to be done for the external periferals (eg when using the
on board ethernet controller), but for the corresponding CS register.

Hope this helps you,

Didier


--- In lpc2000@yahoogroups.com, "wunny83" <wunny83@y...> wrote:
Show quoted textHide quoted text
> 
> Hi im new at this but im having trouble storing data to the adress 
> 0x81000000, while my program will run fine if internal memory is 
> used.
> 
> Im using keil and uvision ulink with the gcc compiler.
> 
> I have set up the text start 0x80000000 and data start 0x81000000 in 
> the linker while my top stack is 0x81010000 while I have tried many 
> others because i dont know the exact value of the top stack for 
> external memory; my linker script file is also se up properly.
> I have also tried different memmap settings 0x02 and 0x03.
> 
> When debugging using ulink jtag, the variable that are initailized 
> do not get values and eventually the pc will go to 0x00-0x14 range.
> 
> Everything works fine when using internal mem with data start 
> 0x40000000 and top stack 0x40004000
> 
> Thanks in advance
> 
> Wun

Re: cant seem to use external sdram on phytec 2294

2005-02-07 by wunny83

Thank you for your help, I hadn't included                 
                LDR     R0, =PINSEL2
                LDR     R1, =PINSEL2_Val
                STR     R1, [R0]
in my startup file so PINSEL2 register was never activated.

Everything is working now thanks for your help.

Wun

--- In lpc2000@yahoogroups.com, "didier_edna" <didier_edna@y...> 
wrote:
> 
> Hello,
> 
> I was having similar problems, trying to run code from the external
> RAM. We are using the IAR environment, with a Macraigor clone
> (chamelion from amontec). But the solution should be simular for 
you.
> 
> The solution I found was setting the PINSEL2 register to the 
correct
> value for activating the address and data bus lines. The value I 
used
> for the phytec board is 0x 0FE1 69EC (at address 0x E002 C014).
> 
> Then you have to set the BCFG1 register to 0x 2000 0400 (at 
address 0x
> FFE0 0004), this to get the correct access to the RAM (zero 
waitstates
> , ...).
> 
> In IAR you can do this in a macro file, so every time you upload 
the
> executable, the registers are set to these values. Otherwise there 
is
> no way of getting the executable in external RAM. I suppose there 
is a
> simular way of working for KEIL. If not, you can use the 30 day 
trial
> version of IAR (www.iar.com)
> 
> The same has to be done for the external periferals (eg when using 
the
> on board ethernet controller), but for the corresponding CS 
register.
> 
> Hope this helps you,
> 
> Didier
> 
> 
> --- In lpc2000@yahoogroups.com, "wunny83" <wunny83@y...> wrote:
> > 
> > Hi im new at this but im having trouble storing data to the 
adress 
> > 0x81000000, while my program will run fine if internal memory is 
> > used.
> > 
> > Im using keil and uvision ulink with the gcc compiler.
> > 
> > I have set up the text start 0x80000000 and data start 
0x81000000 in 
> > the linker while my top stack is 0x81010000 while I have tried 
many 
> > others because i dont know the exact value of the top stack for 
> > external memory; my linker script file is also se up properly.
> > I have also tried different memmap settings 0x02 and 0x03.
> > 
> > When debugging using ulink jtag, the variable that are 
initailized 
> > do not get values and eventually the pc will go to 0x00-0x14 
range.
Show quoted textHide quoted text
> > 
> > Everything works fine when using internal mem with data start 
> > 0x40000000 and top stack 0x40004000
> > 
> > Thanks in advance
> > 
> > Wun

Re: cant seem to use external sdram on phytec 2294

2005-02-07 by leon_heller

--- In lpc2000@yahoogroups.com, "didier_edna" <didier_edna@y...> 
wrote:
> 
> Hello,
> 
> I was having similar problems, trying to run code from the external
> RAM. We are using the IAR environment, with a Macraigor clone
> (chamelion from amontec). But the solution should be simular for 
you.


Amontec gave me a Chameleon to try with my LPC2106 hardware, but I 
couldn't get it to work properly. Did you have any problems?

Leon

Re: cant seem to use external sdram on phytec 2294

2005-02-10 by didier_edna

Hello,

No problems, so far...

After installing the necesary drivers from the macraigor site,
programming the chameleon with the programmer from the amontec site
and connecting the cables to the phytec demo board, everything worked
fine with the IAR IDE (free 30 day trial version on the IAR site).

Are you trying to access the internal RAM on the correct address?

Kind regards,

Didier


--- In lpc2000@yahoogroups.com, "leon_heller" <leon.heller@d...> wrote:
Show quoted textHide quoted text
> 
> --- In lpc2000@yahoogroups.com, "didier_edna" <didier_edna@y...> 
> wrote:
> > 
> > Hello,
> > 
> > I was having similar problems, trying to run code from the external
> > RAM. We are using the IAR environment, with a Macraigor clone
> > (chamelion from amontec). But the solution should be simular for 
> you.
> 
> 
> Amontec gave me a Chameleon to try with my LPC2106 hardware, but I 
> couldn't get it to work properly. Did you have any problems?
> 
> Leon

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.