1 ***********************************************************************
2 *File:DSP281x_CodeStartBranch.asm
3 *Apply to:F2810,F2811,F2812 devices.
4 *Author: David Chan, WintechDigital System Inc.
5 ***********************************************************************
6
7 WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0
8
9 .ref _c_int00
10
11 ***********************************************************************
12 * Function: codestart section
13 *
14 * Description: Branch to code starting point
15 ***********************************************************************
16
17 .sect "codestart"
18
19 code_start:
20 .if WD_DISABLE == 1
21 LB wd_disable ;Branch to watchdog disable code
22 .else
23 LB _c_int00 ;Branch to start of boot.asm in RTS library
24 .endif
25
26 ;end codestart section
27
28
29 ***********************************************************************
30 * Function: wd_disable
31 *
32 * Description: Disables the watchdog timer
33 ***********************************************************************
34 .if WD_DISABLE == 1
35
36 .text
37 wd_disable:
38 SETC OMODE ;Set OMODE for 28x object code
39 EALLOW ;Enable EALLOW protected register access
40 MOVZ DP, #7029h>>6 ;Set data page for WDCR register
41 MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
42 EDIS ;Disable EALLOW protected register access
43 LB _c_int00 ;Branch to start of boot.asm in RTS library
44
45 .endif
46
47 ;end wd_disable
48
49
50 .end
51
52 ; end of file CodeStartBranch.asm
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-39166-2.html
果断出击
加油
因为这一次到南海