Wolfgang Wegner

SDRAM Controller in MCF532x/537x - some questions

Discussion created by Wolfgang Wegner on Feb 8, 2007
Latest reply on Apr 27, 2007 by Wolfgang Wegner
Hi,

as my CPU is finally running, I am trying to initialize the board and set up Codewarrior/other tools to communicate with everything. Here I have problems initializing the SDRAM controller.

I can do this for the evaluation board (Cobra5329, SDRAM: K4M283233-HN75 mobile SDRAM) with a modified .cfg-File, containing the settings I found in the vendor-supplied dBug source code - but there is already a small difference that I do not understand:

Register SenTec my setting
SDCFG1 51211400 54211400
SDCFG2 54730000 dito
SDCR C0180002 dito
SDMR 008B0000 00890000
why is SWT2RWP so short and, much more dubious, why is bit 17 of SDMR set?
However, sdram access is working with both settings!

With my own board (MCF5373 with MT46H16M16LF-75 mobile DDR) I do not get a valid SDRAM initialization: as soon as I make the first access to SDRAM region after initialization, the debug communication gets stuck and I have to restart the TBLCF BDM pod (in fact, the first access gives a result, but after this the communication is not possible any more).

My configuration:

writemem.l 0xFC0B8110 0x40000018 ; SDCS0
writemem.l 0xFC0B8008 0x33611530 ; SDCFG1
writemem.l 0xFC0B800C 0x56570000 ; SDCFG2
; Issue PALL
writemem.l 0xFC0B8004 0xE1082002 ; SDCR
; Issue LEMR
writemem.l 0xFC0B8000 0x80010000 ; SDMR
; Write mode register
writemem.l 0xFC0B8000 0x008D0000 ; SDMR
; Wait a bit
delay 1000
; Issue PALL
writemem.l 0xFC0B8004 0xE1082002 ; SDCR
; Perform two refresh cycles
writemem.l 0xFC0B8004 0xE1082004 ; SDCR
writemem.l 0xFC0B8004 0xE1082004 ; SDCR
writemem.l 0xFC0B8000 0x008D0000 ; SDMR
; enable automatic refresh
writemem.l 0xFC0B8004 0x71082C00 ; SDCR

Another thing I do not understand: what happens with A12 during mode register accesses? It seems to be always "0", but I did not find anything about it in MCF5373 data sheet.

Thank you for reading and looking forward to any comments,
Wolfgang

PS: my hardware connections are as on the MCF5329-10 CARD ENGINE, which is the MCF5329 evaluation board, AFAIK

Outcomes