Accessing the external bus
Posted: Sun Apr 11, 2010 10:21 am
Hi All,
I have copied some code from the MOD5234 demo and tried to modify it for my memory configuration but I am not seeing the correct information on the logic analyser.
This is the code I used.
#define BASEADDRESS ( 0xA0000000 )
static volatile WORD *pDisplayCommand = ( WORD* ) (BASEADDRESS);
static volatile WORD *pDisplayData = ( WORD* ) (BASEADDRESS + 1);
My external device is on a 16 bit data bus. Here is the configuration I have used to setup the Chip select. I know this is working as I can see it on the logic analyser when I access that address but the databus is not correct. I have a feeling it is the above definition that is causing the issue. I can't find anything in the documentation on how to setup and use external memory other than the demo app I found.
sim.cs[2].csar = ( BASEADDRESS >> 16 );
sim.cs[2].cscr = 0x2180; // 0010 0001 1000 0000
sim.cs[2].csmr = 0x001F0001;
Cheers,
Dave...
I have copied some code from the MOD5234 demo and tried to modify it for my memory configuration but I am not seeing the correct information on the logic analyser.
This is the code I used.
#define BASEADDRESS ( 0xA0000000 )
static volatile WORD *pDisplayCommand = ( WORD* ) (BASEADDRESS);
static volatile WORD *pDisplayData = ( WORD* ) (BASEADDRESS + 1);
My external device is on a 16 bit data bus. Here is the configuration I have used to setup the Chip select. I know this is working as I can see it on the logic analyser when I access that address but the databus is not correct. I have a feeling it is the above definition that is causing the issue. I can't find anything in the documentation on how to setup and use external memory other than the demo app I found.
sim.cs[2].csar = ( BASEADDRESS >> 16 );
sim.cs[2].cscr = 0x2180; // 0010 0001 1000 0000
sim.cs[2].csmr = 0x001F0001;
Cheers,
Dave...