AnsweredAssumed Answered

mcf54415 ddr2 config

Question asked by Angelo Dureghello on Apr 25, 2017
Latest reply on May 4, 2017 by Angelo Dureghello

Dear all,

 

i am trying to initialize a ddr2 connected to mcf5441x. It's a prototype custom board so i may have hardware issues too.

 

in a start.s i have the following code:

 

general init here....

move.l        #PPMCR0, %a1

#ifdef CONFIG_DDR    
/* CD46 = DDR */
move.b     #46, (%a1)

/* dddr2 drive strength settings */
move.l     #MSCR_SDRAMC, %a1    
move.b     #1, (%a1)    

/* use vco instead of cpu*2 clock for ddr clock */    
move.l     #MISCCR2, %a1    
move.w     #0xe01d, (%a1)     /* DDR settings */
   
move.l     #DDR_RCR, %a1    
move.l     #0x00000000, (%a1)     <------ program crash here
move.l     #0x40000000, (%a1)

move.l     #DDR_PADCR, %a1   
move.l     #0x01030203, (%a1)       
....................

 

I am executing step by step some init code (BDM step) but once i set DDR_RCR, the program crash and

jumps to 0x10000

 

=> 0x800017aa <_start+54>: movel #0,%a1@
(gdb) 53-thread-info
53^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x800017aa",func="_start",args=[],file="src/start.S",fullname="/home/angelo/archivio/aziende/sysam/firmware/m68k-apps/cf64k/src/start.S",line="166"},state="stopped"}],current-thread-id="1"
(gdb) 54-stack-list-frames --thread 1 0 21
54^done,stack=[frame={level="0",addr="0x800017aa",func="_start",file="src/start.S",fullname="/home/angelo/archivio/aziende/sysam/firmware/m68k-apps/cf64k/src/start.S",line="166"}]
(gdb) 55-exec-step-instruction
55^running
1: x/i $pc
=> 0x10000: .short 0x0001

I use linux / gdb / openocd for debug, but with P&E tools from windows i get the same exact error.

 

Every help really appreciated,

thanks

angelo

Outcomes