Hi Mike,
I finally got my SEMC with SRAM to work for my application. I was missing a critical step which was setting the pin D7 gpio for SEMC_CSX01.
Although it is working now, I am still not sure of the address mapping involved with SEMC SRAM. Currently, I am using the address lines A16, A17, and A18 as enables for my external latches. I thought that I could use address mapping to set A16, A17, and A18 low or high depending on what I want. For example, if I want to set A18 as high while leaving all the other address line signals low, I would access 0xA0040000. Likewise for A17, 0xA0020000, and A16, 0xA0010000.
This method is not working. I believe it has to do with the address mapping. Currently, I have found that accessing these addresses will fire off the corresponding address bits:
//#define BUTTON (*(volatile unsigned short *)(0xA0000000)) //A0/16, A1/17, and A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA00C7100)) //A0/16 high and A1/17, A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA004FA00)) //A1/17 high and A0/16, A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA009F400)) //A2/18 high and A0/16, A1/17 low
//#define BUTTON (*(volatile unsigned short *)(0xA0116B00)) //A0/16, A1/17 high and A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA0166500)) //A0/16, A2/18 high and A1/17 low
//#define BUTTON (*(volatile unsigned short *)(0xA00EEE00)) //A1/17, A2/18 high and A0/16 low
//#define BUTTON (*(volatile unsigned short *)(0xA01B5F00)) //A0/16, A1/17, and A2/18 high
I thought it should be like so:
//#define BUTTON (*(volatile unsigned short *)(0xA0000000)) //A0/16, A1/17, and A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA0010000)) //A0/16 high and A1/17, A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA0020000)) //A1/17 high and A0/16, A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA0040000)) //A2/18 high and A0/16, A1/17 low
//#define BUTTON (*(volatile unsigned short *)(0xA0030000)) //A0/16, A1/17 high and A2/18 low
//#define BUTTON (*(volatile unsigned short *)(0xA0050000)) //A0/16, A2/18 high and A1/17 low
//#define BUTTON (*(volatile unsigned short *)(0xA0060000)) //A1/17, A2/18 high and A0/16 low
//#define BUTTON (*(volatile unsigned short *)(0xA0070000)) //A0/16, A1/17, and A2/18 high
How is address mapping configured in the SEMC SRAM? Is there an option to make it linear so that it directly corresponds with the address bits?
