I'm having some problems with the static memory controller. Eventually, I need to read from our own CPLD on our target board. For now, I'm using the zoom development board with LOLO. This is essentially the sequence of code I'm trying to execute:
#include "lh7a400_smc.h"
#include "lh7a400_chip.h"
typedef unsigned short UINT16;
UINT16* xdata = (UINT16*)SMC_CS3_BASE; //SMC_CS3_BASE defined as 0x30000000
UINT16 data;
gpio_sclke_select(GPIO_NO_SCLKE);
SMC->bcr3 = 0x00000000;
SMC->bcr3 |= 0x10000827; //16 bit data, 1 wait state
//execute this in main()
data = *xdata;
Whenever the statement "data = *xdata" is executed, my progrm hangs. The chip select doesn't go low, the address lines don't change either when I probe the signals on an oscilloscope.
Any ideas?
thanks,
Yujie
|