[En-Nut-Discussion] Additional 4kB ext SRAM to a heap

Dusan Ferbas dferbas at dfsoft.cz
Sun Oct 26 21:25:39 CET 2003


Hi,

I wrote just a first application on Ethernut. I read in ATmega128 datasheet 
an idea how to dig additional 4kB space from external SRAM if 32kB is used. 
Has anyone an experience with this ?

---
According to description in ATmega128 datasheet on page 31 higher addresses 
than 0x7FFF can be used if address bit 15 is not used. MCU send address to 
SRAM and lowest 4kB is decoded from that chip (in fact 0x10FF - 4352 bytes).

So setting XRAMEND (os/nutinit.c) to 0x90FF is all magic needed for extra 
heap space ?

-----------
Using all Locations of External Memory Smaller than 64 KB Since the 
external memory is mapped after the internal memory as shown in Figure 11, 
the external memory is not addressed when addressing the first 4,352 bytes 
of data space. It may appear that the first 4,352 bytes of the external 
memory are inaccessible (external memory addresses 0x0000 to 0x10FF). 
However, when connecting an external memory smaller than 64 KB, for example 
32 KB, these locations are easily accessed simply by addressing from 
address 0x8000 to 0x90FF. Since the External Memory Address bit A15 is not 
connected to the external memory, addresses 0x8000 to 0x90FF will appear as 
addresses 0x0000 to 0x10FF for the external memory. ...

Thanks for advice

Dusan Ferbas
www.dfsoft.cz 




More information about the En-Nut-Discussion mailing list