📄 cstartup_sam7.lst
字号:
1 .file "Cstartup_SAM7.c"
9 .Ltext0:
10 .section .text.AT91F_LowLevelInit,"ax",%progbits
11 .align 2
12 .global AT91F_LowLevelInit
14 AT91F_LowLevelInit:
15 .LFB290:
16 .file 1 "Compil/srcWinARM/Cstartup_SAM7.c"
1:Compil/srcWinARM/Cstartup_SAM7.c **** //-----------------------------------------------------------------------------
2:Compil/srcWinARM/Cstartup_SAM7.c **** // ATMEL Microcontroller Software Support - ROUSSET -
3:Compil/srcWinARM/Cstartup_SAM7.c **** //-----------------------------------------------------------------------------
4:Compil/srcWinARM/Cstartup_SAM7.c **** // DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
5:Compil/srcWinARM/Cstartup_SAM7.c **** // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6:Compil/srcWinARM/Cstartup_SAM7.c **** // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
7:Compil/srcWinARM/Cstartup_SAM7.c **** // DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
8:Compil/srcWinARM/Cstartup_SAM7.c **** // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9:Compil/srcWinARM/Cstartup_SAM7.c **** // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
10:Compil/srcWinARM/Cstartup_SAM7.c **** // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
11:Compil/srcWinARM/Cstartup_SAM7.c **** // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
12:Compil/srcWinARM/Cstartup_SAM7.c **** // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
13:Compil/srcWinARM/Cstartup_SAM7.c **** // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14:Compil/srcWinARM/Cstartup_SAM7.c **** //-----------------------------------------------------------------------------
15:Compil/srcWinARM/Cstartup_SAM7.c **** // File Name : Cstartup_SAM7.c
16:Compil/srcWinARM/Cstartup_SAM7.c **** // Object : Low level initialisations written in C for Tools
17:Compil/srcWinARM/Cstartup_SAM7.c **** // For AT91SAM7S256 with 2 flash plane
18:Compil/srcWinARM/Cstartup_SAM7.c **** // Creation : JPP 09-May-2006
19:Compil/srcWinARM/Cstartup_SAM7.c **** //-----------------------------------------------------------------------------
20:Compil/srcWinARM/Cstartup_SAM7.c ****
21:Compil/srcWinARM/Cstartup_SAM7.c **** #include "project.h"
22:Compil/srcWinARM/Cstartup_SAM7.c ****
23:Compil/srcWinARM/Cstartup_SAM7.c ****
24:Compil/srcWinARM/Cstartup_SAM7.c **** // The following functions must be write in ARM mode this function called
25:Compil/srcWinARM/Cstartup_SAM7.c **** // directly by exception vector
26:Compil/srcWinARM/Cstartup_SAM7.c **** extern void AT91F_Spurious_handler(void);
27:Compil/srcWinARM/Cstartup_SAM7.c **** extern void AT91F_Default_IRQ_handler(void);
28:Compil/srcWinARM/Cstartup_SAM7.c **** extern void AT91F_Default_FIQ_handler(void);
29:Compil/srcWinARM/Cstartup_SAM7.c ****
30:Compil/srcWinARM/Cstartup_SAM7.c **** //*----------------------------------------------------------------------------
31:Compil/srcWinARM/Cstartup_SAM7.c **** //* \fn AT91F_LowLevelInit
32:Compil/srcWinARM/Cstartup_SAM7.c **** //* \brief This function performs very low level HW initialization
33:Compil/srcWinARM/Cstartup_SAM7.c **** //* this function can use a Stack, depending the compilation
34:Compil/srcWinARM/Cstartup_SAM7.c **** //* optimization mode
35:Compil/srcWinARM/Cstartup_SAM7.c **** //*----------------------------------------------------------------------------
36:Compil/srcWinARM/Cstartup_SAM7.c **** //void AT91F_LowLevelInit(void) @ "ICODE"
37:Compil/srcWinARM/Cstartup_SAM7.c **** void AT91F_LowLevelInit(void) {
17 args = 0, pretend = 0, frame = 4
18 @ frame_needed = 1, uses_anonymous_args = 0
19 mov ip, sp
20 0000 0DC0A0E1 .LCFI0:
21 stmfd sp!, {fp, ip, lr, pc}
22 0004 00D82DE9 .LCFI1:
23 sub fp, ip, #4
24 0008 04B04CE2 .LCFI2:
25 sub sp, sp, #4
26 000c 04D04DE2 .LCFI3:
27 .loc 1 42 0
38:Compil/srcWinARM/Cstartup_SAM7.c **** unsigned char i;
39:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
40:Compil/srcWinARM/Cstartup_SAM7.c **** // EFC Init
41:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
42:Compil/srcWinARM/Cstartup_SAM7.c **** AT91C_BASE_MC->MC_FMR = AT91C_MC_FWS_1FWS ;
28 55
29 0010 FF20E0E3 mov r3, #256
30 0014 013CA0E3 str r3, [r2, #96]
31 0018 603082E5 .loc 1 52 0
43:Compil/srcWinARM/Cstartup_SAM7.c ****
44:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
45:Compil/srcWinARM/Cstartup_SAM7.c **** // Init PMC Step 1. Enable Main Oscillator
46:Compil/srcWinARM/Cstartup_SAM7.c **** // Main Oscillator startup time is board specific:
47:Compil/srcWinARM/Cstartup_SAM7.c **** // Main Oscillator Startup Time worst case (3MHz) corresponds to 15ms
48:Compil/srcWinARM/Cstartup_SAM7.c **** // (0x40 for AT91C_CKGR_OSCOUNT field)
49:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
50:Compil/srcWinARM/Cstartup_SAM7.c **** // mtmt avoid warning operator - precedence & > |
51:Compil/srcWinARM/Cstartup_SAM7.c **** // AT91C_BASE_PMC->PMC_MOR = (( AT91C_CKGR_OSCOUNT & (0x40 <<8) | AT91C_CKGR_MOSCEN ));
52:Compil/srcWinARM/Cstartup_SAM7.c **** AT91C_BASE_PMC->PMC_MOR = ( ( ( AT91C_CKGR_OSCOUNT & (0x40 <<8) ) | AT91C_CKGR_MOSCEN ));
32 r2, #-2147483648
33 001c 0221A0E3 mov r2, r2, asr #21
34 0020 C22AA0E1 mov r3, #16384
35 0024 0139A0E3 add r3, r3, #1
36 0028 013083E2 str r3, [r2, #32]
37 002c 203082E5 .L2:
38 .loc 1 54 0
53:Compil/srcWinARM/Cstartup_SAM7.c **** // Wait Main Oscillator stabilization
54:Compil/srcWinARM/Cstartup_SAM7.c **** while(!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MOSCS));
39 , #-2147483648
40 0030 0231A0E3 mov r3, r3, asr #21
41 0034 C33AA0E1 ldr r3, [r3, #104]
42 0038 683093E5 and r3, r3, #1
43 003c 013003E2 cmp r3, #0
44 0040 000053E3 beq .L2
45 0044 F9FFFF0A .loc 1 63 0
55:Compil/srcWinARM/Cstartup_SAM7.c ****
56:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
57:Compil/srcWinARM/Cstartup_SAM7.c **** // Init PMC Step 2.
58:Compil/srcWinARM/Cstartup_SAM7.c **** // Set PLL to 96MHz (96,109MHz) and UDP Clock to 48MHz
59:Compil/srcWinARM/Cstartup_SAM7.c **** // PLL Startup time depends on PLL RC filter: worst case is choosen
60:Compil/srcWinARM/Cstartup_SAM7.c **** // UDP Clock (48,058MHz) is compliant with the Universal Serial Bus
61:Compil/srcWinARM/Cstartup_SAM7.c **** // Specification (+/- 0.25% for full speed)
62:Compil/srcWinARM/Cstartup_SAM7.c **** ///////////////////////////////////////////////////////////////////////////
63:Compil/srcWinARM/Cstartup_SAM7.c **** AT91C_BASE_PMC->PMC_PLLR = AT91C_CKGR_USBDIV_1 |
46 , #-2147483648
47 0048 0221A0E3 mov r2, r2, asr #21
48 004c C22AA0E1 mov r3, #272629760
49 0050 4135A0E3 add r3, r3, #528384
50 0054 813A83E2 add r3, r3, #14
51 0058 0E3083E2 str r3, [r2, #44]
52 005c 2C3082E5 .L4:
53 .loc 1 68 0
64:Compil/srcWinARM/Cstartup_SAM7.c **** (16 << 8) |
65:Compil/srcWinARM/Cstartup_SAM7.c **** (AT91C_CKGR_MUL & (72 << 16)) |
66:Compil/srcWinARM/Cstartup_SAM7.c **** (AT91C_CKGR_DIV & 14);
67:Compil/srcWinARM/Cstartup_SAM7.c **** // Wait for PLL stabilization
68:Compil/srcWinARM/Cstartup_SAM7.c **** while( !(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_LOCK) );
54 #-2147483648
55 0060 0231A0E3 mov r3, r3, asr #21
56 0064 C33AA0E1 ldr r3, [r3, #104]
57 0068 683093E5 and r3, r3, #4
58 006c 043003E2 cmp r3, #0
59 0070 000053E3 beq .L4
60 0074 F9FFFF0A .L5:
61 .loc 1 71 0
69:Compil/srcWinARM/Cstartup_SAM7.c **** // Wait until the master clock is established for the case we already
70:Compil/srcWinARM/Cstartup_SAM7.c **** // turn on the PLL
71:Compil/srcWinARM/Cstartup_SAM7.c **** while( !(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY) );
62 #-2147483648
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -