⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpu.s

📁 Windows CE 6.0 BSP for VOIPAC Board (PXA270) Version 2b.
💻 S
字号:
;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
; Portions Copyright (c) Texas Instruments.  All rights reserved. 
;
;------------------------------------------------------------------------------

        INCLUDE kxarm.h
        INCLUDE omap730_emif.inc

        EXPORT OALCPUIdle
        IMPORT g_pOALEMIFRegs
        
        TEXTAREA

;-------------------------------------------------------------------------------
;
;  Function:  OALCPUIdle
;
;
;  This routine is called by the kernel when there are no threads ready to
;  run. The CPU should be put into a reduced power mode and halted. It is
;  important to be able to resume execution quickly upon receiving an interrupt.
;
;
 
        ALIGN   1024                    ; Align on 1KB boundary to avoid
                                        ; ARM926EJ-S WFI bug

        LEAF_ENTRY OALCPUIdle

        mov     r0, #0
        mcr     p15, 0, r0, c7, c10, 4

        ; Prefetch sleep command         
        add     r0, pc, #(SLEEP - . + 8)
        mcr     p15, 0, r0, c7, c13, 1
        
        ; Set SDRAM to self-refresh mode
        ldr     r0, =g_pOALEMIFRegs
        ldr     r0, [r0]
        ldr     r1, [r0, #OMAP730_EMIF_EMIFF_CONFIG_REGS_OA]
        orr     r1, r1, #(1 :SHL: 0)
        str     r1, [r0, #OMAP730_EMIF_EMIFF_CONFIG_REGS_OA]

        ; Write Sleep Command
SLEEP   mcr     p15, 0, r0, c7, c0, 4

        nop
        nop
        nop
        nop
        
        mov pc, lr
 
        ENTRY_END

        END

;-------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -