📄 sdram_init.asm
字号:
/*****************************************************************************
** **
** Project Name: LCD Colorbar **
** **
******************************************************************************
Analog Devices, Inc. All rights reserved.
File Name: sdram_init.asm
Hardware: ADSP-BF537
Special Connections: None
Purpose: Initialize SDRAM memory.
******************************************************************************/
#include "defBF537.h"
.section program;
.global _setup_sdram;
_setup_sdram:
/* Check whether SDRAM is enabled already. If so, jump to done.
If not, continue with configurations. */
P0.L = lo(EBIU_SDSTAT);
P0.H = hi(EBIU_SDSTAT);
R2.L = W[P0];
CC = BITTST(R2,3);
IF !CC JUMP done;
/* Initalize SDRAM registers. */
//SDRAM Refresh Rate Control Register
P0.L = lo(EBIU_SDRRC);
P0.H = hi(EBIU_SDRRC);
R0.L = 0x03a2;
W[P0] = R0.L;
//SDRAM Memory Bank Control Register
P0.L = lo(EBIU_SDBCTL);
P0.H = hi(EBIU_SDBCTL);
R0.L = 0x0013;
W[P0] = R0.L;
//SDRAM Memory Global Control Register
P0.L = lo(EBIU_SDGCTL);
P0.H = hi(EBIU_SDGCTL);
R0.L = 0x998d;
R0.H = 0x0091;
[P0] = R0;
SSYNC;
done:
RTS;
_setup_sdram.END: ssync;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -