📄 uarttest.lst
字号:
51 }
\ ??UART0_PutString_1:
\ 00000014 10BC POP {R4}
\ 00000016 01BC POP {R0}
\ 00000018 0047 BX R0 ;; return
52 /*****************************PLL初始化**************************************/
\ In segment CODE, align 4, keep-with-next
53 void PLL_Init(void)
54 {
55 /* 设置系统各部分时钟 */
56 PLLCON = 1;
\ PLL_Init:
\ 00000000 0E48 LDR R0,??PLL_Init_0 ;; 0xe01fc080
\ 00000002 0121 MOV R1,#+0x1
\ 00000004 0170 STRB R1,[R0, #+0]
57 #if ((Fcclk / 4) / Fpclk) == 1
58 VPBDIV = 0;
\ 00000006 0E48 LDR R0,??PLL_Init_0+0x4 ;; 0xe01fc100
\ 00000008 0021 MOV R1,#+0
\ 0000000A 0170 STRB R1,[R0, #+0]
59 #endif
60 #if ((Fcclk / 4) / Fpclk) == 2
61 VPBDIV = 2;
62 #endif
63 #if ((Fcclk / 4) / Fpclk) == 4
64 VPBDIV = 1;
65 #endif
66 #if (Fcco / Fcclk) == 2
67 PLLCFG = ((Fcclk / Fosc) - 1) | (0 << 5);
68 #endif
69 #if (Fcco / Fcclk) == 4
70 PLLCFG = ((Fcclk / Fosc) - 1) | (1 << 5);
\ 0000000C 0D48 LDR R0,??PLL_Init_0+0x8 ;; 0xe01fc084
\ 0000000E 2321 MOV R1,#+0x23
\ 00000010 0170 STRB R1,[R0, #+0]
71 #endif
72 #if (Fcco / Fcclk) == 8
73 PLLCFG = ((Fcclk / Fosc) - 1) | (2 << 5);
74 #endif
75 #if (Fcco / Fcclk) == 16
76 PLLCFG = ((Fcclk / Fosc) - 1) | (3 << 5);
77 #endif
78 PLLFEED = 0xaa;
\ 00000012 0D48 LDR R0,??PLL_Init_0+0xC ;; 0xe01fc08c
\ 00000014 AA21 MOV R1,#+0xAA
\ 00000016 0170 STRB R1,[R0, #+0]
79 PLLFEED = 0x55;
\ 00000018 0B48 LDR R0,??PLL_Init_0+0xC ;; 0xe01fc08c
\ 0000001A 5521 MOV R1,#+0x55
\ 0000001C 0170 STRB R1,[R0, #+0]
80 while((PLLSTAT & (1 << 10)) == 0);
\ ??PLL_Init_1:
\ 0000001E 0B48 LDR R0,??PLL_Init_0+0x10 ;; 0xe01fc088
\ 00000020 0088 LDRH R0,[R0, #+0]
\ 00000022 4005 LSL R0,R0,#+0x15
\ 00000024 FBD5 BPL ??PLL_Init_1
81 PLLCON = 3;
\ 00000026 0548 LDR R0,??PLL_Init_0 ;; 0xe01fc080
\ 00000028 0321 MOV R1,#+0x3
\ 0000002A 0170 STRB R1,[R0, #+0]
82 PLLFEED = 0xaa;
\ 0000002C 0648 LDR R0,??PLL_Init_0+0xC ;; 0xe01fc08c
\ 0000002E AA21 MOV R1,#+0xAA
\ 00000030 0170 STRB R1,[R0, #+0]
83 PLLFEED = 0x55;
\ 00000032 0548 LDR R0,??PLL_Init_0+0xC ;; 0xe01fc08c
\ 00000034 5521 MOV R1,#+0x55
\ 00000036 0170 STRB R1,[R0, #+0]
84 }
\ 00000038 7047 BX LR ;; return
\ 0000003A C046 NOP
\ ??PLL_Init_0:
\ 0000003C 80C01FE0 DC32 0xe01fc080
\ 00000040 00C11FE0 DC32 0xe01fc100
\ 00000044 84C01FE0 DC32 0xe01fc084
\ 00000048 8CC01FE0 DC32 0xe01fc08c
\ 0000004C 88C01FE0 DC32 0xe01fc088
85 /***************************主函数*********************************/
\ In segment CODE, align 4, keep-with-next
86 void Uart0Test( void )
87 {
\ Uart0Test:
\ 00000000 10B5 PUSH {R4,LR}
88
89 U8 command;
90 PINSEL0 = 0x00000005; // 设置I/O连接到UART0
\ 00000002 0B48 LDR R0,??Uart0Test_0 ;; 0xe002c000
\ 00000004 0521 MOV R1,#+0x5
\ 00000006 0160 STR R1,[R0, #+0]
91 PINSEL1 = 0x00000000;
\ 00000008 0A48 LDR R0,??Uart0Test_0+0x4 ;; 0xe002c004
\ 0000000A 0021 MOV R1,#+0
\ 0000000C 0160 STR R1,[R0, #+0]
92 PLL_Init();
\ 0000000E ........ BL PLL_Init
93 UART0_Init(); //UART0初始化
\ 00000012 ........ BL UART0_Init
94 UART0_PutString(" \nUART Test\n\r");
\ 00000016 0848 LDR R0,??Uart0Test_0+0x8 ;; `?<Constant " \\nUART Test\\n\\r">`
\ 00000018 ........ BL UART0_PutString
95
96 while ( 1 )
97 {
98 command = UART0_GetChar(); //接收按键值
\ ??Uart0Test_1:
\ 0000001C ........ BL UART0_GetChar
\ 00000020 041C MOV R4,R0
99 UART0_PutChar( command ); //返回按键值
\ 00000022 2406 LSL R4,R4,#+0x18 ;; ZeroExt R4,R4,#+0x18,#+0x18
\ 00000024 240E LSR R4,R4,#+0x18
\ 00000026 201C MOV R0,R4
\ 00000028 ........ BL UART0_PutChar
\ 0000002C F6E7 B ??Uart0Test_1
\ 0000002E C046 NOP
\ ??Uart0Test_0:
\ 00000030 00C002E0 DC32 0xe002c000
\ 00000034 04C002E0 DC32 0xe002c004
\ 00000038 ........ DC32 `?<Constant " \\nUART Test\\n\\r">`
100 }
101 }
\ In segment CODE, align 4, keep-with-next
\ ??DataTable3:
\ 00000000 00C000E0 DC32 0xe000c000
\ In segment CODE, align 4, keep-with-next
\ ??DataTable4:
\ 00000000 14C000E0 DC32 0xe000c014
\ In segment DATA_C, align 4, align-sorted
\ `?<Constant " \\nUART Test\\n\\r">`:
\ 00000000 200A55415254 DC8 " \012UART Test\012\015"
\ 20546573740A
\ 0D00
\ 0000000E 0000 DC8 0, 0
Maximum stack usage in bytes:
Function CSTACK
-------- ------
PLL_Init 0
UART0_GetChar 0
UART0_GetString 12
UART0_Init 4
UART0_PutChar 0
UART0_PutString 8
Uart0Test 8
Segment part sizes:
Function/Label Bytes
-------------- -----
UART0_Init 68
??UART0_GetChar_0 20
UART0_GetString 28
UART0_PutChar 16
UART0_PutString 26
PLL_Init 80
Uart0Test 60
??DataTable3 4
??DataTable4 4
?<Constant " \nUART Test\n\r"> 16
Others 72
378 bytes in segment CODE
16 bytes in segment DATA_C
306 bytes of CODE memory (+ 72 bytes shared)
16 bytes of CONST memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -