H-JTAG에서 init script는
단순하게 프로그램을 올리기 직전에 올려지는 테스트 코드가 아닌
해당 프로세서를 초기화 하는 코드로 생각이 된다.

아무튼.. SDRAM IF를 사용하도록 초기화 코드를 찾아야 하는데
레지스터 기반이라.. 하아.. memory map부터 좀 찾아 봐야겠다 ㅠㅠ

[INIT_TRITON_RAM]
memory write 0x48000008 0x12DC24D8          ; MSC0 = 0x26F226F2
memory read 0x48000008                      ; read MSC0
memory write 0x4800000C 0x7FF07FF0          ; MSC1 = 0x3FF4A441
wait  10
memory write 0x48000010 0x7FF07FF0          ; MSC2 = 0x00007FF0
wait  10
memory write 0x48000004 0x00000018          ; MDREFR = 0x00000018
memory write 0x4800001C 0x00000000          ; SXCNFG = 0x00000000
memory write 0x48000004 0x00010018          ; MDREFR = 0x00010018
wait  10
memory write 0x48000004 0x0009C030          ; MDREFR = 0x000BC018
memory write 0x48000000 0x00000AA8          ; MDCNFG = 0x00000AA8
wait  100
memory write 0x48000000 0x00000AAD          ; MDCNFG = 0x00000AA9
memory write 0x48000040 0x00220032          ; MDMRS = 0x00220032
 
[링크 : http://download.ronetix.info/peedi/cfg_examples/xscale/pxa255.cfg] << init code(makefile?) 


[링크 : http://www.fairwayacademy.org/.../latest-on-openocd-and-pxa255-sdram-initscript/]

# pxa255.scr - openOCD script to initialize system and local SDRAM to greatly
# aid performance whilst flashing and dumping meomory.
#-----------------------------------------------------
# setup GPIO
#
#mww 0x40E00018 0x00008000 ;CPSR0
#mww 0x40E0001C 0x003FAB82 ;GPSR1
#mww 0x40E00020 0x0001C000 ;GPSR2
#mww 0x40E00024 0x000B2150 ;GPCR0
#mww 0x40E00028 0xFCC00050 ;GPCR1
#mww 0x40E0002C 0x00003FFF ;GPCR2
#mww 0x40E0000C 0xC38BA150 ;GPDR0
#mww 0x40E00010 0xFCFFABD2 ;GPDR1
#mww 0x40E00014 0x0001FFFF ;GPDR2
#mww 0x40E00054 0x80011004 ;GAFR0_L
#mww 0x40E00058 0xA51A800A ;GAFR0_H
#mww 0x40E0005C 0x69908018 ;GAFR1_L
#mww 0x40E00060 0xAAA5AAAA ;GAFR1_H
#mww 0x40E00064 0xAAAAAAAA ;GAFR2_L
#mww 0x40E00068 0x00000002 ;GAFR2_H
#mww 0x40F00004 0x00000030 ;PSSR# setup memory controller
# Local tweaks here for Falcon II board
# This board uses 2 13x9 sdrams for a 32 bit wide data bus#msc1
mww 0x4800000C 0x3FC43FCC
#msc0
mww 0x48000008 0x3FC423F2
#msc1
mww 0x4800000C 0x3FC43FCC
#msc2
mww 0x48000010 0x3FC43FC4
#mecr
mww 0x48000014 0x00000000
#mcmem0
mww 0x48000028 0x00010504
#mcmem1
mww 0x4800002C 0x00010504
#mcatt0
mww 0x48000030 0x00010504
#mcatt1
mww 0x48000034 0x00010504
#mcio0
mww 0x48000038 0x00004715
#mcio1
mww 0x4800003C 0x00004715

#mdref
mww 0x48000004 0x03CA4018
#mdref
mww 0x48000004 0x004B4018
#mdref
mww 0x48000004 0x000B4018
#mdref
mww 0x48000004 0x000BC018
#mdcnfg
mww 0x48000000 0x00001AC8
#DELAY 20 maybe put dummy mdw commands here???
mdw 0x00000000 20
#wakeup the sdram:
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
mww 0xA0000000 0xA0000000
#mdcnfg
mww 0x48000000 0x00001AC9
#mdmrs
mww 0x48000040 0x00000000 

[링크 : http://www.fairwayacademy.org/.../enabling-working-area-in-sdram-for-openocd-on-pxa255/]  << init code


위에 cfg 파일의 레지스터로 찾아보니 오호오오오오옹~ 이걸 이용해 봐야겠다 
0x4800_0000 MDCNFG SDRAM Configuration Register 0
0x4800_0004 MDREFR SDRAM Refresh Control Register


[링크 : http://www.idt.mdh.se/kurser/cdt214/PXA255_Developers_Manual.pdf]

'하드웨어 > PalmPalm Tynux Box' 카테고리의 다른 글

Tynuxbox FLASH 초기화 관련 내용  (0) 2013.07.27
Tynuxbox SDRAM 초기화 관련 내용  (0) 2013.07.27
PXA255 init script 고찰  (0) 2013.07.11
palmpalm + h-jtag이 안된이유?  (0) 2013.07.07
palmpalm FS 구조  (0) 2013.07.07
palmpalm = PXA255 + Intel 28F128J3  (0) 2013.07.03
Posted by 구차니

댓글을 달아 주세요