Initial procedure about EP9302

Hi all,

I am working on a olimix cs-ep9302 board with openOCD. Now I am trying to figure out the initial procedure of the board. After the on-chip rom finish its initial procedure and turn up grn led at instruction 0x80090064. I would like to perform mine initial routine to make the external flash and SDRAM work properly. I followed the ep9301 manual and initial my board using telnet console script like this:

configure static memory chip select 6 (SMCBCR6)

mww 0x80080018 0x1000ffe1

#*****************

configure SDRAM

#*****************

#config the SDRAMDevCfg3

#keep the value as default

mww 0x8006001c 0x00210028

sleep 100

#Set GIconfig to issue continuous NOP commands

#Initial-1 MRS-1 LCR-0

mww 0x80060004 0x80000003

sleep 200

#Set CIconfig to issue a precharge all command

#Initial-1 MRS-0 LCR-0

mww 0x80060004 0x80000001

#Write 10 into refresh timer register and wait at least 80 clock cycle

mww 0x80060008 0x10

sleep 100

#Program the refresh counter to normal operating value

#64ms refresh rate

mww 0x80060008 0x000002f0

#Program GIconfig register to update mode and perform read from each SDRAM

#Initial=0 MRS=1

mww 0x80060004 0x80000002

mdw 0xc0000000

mdw 0xd0000000

mdw 0xe0000000

#Program the device configuration registers with parameters corresponding to

#those programmed inot the sdram devices mode register

mww 0x8006001c 0x0021002c

#clear GIconfig register and set to normal operation

#initial=MRS=LCR=0

mww 0x80060004 0x80000000

script end*

Thing confused me:

first, the ep9301 manual described the initial procedure about SDRAM controller. in the step 9(page 316), select the mode register update mode(Initialise=0,MRS=1), and perform a READ from each SDRAM in memory system…; dose it mean that i should issue command like “mdw 0xc00000000” and same for 0xd0000000 to 0xf0000000? My on-board SDRAM is Intel ‘JS28F128J3D75’.

second, dose anyone could explain me a little about the necessary initialization should be done to make this board functional normally. Things like read or write from SDRAM and Flash etc. currently, I only initial the board static memory, the clock, the SDRAM. do those enough or I need to do something else.

sincerely

N

after the current initial procedure, the SDRAM only accept data in its odd byte and dose not retain data correctly.

for example:

mww 0xc0000000 0x1234abcd

mdw 0xc0000000

0xc0000000: 12341234 12341234 …

mdw 0xc0000000

0xc0000000: 1234ffff 1234ffff 1234ffff