Hi Tom
Thanks for the advice. I went back and read section 18 in the ref manual.
I modified:-
1. the ADDR_MUX, it was 00 and needed to be 01 for 16M x 32 bit (13x9x4).
2. the CSMR0[BAM] & CSMS1[BAM] to 0x03FF for 64MB
3. Bit 17 of SDMR, it was being set and ref manual states its Reserved and must be cleared. Not sure what difference this would have made as the previous setup with 2 x 32MB worked.
With these changes I've had partial success, I can now R/W all 64M of the second SDRAMbut only the first 32MB of the first SDRAM from 0x40000000.
I am running a debug build using the iSystem blue box iC300HS. The file I modified was .ini file.
I shall continue looking into it.
Here's the file it has the original values commented out:-
================================================================
// Turn on RAMBAR at address 80000000
// MCF5329DE.pdf - RAMBAR cannot be read through BDM, returns 0x00000000
R RAMBAR L 0x80000221
// Set VBR to the beginning of what will be in internal SRAM
// MUST follow vector table from linker command file
R VBR L 0x80000000
// Set CACR = 0
// Disable cache
R CACR L 0x00000000
// Set ACR0 = 0x00000000
R ACR0 L 0x00000000
// Set ACR1 = 0x00000000
R ACR1 L 0x00000000
// Disable watchdog timer
A (0xFC098000) W 0x0000
// Init CS0
A (0xFC008000) L 0x00000000 //32MB & 64MB donot change this one
A (0xFC008008) L 0x000021A0 //32MB & 64MB
//A (0xFC008004) L 0x00FF0001 //32MB
A (0xFC008004) L 0x03FF0001 //64MB
P 100 // delay
// Init CS1
//A (0xFC00800C) L 0x10000000 //32MB
//A (0xFC008014) L 0x002A3780 //32MB
//A (0xFC008010) L 0x00FF0001 //32MB
A (0xFC00800C) L 0x20000000 //64MB
A (0xFC008014) L 0x000021A0 //64MB
A (0xFC008010) L 0x03FF0001 //64MB
// SDRAM Initialization
P 200 //delay 200
A (0xFC0A4065) B 0x3F // MSCR_SDRAM
//A (0xFC0B8110) L 0x40000017 // SDCS0 32MB?? 17 is 16MB
A (0xFC0B8110) L 0x40000019 // SDCS0 64MB
//A (0xFC0B8114) L 0x60000019 // SDCS1 64MB starting from 0x60000000
A (0xFC0B8114) L 0x44000019 // SDCS1 64MB string from 0x44000000
A (0xFC0B8008) L 0x61222A00 // SDCFG1
A (0xFC0B800C) L 0x53730000 // SDCFG2
// Issue PALL
//A (0xFC0B8004) L 0xC0120002 // SDCR 32MB
A (0xFC0B8004) L 0xC1120002 // SDCR 64MB
// Issue LEMR
//A (0xFC0B8000) L 0x008B0000 // SDMR 32MB
A (0xFC0B8000) L 0x00890000 // SDMR 64MB
// Write mode register
// A (0xFC0B8000) L 0x058D0000 // SDMR 32MB
P 1000 //delay 1000
// Issue PALL
//A (0xFC0B8004) L 0xC0120002 // SDCR 32MB
A (0xFC0B8004) L 0xC1120002 // SDCR 64MB
// Perform two refresh cycles
//A (0xFC0B8004) L 0xC0120004 // SDCR 32MB
//A (0xFC0B8004) L 0xC0120004 // SDCR 32MB
A (0xFC0B8004) L 0xC1120004 // SDCR 64MB
A (0xFC0B8004) L 0xC1120004 // SDCR 64MB
//A (0xFC0B8000) L 0x008B0000 // SDMR 32MB
A (0xFC0B8000) L 0x00890000 // SDMR 64MB
//A (0xFC0B8004) L 0x50120000 // SDCR 32MB
A (0xFC0B8004) L 0x51120000 // SDCR 64MB
P 100 //delay 100
==========================================================
regards
Jaswinder