s3c2440挂起后怎样唤醒,挂起后跟踪有执行到CPUPowerOff(),挂起前也用
s2440IOP->rGPFDAT = 0x1 |(0xf<<4);
s2440IOP->rGPFCON = 0x5502;
s2440IOP->rGPFUP = 0xf7;
s2440IOP->rEXTINT0 = 0x22222226;
设置了中断0唤醒,可是为什么唤醒没有反应,如果有唤醒应该至少得跑一下bootloader吧,是不是还得设置什么
看了fw.c里的相关设置,代码如下
; 4. Interrupt Disable
ldr r0, =vINTBASE
mvn r2, #0
str r2, [r0, #oINTMSK]
str r2, [r0, #oSRCPND]
str r2, [r0, #oINTPND]
; 5. Cache Flush
bl ARMClearUTLB
bl ARMFlushICache
ldr r0, = (DCACHE_LINES_PER_SET - 1)
ldr r1, = (DCACHE_NUM_SETS - 1)
ldr r2, = DCACHE_SET_INDEX_BIT
ldr r3, = DCACHE_LINE_SIZE
bl ARMFlushDCache
; 6. Setting Wakeup External Interrupt(EINT0,1,2) Mode
ldr r0, =vGPIOBASE
ldr r1, =0x550a
str r1, [r0, #oGPFCON]
; ldr r1, =0x55550100
; str r1, [r0, #oGPGCON]
; 7. Go to Power-Off Mode
ldr r0, =vMISCCR ; hit the TLB
ldr r0, [r0]
ldr r0, =vCLKCON
ldr r0, [r0]
ldr r0, =vREFRESH
ldr r1, [r0] ; r1=rREFRESH
orr r1, r1, #(1 << 22)
ldr r2, =vMISCCR
ldr r3, [r2]
orr r3, r3, #(3<<17) ; Make sure that SCLK0:SCLK->0, SCLK1:SCLK->0, SCKE=L during boot-up
bic r3, r3, #(7<<20)
orr r3, r3, #(6<<20)
ldr r4, =vCLKCON
ldr r5, =0x7fff8 ; Power Off Mode
感觉应该没有什么问题,可是就是无法唤醒CPU,请有相关经验的来指点一下,不甚感激
|