code_start.asm

来自「我最初用TMS320F240芯片作开发」· 汇编 代码 · 共 46 行

ASM
46
字号
;**********************************************************************;
;* TMS320F2810 Assembly Language File                                 *;
;* The Assembly Language File For Code Start      Version number: 1.0 *;
;*                                                                    *;
;* File name : Code_Start.ASM                                         *;
;* Date/Time created: Oct 27 2005                                     *;
;* Author: Anakin.Lee                                                 *;
;**********************************************************************;

WD_DISABLE .set 1                 ;set to 1 to disable WD, else set to 0
           .ref _c_int00

;**********************************************************************;
;* Function: codestart section                                        *;
;* Description: Branch to code starting point                         *;
;***********************************************************************
    .sect "codeStart"

    .if WD_DISABLE == 1
        LB wd_disable             ;Branch to watchdog disable code
    .else
        LB _c_int00               ;Branch to start of boot.asm in RTS library
    .endif                        ;end codestart section

;**********************************************************************;
;* Function: wd_disable                                               *;
;* Description: Disables the watchdog timer                           *;
;***********************************************************************
    .if WD_DISABLE == 1

    .text

wd_disable:
    SETC OBJMODE                  ;Set OBJMODE for 28x object code

    EALLOW                        ;Enable EALLOW protected register access
    MOVZ DP,#7029h>>6             ;Set data page for WDCR register
    MOV @7029h,#0068h             ;Set WDDIS bit in WDCR to disable WD
    EDIS                          ;Disable EALLOW protected register access

    LB _c_int00                   ;Branch to start of boot.asm in RTS library

    .endif                        ;end wd_disable

***********************************************************************
    .end                          ; end of file Code_Start.asm

⌨️ 快捷键说明

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