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

📄 startup.s

📁 MagicARM2410的BSP包,增加了AD,CAN,PCCARD驱动,串口驱动3个
💻 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.
;
;------------------------------------------------------------------------------
;
;   File:  startup.s
;
;   Kernel startup routine for Samsung SMDK2410X board. Hardware is
;   initialized in boot loader - so there isn't much code at all.
;
;------------------------------------------------------------------------------

        INCLUDE kxarm.h
		INCLUDE s3c2410x.inc
		INCLUDE armmacros.s

PLLVAL      EQU     (((0xa1 << 12) + (0x3 << 4) + 0x1))


        IMPORT  KernelStart

        TEXTAREA
        
        ; Include memory configuration file with g_oalAddressTable

        INCLUDE oemaddrtab_cfg.inc
 
        LEAF_ENTRY StartUp

		bl CLK_CONFIG

        ; Compute the OEMAddressTable's physical address and 
        ; load it into r0. KernelStart expects r0 to contain
        ; the physical address of this table. The MMU isn't 
        ; turned on until well into KernelStart.  
        add     r0, pc, #g_oalAddressTable - (. + 8)
        bl      KernelStart


CLK_CONFIG
    ldr     r0, = LOCKTIME                  ; To reduce PLL lock time, adjust the LOCKTIME register. 
    ldr     r1, = 0xffffff
    str     r1, [r0]
    
    ldr     r0, = MPLLCON                   ; Configure MPLL
                                            ; Fin=12MHz, Fout=50MHz
    ldr     r1, = PLLVAL
    str     r1, [r0]

    ldr     r0, = UPLLCON                   ; Fin=12MHz, Fout=48MHz
    ldr     r1, = ((0x48 << 12) + (0x3 << 4) + 0x2)  
    str     r1, [r0]

    mov     r0, #0x2000
1   
    subs    r0, r0, #1
    bne     %B1
	mov		pc,lr
	END

		ENTRY_END 

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

⌨️ 快捷键说明

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