We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all, Do anyone has an idea regarding how i can access external sram. i am using LPC2468,Cpress 2MB External SRAM,Keil ARM (µvision3)compiler in my application.
when i am read/write data to onchip sram it works fine but when we try to access external Sram it shows access violation after debugging. the routine is as follows if anybody has an idea Pls. help me in this regards..
#define A0EXT_MEM 0x80000000 #define A0BLOCK_SIZE 512 Init_EMAC() { //configuring EMC PINSEL9 = 0x10550055 ;//A[19:16]/P4[19:16 & 31:30 & 27:24] enable CS0 ,BLS0,BLS1,WE,OE // select D0 -D15 //select A0- A19 } ReadFromSRAM { //Reading from the address 0x80000000(CS0) leads access violation no read permission for(i = 0 ; i < A0BLOCK_SIZE ; i += sizeof(unsigned int)){ data = *(unsigned int*)((unsigned int)&A0EXT_MEM + i); } } WriteToSram() { //Writing to the address leads access violation no write perission for(i = 0 ; i < A0BLOCK_SIZE ; i += sizeof(unsigned int)){ *(unsigned int*)((unsigned int)&A0EXT_MEM + i) = data; } } Regards Tripathi