📄 sdram_init.asm
字号:
/*****************************************************************************
** **
** Project Name: Video_Output **
** **
******************************************************************************
(C) Copyright 2003 - Analog Devices, Inc. All rights reserved.
File Name: sdram_init.asm
Date Modified: 4/4/03 CL Rev 1.0
Software: VisualDSP++3.1
Hardware: ADSP-BF533 EZ-KIT Board
Special Connections: None
Purpose: This sdram_init.asm file sets up the SDRAM registers for
SDRAM memory accesses.
******************************************************************************/
#include "defBF533.h"
.section L1_code;
.global setup_sdram;
setup_sdram:
/* Check whether SDRAM is enabled already. If so, jump to done.
If not, continue with configurations. */
P0.L = EBIU_SDSTAT & 0xffff;
P0.H = EBIU_SDSTAT >> 16;
R2.L = W[P0];
CC = BITTST(R2,3);
IF !CC JUMP done;
/* Initalize SDRAM registers. */
//SDRAM Refresh Rate Control Register
P0.L = EBIU_SDRRC & 0xffff;
P0.H = EBIU_SDRRC >> 16;
R0.L = 0x0817;
W[P0] = R0.L;
//SDRAM Memory Bank Control Register
P0.L = EBIU_SDBCTL & 0xffff;
P0.H = EBIU_SDBCTL >> 16;
R0.L = 0x0013;
W[P0] = R0.L;
//SDRAM Memory Global Control Register
P0.L = EBIU_SDGCTL & 0xffff;
P0.H = EBIU_SDGCTL >> 16;
R0.L = 0x998d;
R0.H = 0x0091;
[P0] = R0;
done:
RTS;
setup_sdram.END:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -