日韩在线免费播放-日韩在线免费av-日韩在线免费-日韩在线毛片-国产高清不卡视频-国产高清不卡

當前位置: > 華清遠見教育科技集團 > 嵌入式學習 > 講師博文 > globl mem_ctrl_asm_init一
globl mem_ctrl_asm_init一
時間:2016-12-14作者:華清遠見

.globl mem_ctrl_asm_init

mem_ctrl_asm_init:

/* s5pc100 使用的的dram芯片為k4t1g164qf-bce7 */

ldr r0, =0xe6000000 /*APB_DMC_BASE*/

/******************** DLL initialization **************************/

/* dll延時鎖相環 使能dll*/
        /* 2. PhyControl0.ctrl_start_point andPhyControl0.ctrl_inc
&nnbsp;       * Set the PhyControl0.ctrl_dll_onbit-field to 1 to turn on the PHY DLL
        */

ldr r1, =0x50101002
        str r1, [r0, #0x18] /*PHY control 0 register*/

/*3.Set the PhyControl1.ctrl_shiftc andPhyControl1.ctrl_offsetc */
        ldr r1, =0xf6 /* step 3 0x110 when DDR2*/
        str r1, [r0, #0x1c] /*PHY control 1 register*/

ldr r1, =0x00000000
        str r1, [r0, #0x20] /*PHY control 2 register*/

/* 4. Set the PhyControl0.ctrl_start bit-field to 1 */
        ldr r1, =0x50101003
        str r1, [r0, #0x18] /*PHY control 0 register*/

/************************** DLL initialization - END ************************/

/* 5. Set the ConControl. At this moment, an auto refresh counter should be off.*/
        ldr r1, =0xFF001010
        str r1, [r0, #0x0] /*e6000000 = controller control register*/

ldr r1, =( (2<<20)|(1<<16)|(2<<12)|(4<<8) )
        /* 0x202400 DDR2 ,mem_width=32,2 chips,Memory Burst Length =4 */
        str r1, [r0, #0x4]
        /*e6000004 = memory control register*/

@ 128MB config , 8banks , linear, Row=13bit,COL=10bit
        @ldr r1, =0x20F01313
        ldr r1, =0x20e00313
        str r1, [r0, #0x8]

@ldr r1, =0x40F01313
        ldr r1, =0x30e00323
        str r1, [r0, #0xc]

ldr r1, =0x20000000
        str r1, [r0, #0x14] /*precharge policy configuration register*/

@ldr r1, =0x00100004
        @str r1, [r0, #0x28] /*precharge policy configuration register*/

/******************************************************************/

@ldr r1, =0x0000050e
        ldr r1, =0x00000400
        str r1, [r0, #0x30] /*AC timing register for auto refresh of memory*/

@ldr r1, =0x16233297 @TimingRow @166MHz
        ldr r1, =0x16233287
        str r1, [r0, #0x34] /*AC timing register for the row of memory*/

@; ldr r1, =0x24250304 @CL=5
        @ldr r1, =0x23230000 @CL=3
        ldr r1, =0x23240304
        str r1, [r0, #0x38] /*AC timing register for the data of memory*/

@ldr r1, =0x07c80232 @Timing Power
        ldr r1, =0x09c80232
        str r1, [r0, #0x3c] /*AC timing register for the power mode of memory*/

/************************ direct command for DDR2 ***********************/

ldr r1, =0x07000000 @chip0 Deselect
        str r1, [r0, #0x10] /*memory direct command register*/

ldr r1, =0x01000000 @chip0 PALL
        str r1, [r0, #0x10]

ldr r1, =0x00020000 @chip0 EMRS2
        str r1, [r0, #0x10]

ldr r1, =0x00030000 @chip0 EMRS3
        str r1, [r0, #0x10]

ldr r1, =0x00010400 @chip0 EMRS1 (MEM DLL on = DQS# disable)
        str r1, [r0, #0x10]

@; ldr r1, =0x00000552 @chip0 MRS (MEM DLL reset) CL=5, Burst Length=4
        ldr r1, =0x00000542 @chip0 MRS (MEM DLL reset) CL=3, Burst Length=4
        str r1, [r0, #0x10]

ldr r1, =0x01000000 @chip0 PALL
        str r1, [r0, #0x10]

ldr r1, =0x05000000 @chip0 REFA
        str r1, [r0, #0x10

ldr r1, =0x05000000 @chip0 REFA
        str r1, [r0, #0x10]

@; ldr r1, =0x00000452 @chip0 MRS (MEM DLL unreset) , BL=4 , CL=5
        strldr r1, =0x00000442 @chip0 MRS (MEM DLL unreset) , BL=4 , CL=3
        strstr r1, [r0, #0x10]

ldr r1, =0x00010780 @chip0 EMRS1 (OCD default)
        str r1, [r0, #0x10]

ldr r1, =0x00010400 @chip0 EMRS1 (OCD exit) Reduced Strength
        str r1, [r0, #0x10]

/************************ direct command for DDR2 - END*******************/

@ldr r1, =0x00FF20B0 @ConControl auto refresh on
        ldr r1, =0xff01030
        str r1, [r0, #0x0] /*e6000000 = controller control register*/

ldr r1, =0x00100004
        str r1, [r0, #0x28]

@ldr r1, =0x00212413 @ MemControl
        ldr r1, =0x00202400
        str r1, [r0, #0x4] /*e6000000 = controller control register*/

發表評論
評論列表(網友評論僅供網友表達個人看法,并不表明本站同意其觀點或證實其描述)
主站蜘蛛池模板: 二年级上册数学竖式计算题| love 电影| 孤战迷城电视剧剧情介绍| 谍变1939全部演员表| 实验室火灾报警电铃响时应当| 女生的宿舍2| 2024独一无二头像| 3d欧美怪物sexvideo| 高岛真一| 全国精神病查询系统官网| 男人吃女人逼视频| 《一点》歌词完整版| 和黑帮大佬365日| bangdream动漫| 情难自禁电影| 手机拦截骚扰电话怎么设置| 甜蜜杀机 电影| 电视剧《流金岁月》演员表| 让我们的家更美好教学设计| 视频999| 假如我是一坨屎作文| 情人电视剧| 盲辉| 美女网站在线观看| 电影潘金莲| 琉璃演员表全部演员介绍| 查妮甘·唐卡伯缇| 百字明咒注音全文读诵| 空姐一级毛片| 日本电影完整版| 性感美女动漫| 袁鸿| 卓别林电影全集免费观看| 红灯区 电影| 爸爸去哪儿第一季是哪一年播出| 哥哥回来了 电影| 保坂尚辉| 叶子楣作品| 李采潭全部作品百度| 职业探索怎么写| 血糖最怕三种水果|