📄 uart1.txt
字号:
0005e8 e3a01456 MOV r1,#0x56000000
0005ec e5810080 STR r0,[r1,#0x80]
;;;186 Uart_Uextclk_En(1, 115200, Pclk);
0005f0 e59f0240 LDR r0,|L1.2104|
0005f4 e5902000 LDR r2,[r0,#0] ; Pclk
0005f8 e59f123c LDR r1,|L1.2108|
0005fc e3a00001 MOV r0,#1
000600 ebfffffe BL Uart_Uextclk_En
;;;187 break;
000604 ea000010 B |L1.1612|
;;;188 case '3' :
;;;189 Uart_Printf("Type the baudrate and then change the same baudrate of host, too.\n");
|L1.1544|
000608 e59f0230 LDR r0,|L1.2112|
00060c ebfffffe BL Uart_Printf
;;;190 Uart_Printf("Baudrate (ex 9600, 115200[D], 921600) : ");
000610 e28f0f8b ADR r0,|L1.2116|
000614 ebfffffe BL Uart_Printf
;;;191 iBaud = Uart_GetIntNum();
000618 ebfffffe BL Uart_GetIntNum
00061c e1a04000 MOV r4,r0
;;;192 if (iBaud == -1) iBaud = 115200;
000620 e3740001 CMN r4,#1
000624 1a000000 BNE |L1.1580|
000628 e59f420c LDR r4,|L1.2108|
;;;193 Uart_Fclkn_En(1, iBaud);
|L1.1580|
00062c e1a01004 MOV r1,r4
000630 e3a00001 MOV r0,#1
000634 ebfffffe BL Uart_Fclkn_En
;;;194 Uart_Getch();
000638 ebfffffe BL Uart_Getch
;;;195 break;
00063c ea000002 B |L1.1612|
;;;196 default :
;;;197 Uart_Pclk_En(1, 115200);
|L1.1600|
000640 e59f11f4 LDR r1,|L1.2108|
000644 e3a00001 MOV r0,#1
000648 ebfffffe BL Uart_Pclk_En
;;;198 }
;;;199
;;;200 #if 0
;;;201 /******** Select UART or IrDA *********/
;;;202 Uart_Printf("Select 1. UART(D) or 2. IrDA mode\nChoose : ");
;;;203 if (Uart_Getch() == '2')
;;;204 rULCON1 |= (1<<6); // IrDA mode
;;;205 else
;;;206 rULCON1 &= ~(1<<6); // UART mode
;;;207 #endif
;;;208
;;;209 /*********** UART1 Tx test with interrupt ***********/
;;;210 isTxInt=1;
|L1.1612|
00064c e3a00001 MOV r0,#1
000650 e51f14f8 LDR r1,|L1.352|
000654 e5810000 STR r0,[r1,#0] ; isTxInt
;;;211 uart1TxStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890->UART1 Tx interrupt test is good!!!!\r\n";
000658 e59f0210 LDR r0,|L1.2160|
00065c e51f150c LDR r1,|L1.344|
000660 e5810000 STR r0,[r1,#0] ; uart1TxStr
;;;212 Uart_Printf("[Uart channel 1 Tx Interrupt Test]\n");
000664 e28f0f82 ADR r0,|L1.2164|
000668 ebfffffe BL Uart_Printf
;;;213
;;;214 pISR_UART1=(unsigned)Uart1_TxInt;
00066c e59f0224 LDR r0,|L1.2200|
000670 e59f1224 LDR r1,|L1.2204|
000674 e5810f7c STR r0,[r1,#0xf7c]
;;;215
;;;216
;;;217 rULCON1=(0<<6)|(0<<3)|(0<<2)|(3); // Normal,No parity,One stop bit, 8bit
000678 e3a00003 MOV r0,#3
00067c e51f1528 LDR r1,|L1.348|
000680 e5810000 STR r0,[r1,#0]
;;;218 rUCON1 |= (TX_INTTYPE<<9)|(RX_INTTYPE<<8)|(0<<7)|(0<<6)|(0<<5)|(0<<4)|(1<<2)|(1);
000684 e1c10000 BIC r0,r1,r0
000688 e5900004 LDR r0,[r0,#4]
00068c e3800fc0 ORR r0,r0,#0x300
000690 e3800005 ORR r0,r0,#5
000694 e5810004 STR r0,[r1,#4]
;;;219 //Clock,Tx:Def,Rx:Def,Rx timeout:x,Rx error int:x,Loop-back:x,Send break:x,Tx:int,Rx:int
;;;220 Uart_TxEmpty(1); //wait until tx buffer is empty.
000698 e3a00001 MOV r0,#1
00069c ebfffffe BL Uart_TxEmpty
;;;221 rINTMSK=~(BIT_UART1);
0006a0 e3e00880 MVN r0,#0x800000
0006a4 e3a0144a MOV r1,#0x4a000000
0006a8 e5810008 STR r0,[r1,#8]
;;;222 rINTSUBMSK=~(BIT_SUB_TXD1);
0006ac e3e00010 MVN r0,#0x10
0006b0 e3a0144a MOV r1,#0x4a000000
0006b4 e581001c STR r0,[r1,#0x1c]
;;;223
;;;224 while(isTxInt);
0006b8 e1a00000 NOP
|L1.1724|
0006bc e51f0564 LDR r0,|L1.352|
0006c0 e5900000 LDR r0,[r0,#0] ; isTxInt
0006c4 e3500000 CMP r0,#0
0006c8 1afffffb BNE |L1.1724|
;;;225
;;;226 /*********** UART1 Rx test with interrupt ***********/
;;;227 isRxInt=1;
0006cc e3a00001 MOV r0,#1
0006d0 e51f1534 LDR r1,|L1.420|
0006d4 e5810000 STR r0,[r1,#0] ; isRxInt
;;;228 uart1RxStr=(volatile char *)UARTBUFFER;
0006d8 e3a005c4 MOV r0,#0x31000000
0006dc e51f14c4 LDR r1,|L1.544|
0006e0 e5810000 STR r0,[r1,#0] ; uart1RxStr
;;;229 Uart_Printf("\n[Uart channel 1 Rx Interrupt Test]:\n");
0006e4 e28f0f6d ADR r0,|L1.2208|
0006e8 ebfffffe BL Uart_Printf
;;;230 Uart_Printf("After typing ENTER key, you will see the characters which was typed by you.");
0006ec e59f01d4 LDR r0,|L1.2248|
0006f0 ebfffffe BL Uart_Printf
;;;231 Uart_Printf("\nTo quit, press ENTER key.!!!\n");
0006f4 e28f0f74 ADR r0,|L1.2252|
0006f8 ebfffffe BL Uart_Printf
;;;232
;;;233 pISR_UART1 =(unsigned)Uart1_RxIntOrErr;
0006fc e59f01e8 LDR r0,|L1.2284|
000700 e59f1194 LDR r1,|L1.2204|
000704 e5810f7c STR r0,[r1,#0xf7c]
;;;234
;;;235 rULCON1=(0<<6)|(0<<3)|(0<<2)|(3); // Normal,No parity,One stop bit, 8bit
000708 e3a00003 MOV r0,#3
00070c e51f15b8 LDR r1,|L1.348|
000710 e5810000 STR r0,[r1,#0]
;;;236 rUCON1 |= (1<<6);
000714 e1c10000 BIC r0,r1,r0
000718 e5900004 LDR r0,[r0,#4]
00071c e3800040 ORR r0,r0,#0x40
000720 e5810004 STR r0,[r1,#4]
;;;237 //Clock,Tx:pulse,Rx:pulse,Rx timeout:x,Rx error int:o,Loop-back:x,Send break:x,Tx:int,Rx:int
;;;238
;;;239 // Clear Int Pending and Unmask
;;;240 ClearPending(BIT_UART1);
000724 e3a00880 MOV r0,#0x800000
000728 e3a0144a MOV r1,#0x4a000000
00072c e5810000 STR r0,[r1,#0]
000730 e3a00880 MOV r0,#0x800000
000734 e3a0144a MOV r1,#0x4a000000
000738 e5810010 STR r0,[r1,#0x10]
00073c e3a0044a MOV r0,#0x4a000000
000740 e5900010 LDR r0,[r0,#0x10]
;;;241 rINTMSK=~(BIT_UART1);
000744 e3e00880 MVN r0,#0x800000
000748 e3a0144a MOV r1,#0x4a000000
00074c e5810008 STR r0,[r1,#8]
;;;242 rSUBSRCPND=(BIT_SUB_RXD1|BIT_SUB_ERR1);
000750 e3a00028 MOV r0,#0x28
000754 e3a0144a MOV r1,#0x4a000000
000758 e5810018 STR r0,[r1,#0x18]
;;;243 rINTSUBMSK=~(BIT_SUB_RXD1|BIT_SUB_ERR1);
00075c e3e00028 MVN r0,#0x28
000760 e3a0144a MOV r1,#0x4a000000
000764 e581001c STR r0,[r1,#0x1c]
;;;244
;;;245 while(isRxInt);
000768 e1a00000 NOP
|L1.1900|
00076c e51f05d0 LDR r0,|L1.420|
000770 e5900000 LDR r0,[r0,#0] ; isRxInt
000774 e3500000 CMP r0,#0
000778 1afffffb BNE |L1.1900|
;;;246
;;;247 rINTSUBMSK|=(BIT_SUB_RXD1|BIT_SUB_TXD1|BIT_SUB_ERR1);
00077c e3a0044a MOV r0,#0x4a000000
000780 e590001c LDR r0,[r0,#0x1c]
000784 e3800038 ORR r0,r0,#0x38
000788 e3a0144a MOV r1,#0x4a000000
00078c e581001c STR r0,[r1,#0x1c]
;;;248 rINTMSK|=(BIT_UART1);
000790 e3a0044a MOV r0,#0x4a000000
000794 e5900008 LDR r0,[r0,#8]
000798 e3800880 ORR r0,r0,#0x800000
00079c e3a0144a MOV r1,#0x4a000000
0007a0 e5810008 STR r0,[r1,#8]
;;;249
;;;250 Uart_Printf("%s\n",(char *)UARTBUFFER);
0007a4 e3a015c4 MOV r1,#0x31000000
0007a8 e28f0f50 ADR r0,|L1.2288|
0007ac ebfffffe BL Uart_Printf
;;;251 Uart_Printf("Change the baudrate of terminal to 115200 bps and Press Enter.\n");
0007b0 e28f0f4f ADR r0,|L1.2292|
0007b4 ebfffffe BL Uart_Printf
;;;252 Uart_Port_Return();
0007b8 ebfffffe BL Uart_Port_Return
;;;253 }
0007bc e8bd8038 LDMFD sp!,{r3-r5,pc}
|L1.1984|
0007c0 00000000 DCD rx_point
|L1.1988|
0007c4 00000000 DCD rx_filesize
|L1.1992|
0007c8 00000000 DCD rx_dncs
|L1.1996|
0007cc 00000000 DCD rx_isdone
|L1.2000|
0007d0 00000000 DCD rx_checksum
|L1.2004|
0007d4 7261555b DCB "[Uar"
0007d8 68632074 DCB "t ch"
0007dc 656e6e61 DCB "anne"
0007e0 2030206c DCB "l 0 "
0007e4 65746e49 DCB "Inte"
0007e8 70757272 DCB "rrup"
0007ec 65742074 DCB "t te"
0007f0 0a5d7473 DCB "st]\n"
0007f4 00000000 DCB "\0\0\0\0"
|L1.2040|
0007f8 656c6553 DCB "Sele"
0007fc 6f207463 DCB "ct o"
000800 61726570 DCB "pera"
000804 676e6974 DCB "ting"
000808 6f6c6320 DCB " clo"
00080c 31206b63 DCB "ck 1"
000810 4350202e DCB ". PC"
000814 44284b4c DCB "LK(D"
000818 20202029 DCB ") "
00081c 202e3220 DCB " 2. "
000820 4b4c4355 DCB "UCLK"
000824 20202020 DCB " "
000828 202e3320 DCB " 3. "
00082c 4b4c4346 DCB "FCLK"
000830 20206e2f DCB "/n "
000834 0000000a DCB "\n\0\0\0"
|L1.2104|
000838 00000000 DCD Pclk
|L1.2108|
00083c 0001c200 DCD 0x0001c200
|L1.2112|
000840 00000000 DCD ||.constdata$1||
|L1.2116|
000844 64756142 DCB "Baud"
000848 65746172 DCB "rate"
00084c 78652820 DCB " (ex"
000850 30363920 DCB " 960"
000854 31202c30 DCB "0, 1"
000858 30323531 DCB "1520"
00085c 5d445b30 DCB "0[D]"
000860 3239202c DCB ", 92"
000864 30303631 DCB "1600"
000868 203a2029 DCB ") : "
00086c 00000000 DCB "\0\0\0\0"
|L1.2160|
000870 00000044 DCD ||.constdata$1|| + 68
|L1.2164|
000874 7261555b DCB "[Uar"
000878 68632074 DCB "t ch"
00087c 656e6e61 DCB "anne"
000880 2031206c DCB "l 1 "
000884 49207854 DCB "Tx I"
000888 7265746e DCB "nter"
00088c 74707572 DCB "rupt"
000890 73655420 DCB " Tes"
000894 000a5d74 DCB "t]\n\0"
|L1.2200|
000898 00000000 DCD Uart1_TxInt
|L1.2204|
00089c 31fff000 DCD 0x31fff000
|L1.2208|
0008a0 61555b0a DCB "\n[Ua"
0008a4 63207472 DCB "rt c"
0008a8 6e6e6168 DCB "hann"
0008ac 31206c65 DCB "el 1"
0008b0 20785220 DCB " Rx "
0008b4 65746e49 DCB "Inte"
0008b8 70757272 DCB "rrup"
0008bc 65542074 DCB "t Te"
0008c0 3a5d7473 DCB "st]:"
0008c4 0000000a DCB "\n\0\0\0"
|L1.2248|
0008c8 00000090 DCD ||.constdata$1|| + 144
|L1.2252|
0008cc 206f540a DCB "\nTo "
0008d0 74697571 DCB "quit"
0008d4 7270202c DCB ", pr"
0008d8 20737365 DCB "ess "
0008dc 45544e45 DCB "ENTE"
0008e0 656b2052 DCB "R ke"
0008e4 21212e79 DCB "y.!!"
0008e8 00000a21 DCB "!\n\0\0"
|L1.2284|
0008ec 00000000 DCD Uart1_RxIntOrErr
|L1.2288|
0008f0 000a7325 DCB "%s\n\0"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -