在线时间1 小时
UID258195
注册时间2011-1-6
NXP金币0
该用户从未签到
注册会员

- 积分
- 51
- 最后登录
- 1970-1-1
|
MPC5606B在程序上电或重启后会对RAM空间进初始化,codewarrior V2.10工程下初始化代码为汇编语言,如下所示:
/*******************************************************/
/* MPC5606B derivative specific hardware initialization */
/*******************************************************/
/* Symbol L2SRAM_LOCATION is defined in the application linker command
file (.lcf) It is defined to the start of the internal SRAM in the
MPC5606B.
*/
/*lint -esym(752, L2SRAM_LOCATION) */
extern long L2SRAM_LOCATION;
__asm void INIT_Derivative(void)
{
nofralloc
/* MPC5606B SRAM initialization code */
lis r11,L2SRAM_LOCATION@h /* Base of SRAM, 64-bit word aligned */
ori r11,r11,L2SRAM_LOCATION@l
li r12,640 /* Loops to cover 80K SRAM; 80k/4 bytes/32 GPRs = 640 */
mtctr r12
init_l2sram_loop:
stmw r0,0(r11) /* Write 32 GPRs to SRAM */
addi r11,r11,128 /* Inc the ram ptr; 32 GPRs * 4 bytes = 128B */
bdnz init_l2sram_loop /* Loop for 80k of SRAM */
blr
}
现在希望在软复位(指令跳转或时钟复位)的情况,不对RAM空间进行初始化,不知道该如何修改代码,还请各位大神给予帮助,谢谢!
|
评分
-
查看全部评分
|