从休眠模式(Power-off)唤醒过程

1.一旦某个唤醒源有信号进来,内部的复位信号will be asserted;This reset duration由内部的16-bit 计数器逻辑决定,the reset assertion time由tRST = (65535 /XTAL_frequency)计算得来。

问题:reset duration和the reset assertion time表示什么??有什么区别??

 

2.检查GSTATUS2[2],看上电是否是由休眠模式唤醒而引起的;

ldr r1, =GSTATUS2 ; Determine Booting Mode
ldr r10, [r1]
tst r10, #
0x2
beq
%F2 ; if not wakeup from PowerOffmode Skip
; MISCCR setting

三种复位模式:Power on reset,Power_OFF reset,Watchdog reset.对应于GSTATUS2[0~2]

 

3,通过设置MISCCR[19:17]位为000b来释放SDRAM信号保护

ldr r1, =MISCCR ; MISCCR's Bit 17, 18, 19 -> 0
ldr r0, [r1] ; I don't know why, Just fallow Sample Code.
bic r0, r0, #(7 << 17) ; SCLK0:0->SCLK, SCLK1:0->SCLK, SCKE:L->H
str r0, [r1]

 

 

4,配置SDRAM内存控制器

; Set memory control registers
add r0, pc, #SMRDATA
- (. + 8)
ldr r1,
=BWSCON ; BWSCON Address
add r2, r0, #
52 ; End address of SMRDATA
loop10
ldr r3, [r0], #
4
str r3, [r1], #
4
cmp r2, r0
bne loop10

S3c2410共有13个存储控制寄存器,每个寄存器占4个字节,共52个字节

 

5,等待SDRAM的自刷新被释放

mov r1, #256
loop11
subs r1, r1, #
1 ; wait until the SelfRefresh is released.
bne loop11

 

6,用户可以根据自己的目的来使用GSTATUS3,4,因为在休眠模式GSTATUS3,4中的值被保留

 

7. – For EINT[3:0], check the SRCPND register.
    – For EINT[15:4], check the EINTPEND instead of SRCPND (SRCPND will not be set although some bits of
EINTPEND are set.).
    – For alarm wake-up, check the RTC time because the RTC bit of SRCPND isn’t set at the alarm wake-up.
    – If there was the nBATT_FLT assertion during POWER_OFF mode, the corresponding bit of SRCPND has
been set.

 

 

 

 

posted on 2010-04-30 15:44  EmbeddedBoy_jsu_xtw  阅读(2252)  评论(1编辑  收藏  举报

导航