Hi!
I have a external SRAM ( CY7C1049CV33-15VXC ( 512K x 8) ) connected to: LPC2468 ---- SRAM P4.24 / OE = OE P4.25 / WE = WE P4.30 / CS0= CE P4.[0-18] / A0-A18 = Address of SRAM P3.[0-7] / D0-D7 = Data of SRAM
I tried to write a initialisation code, but i don't know how i can write and read into this SRAM.
I read from users manual that when use only CS0 the start memory address is 0x80000000. I tried from "Options for Target" menu "Read/Write Memorry Areas" -> RAM1 Off-chip Start:0x80000000 and Size: 0xffffff.. And "No init" isn't checked, "default" is checked. I tried to definite a char variable with the macro __at in the absacc.h (#include <absacc.h>).
char XRAM[524288] __at(0x80000000);
But don't works anything. My controller (LPC2468) blocks itself.
My SRAM is CY7C1049CV33-15VXC ( 512K x 8 bit). How i can write and read from this SRAM and must i write a initialisation code?
I'm using Keil uVision3.
My initialisation code is here:
void SRAMInit() { EMC_CTRL = 0x00000001; PCONP |= 0x00000800; // Turn On EMC PCLK // Configure EMC pins // Data Bus PINSEL6 = (1<<0)|(1<<2)|(1<<4)|(1<<6)|(1<<8)|(1<<10)|(1<<12)|(1<<14);//0x55555555; //D0-7 // Address Bus // P4.[0-18] -> A[0-18] ADDRESS PINSEL8 = (1<<0)|(1<<2)|(1<<4)|(1<<6)|(1<<8)|(1<<10)|(1<<12)|(1<<14)|(1<<16)|(1<<18)|(1<<20)|(1<<22)|(1<<24)|(1<<26)|(1<<28)|(1<<30);//0x00555555; PINSEL9 = (1<<0)|(1<<2)|(1<<4);//0x00010000; // Control Bus // OE PINSEL9 &=(~((1UL<<16)|(1UL<<17))); PINSEL9 |=(1UL<<16); // WE PINSEL9 &=(~((1UL<<18)|(1UL<<19))); PINSEL9 |=(1UL<<18); // CS0 PINSEL9 &=(~((1UL<<28)|(1UL<<29))); PINSEL9 |=(1UL<<28); EMC_STA_CFG0 = 0x80; EMC_STA_WAITWEN0 = 0x2; EMC_STA_WAITOEN0 = 0x2; EMC_STA_WAITRD0 = 0x1f; EMC_STA_WAITPAGE0 = 0x1f; EMC_STA_WAITWR0 = 0x1f; EMC_STA_WAITTURN0 = 0x0f; }
How can i use this SRAM fastly?
Please help me!
Regards Philip