coldfire 5235 and SDRAM problem

Hi, we have a board with MCF5235 coldfire connected to a

128Mbit Sdram (ELPIDA EDS1216AGTA 8M words x 16 bit) chip. It is connecte with the following configurations: 16-bit Port,9-Column Address MCF5235 Pin - A16 A15 A14 A13 A12 A11 A10 A9 A18 A19 A20 A21 A22 A23 SDRAM Pin - A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 BA0 BA1 where BA0,BA1 are the Bank Select Addresses We currently face a problem when reading and writing to SDRAM using the Pemicro ICDCFZ_PRO BDM debugger. We have configured the SDRAM memory space to start from 0x10000000 t 0x10FFFFFF. We have no problem reading and writing to the first half of that memor space (0x10000000 to 0x107fffff). But when we try to write to to the 2nd half of that memor space(0x10800000 to 0x10ffffff), this is what happened: when we write a byte to 0x10800000, another location 0x10800008 get written with the same value. when we write a byte to 0x10800001, another location 0x10800009 get written with the same value. when we write a byte to 0x10800002, another location 0x1080000A get written with the same value. when we write a byte to 0x10800003, another location 0x1080000B get written with the same value. when we write a byte to 0x10800004, another location 0x1080000C get written with the same value. when we write a byte to 0x10800005, another location 0x1080000D get written with the same value. when we write a byte to 0x10800006, another location 0x1080000E get written with the same value. when we write a byte to 0x10800007, another location 0x1080000F get written with the same value. when we write a byte to 0x10800008, another location 0x10800000 get written with the same value. when we write a byte to 0x10800009, another location 0x10800001 get written with the same value. when we write a byte to 0x1080000A, another location 0x10800002 get written with the same value. when we write a byte to 0x1080000B, another location 0x10800003 get written with the same value. when we write a byte to 0x1080000C, another location 0x10800004 get written with the same value. when we write a byte to 0x1080000D, another location 0x10800005 get written with the same value. when we write a byte to 0x1080000E, another location 0x10800006 get written with the same value. when we write a byte to 0x1080000F, another location 0x10800007 get written with the same value. when we write a byte to 0x10800010, another location 0x10800018 get written with the same value. ...... and so on....... This problem seems to appear only in the 2nd half of the SDRAM memor space. We are puzzled as to what could have caused it to behave this way Hope someone could give us some answers. Thanks in advance! Mun Lai
Reply to
wmunlai
Loading thread data ...

way.

Hi, Correction to my earlier post: It seems that the error also occurs in th

1st half of memory space.

For example, if I write to the last location at 0x10ffffff, the las location in the 1st half of memory space(at 0x107fffff) also get written.

Does this look like a wiring problem to you?

We are testing with PEmicro's ICDCFZ BDM debugger. Here is a script tha we use to initialise our board:

;;;;;;;;Clock module Chapter 7 ;Crystal Frequency = 25MHz ;Sets the Core Frequency = 10 * 13.56MHz =135.6MHz ;Internal Bus Frequency = 67.8MHz MM.L 0x40120000 0x03000000 DELAY 100

;;;;;;;;GPIO module Chapter 12 ;A[23:21] pin configured for address bit 23-21 ;D[15:0] pins configured for data 15-0 functions MM.B 0x40100040 0xE0

;Only CS1 pin is configured for CS function ;The rest of CS pins are used for GPIO functions MM.B 0x40100045 0x02

;SD_WE pin configured for SDRAMC WE function ;SD_CAS pin configured for SDRAMC CAS function ;SD_SRAS pin configured for SDRAMC SRAS function ;SD_CKE pin configured for SDRAMC CKE function ;SD_CS pin configured for SDRAMC CS function ;CS2 abd CS3 are NOT configured for SDRAMC function MM.B 0x40100046 0x3F ;;;;;;;;;; SDRAM module Chapter 18 ;Refresh Timing = 3 clocks ;Refresh Count = 0x46 MM.W 0x40000040 0x0041

;set RAM base address to 0x01000000 ;CBM set to 3 ;CASL set to bit value 01 ;set Port Size 32 bit MM.L 0x40000048 0x10001320

;set RAM base address mask to allow for 16M range ;set bit V to initialize registers controlling DRAM block MM.L 0x4000004C 0x00fc0001

;set IP bit to initiate Precharge All command MM.L 0x40000048 0x10001328 DELAY 1

; Write to SDRAM to initiate precharge MM.W 0x10000000 0xA596

MM.L 0x40000048 0x10009320 DELAY 1

; Turn On Refresh Enable bit MM.L 0x40000048 0x10009360

MM.W 0x10000800 0xBABE MM.l 0x40000048 0x10009320

Reply to
wmunlai

Have you tried this on different boards? You might be looking at a simple hardware fault on the card (address lines either not connected, or short-circuited to something else). You'd probably experience similar effects if you had trouble with address lines A3 and A21 (if I've interpreted your values correctly). Use a scope to watch these lines to see if they change correctly, or try a different board.

Reply to
David Brown

Hi David,

u are right! It was really a wiring problem.

Thanks for the advice! Mun Lai

connected

A23

BA1

memory

way.

Reply to
wmunlai

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.