📄 uart0.txt
字号:
;;;226 }
;;;227 //for(i=0;i<100;i++); // For the satble operation
;;;228 }
|L1.1552|
000610 e28dd014 ADD sp,sp,#0x14
000614 e8bd8030 LDMFD sp!,{r4,r5,pc}
|L1.1560|
000618 00000000 DCFD 0x4148519600000000
00061c 41485196
|L1.1568|
000620 4b4c4350 DCB "PCLK"
000624 20736920 DCB " is "
000628 62616e65 DCB "enab"
00062c 2064656c DCB "led "
000630 55207962 DCB "by U"
000634 30545241 DCB "ART0"
000638 00000a2e DCB ".\n\0\0"
|L1.1596|
00063c 4b4c4350 DCB "PCLK"
000640 20736920 DCB " is "
000644 62616e65 DCB "enab"
000648 2064656c DCB "led "
00064c 55207962 DCB "by U"
000650 31545241 DCB "ART1"
000654 00000a2e DCB ".\n\0\0"
ENDP
Uart0_TxInt PROC
;;;231 void __irq Uart0_TxInt(void)
;;;232 {
000658 e92d0007 STMFD sp!,{r0-r2}
;;;233 rINTSUBMSK|=(BIT_SUB_RXD0|BIT_SUB_TXD0|BIT_SUB_ERR0); // Just for the safety
00065c e59f016c LDR r0,|L1.2000|
000660 e590001c LDR r0,[r0,#0x1c]
000664 e3800007 ORR r0,r0,#7
000668 e59f1160 LDR r1,|L1.2000|
00066c e581001c STR r0,[r1,#0x1c]
;;;234 if(*uart0TxStr != '\0')
000670 e59f015c LDR r0,|L1.2004|
000674 e5900000 LDR r0,[r0,#0] ; uart0TxStr
000678 e5d00000 LDRB r0,[r0,#0]
00067c e3500000 CMP r0,#0
000680 0a000017 BEQ |L1.1764|
;;;235 {
;;;236 WrUTXH0(*uart0TxStr++);
000684 e59f0148 LDR r0,|L1.2004|
000688 e5901000 LDR r1,[r0,#0] ; uart0TxStr
00068c e5d10000 LDRB r0,[r1,#0]
000690 e2811001 ADD r1,r1,#1
000694 e59f2138 LDR r2,|L1.2004|
000698 e5821000 STR r1,[r2,#0] ; uart0TxStr
00069c e51f1220 LDR r1,|L1.1156|
0006a0 e5c10020 STRB r0,[r1,#0x20]
;;;237 ClearPending(BIT_UART0); // Clear master pending
0006a4 e3a00b80 MOV r0,#0x20000
0006a8 e2411642 SUB r1,r1,#0x4200000
0006ac e5810000 STR r0,[r1,#0]
0006b0 e1c10000 BIC r0,r1,r0
0006b4 e5900010 LDR r0,[r0,#0x10]
0006b8 e5810010 STR r0,[r1,#0x10]
0006bc e1a00001 MOV r0,r1
0006c0 e5900010 LDR r0,[r0,#0x10]
;;;238 rSUBSRCPND=(BIT_SUB_TXD0); // Clear Sub int pending
0006c4 e3a00002 MOV r0,#2
0006c8 e1c11000 BIC r1,r1,r0
0006cc e5810018 STR r0,[r1,#0x18]
;;;239 rINTSUBMSK&=~(BIT_SUB_TXD0); // Unmask sub int
0006d0 e1c10000 BIC r0,r1,r0
0006d4 e590001c LDR r0,[r0,#0x1c]
0006d8 e3c00002 BIC r0,r0,#2
0006dc e581001c STR r0,[r1,#0x1c]
0006e0 ea000011 B |L1.1836|
;;;240 }
;;;241 else
;;;242 {
;;;243 isTxInt=0;
|L1.1764|
0006e4 e3a00000 MOV r0,#0
0006e8 e59f10e8 LDR r1,|L1.2008|
0006ec e5810000 STR r0,[r1,#0] ; isTxInt
;;;244 ClearPending(BIT_UART0); // Clear master pending
0006f0 e3a00b80 MOV r0,#0x20000
0006f4 e59f10d4 LDR r1,|L1.2000|
0006f8 e5810000 STR r0,[r1,#0]
0006fc e1c10000 BIC r0,r1,r0
000700 e5900010 LDR r0,[r0,#0x10]
000704 e5810010 STR r0,[r1,#0x10]
000708 e1a00001 MOV r0,r1
00070c e5900010 LDR r0,[r0,#0x10]
;;;245 rSUBSRCPND=(BIT_SUB_TXD0); // Clear Sub int pending
000710 e3a00002 MOV r0,#2
000714 e1c11000 BIC r1,r1,r0
000718 e5810018 STR r0,[r1,#0x18]
;;;246 rINTMSK|=(BIT_UART0);
00071c e1c10000 BIC r0,r1,r0
000720 e5900008 LDR r0,[r0,#8]
000724 e3800b80 ORR r0,r0,#0x20000
000728 e5810008 STR r0,[r1,#8]
;;;247 }
;;;248 }
|L1.1836|
00072c e8bd0007 LDMFD sp!,{r0-r2}
000730 e25ef004 SUBS pc,lr,#4
ENDP
__sub_Uart0_RxErrInt PROC
;;;285 void __sub_Uart0_RxErrInt(void)
;;;286 {
000734 e92d4010 STMFD sp!,{r4,lr}
;;;287 U8 status;
;;;288
;;;289 Uart_Select(1);
000738 e3a00001 MOV r0,#1
00073c ebfffffe BL Uart_Select
;;;290 Uart_Printf("Enter Error interrupt service routine\n");
000740 e28f0094 ADR r0,|L1.2012|
000744 ebfffffe BL _printf
;;;291
;;;292 status = rUERSTAT0; //to clear and check the status of register bits
000748 e51f02cc LDR r0,|L1.1156|
00074c e5900014 LDR r0,[r0,#0x14]
000750 e20040ff AND r4,r0,#0xff
;;;293 Uart_Printf(" UERSTAT0 = 0x%x\n", status);
000754 e1a01004 MOV r1,r4
000758 e28f00a4 ADR r0,|L1.2052|
00075c ebfffffe BL _printf
;;;294
;;;295 switch(status)
000760 e3540001 CMP r4,#1
000764 0a000006 BEQ |L1.1924|
000768 e3540002 CMP r4,#2
00076c 0a000007 BEQ |L1.1936|
000770 e3540004 CMP r4,#4
000774 0a000008 BEQ |L1.1948|
000778 e3540008 CMP r4,#8
00077c 1a00000c BNE |L1.1972|
000780 ea000008 B |L1.1960|
;;;296 {
;;;297 case 1:
;;;298 Uart_Printf("Overrun error\n");
|L1.1924|
000784 e28f008c ADR r0,|L1.2072|
000788 ebfffffe BL _printf
;;;299 break;
00078c ea000009 B |L1.1976|
;;;300 case 2:
;;;301 Uart_Printf("Parity error\n");
|L1.1936|
000790 e28f0090 ADR r0,|L1.2088|
000794 ebfffffe BL _printf
;;;302 break;
000798 ea000006 B |L1.1976|
;;;303 case 4:
;;;304 Uart_Printf("Frame error\n");
|L1.1948|
00079c e28f0094 ADR r0,|L1.2104|
0007a0 ebfffffe BL _printf
;;;305 break;
0007a4 ea000003 B |L1.1976|
;;;306 case 8:
;;;307 Uart_Printf("Breake detect\n");
|L1.1960|
0007a8 e28f0098 ADR r0,|L1.2120|
0007ac ebfffffe BL _printf
;;;308 break;
0007b0 ea000000 B |L1.1976|
;;;309 default :
;;;310 break;
|L1.1972|
0007b4 e1a00000 NOP
;;;311 }
;;;312 Uart_Select(0);
|L1.1976|
0007b8 e3a00000 MOV r0,#0
0007bc ebfffffe BL Uart_Select
;;;313 isRxInt=0;
0007c0 e3a00000 MOV r0,#0
0007c4 e59f108c LDR r1,|L1.2136|
0007c8 e5810000 STR r0,[r1,#0] ; isRxInt
;;;314 }
0007cc e8bd8010 LDMFD sp!,{r4,pc}
|L1.2000|
0007d0 40200000 DCD 0x40200000
|L1.2004|
0007d4 00000074 DCD ||.bss$2|| + 116
|L1.2008|
0007d8 00000018 DCD ||.bss$2|| + 24
|L1.2012|
0007dc 65746e45 DCB "Ente"
0007e0 72452072 DCB "r Er"
0007e4 20726f72 DCB "ror "
0007e8 65746e69 DCB "inte"
0007ec 70757272 DCB "rrup"
0007f0 65732074 DCB "t se"
0007f4 63697672 DCB "rvic"
0007f8 6f722065 DCB "e ro"
0007fc 6e697475 DCB "utin"
000800 00000a65 DCB "e\n\0\0"
|L1.2052|
000804 45552020 DCB " UE"
000808 41545352 DCB "RSTA"
00080c 3d203054 DCB "T0 ="
000810 25783020 DCB " 0x%"
000814 00000a78 DCB "x\n\0\0"
|L1.2072|
000818 7265764f DCB "Over"
00081c 206e7572 DCB "run "
000820 6f727265 DCB "erro"
000824 00000a72 DCB "r\n\0\0"
|L1.2088|
000828 69726150 DCB "Pari"
00082c 65207974 DCB "ty e"
000830 726f7272 DCB "rror"
|L1.2100|
000834 0000000a DCB "\n\0\0\0"
|L1.2104|
000838 6d617246 DCB "Fram"
00083c 72652065 DCB "e er"
000840 0a726f72 DCB "ror\n"
000844 00000000 DCB "\0\0\0\0"
|L1.2120|
000848 61657242 DCB "Brea"
00084c 6420656b DCB "ke d"
000850 63657465 DCB "etec"
000854 00000a74 DCB "t\n\0\0"
|L1.2136|
000858 0000001c DCD ||.bss$2|| + 28
ENDP
__sub_Uart0_RxInt PROC
;;;261 void __sub_Uart0_RxInt(void)
;;;262 {
00085c e92d4008 STMFD sp!,{r3,lr}
;;;263 /*
;;;264 int cnt;
;;;265
;;;266 cnt = rUFSTAT0&0x3f;
;;;267 Uart_Printf("RxFIFO is %d\n", cnt);
;;;268 Uart_Select(1);
;;;269 */
;;;270 if(RdURXH0()!='\r')
000860 e51f03e4 LDR r0,|L1.1156|
000864 e5d00024 LDRB r0,[r0,#0x24]
000868 e350000d CMP r0,#0xd
00086c 0a00000d BEQ |L1.2216|
;;;271 {
;;;272 Uart_Printf("%c",RdURXH0());
000870 e51f03f4 LDR r0,|L1.1156|
000874 e5d00024 LDRB r0,[r0,#0x24]
000878 e1a01000 MOV r1,r0
00087c e28f004c ADR r0,|L1.2256|
000880 ebfffffe BL _printf
;;;273 *uart0RxStr++ =(char)RdURXH0();
000884 e51f0408 LDR r0,|L1.1156|
000888 e5d01024 LDRB r1,[r0,#0x24]
00088c e59f0040 LDR r0,|L1.2260|
000890 e5900000 LDR r0,[r0,#0] ; uart0RxStr
000894 e5c01000 STRB r1,[r0,#0]
000898 e2800001 ADD r0,r0,#1
00089c e59f1030 LDR r1,|L1.2260|
0008a0 e5810000 STR r0,[r1,#0] ; uart0RxStr
0008a4 ea000008 B |L1.2252|
;;;274 }
;;;275 else
;;;276 {
;;;277 isRxInt=0;
|L1.2216|
0008a8 e3a00000 MOV r0,#0
0008ac e51f105c LDR r1,|L1.2136|
0008b0 e5810000 STR r0,[r1,#0] ; isRxInt
;;;278 *uart0RxStr='\0';
0008b4 e3a00000 MOV r0,#0
0008b8 e59f1014 LDR r1,|L1.2260|
0008bc e5911000 LDR r1,[r1,#0] ; uart0RxStr
0008c0 e5c10000 STRB r0,[r1,#0]
;;;279 Uart_Printf("\n");
0008c4 e24f0098 ADR r0,|L1.2100|
0008c8 ebfffffe BL _printf
;;;280 }
;;;281
;;;282 // Uart_Select(0);
;;;283 }
|L1.2252|
0008cc e8bd8008 LDMFD sp!,{r3,pc}
|L1.2256|
0008d0 00006325 DCB "%c\0\0"
|L1.2260|
0008d4 00000078 DCD ||.bss$2|| + 120
ENDP
Uart0_RxIntOrErr PROC
;;;250 void __irq Uart0_RxIntOrErr(void)
;;;251 {
0008d8 e92d500f STMFD sp!,{r0-r3,r12,lr}
;;;252 rINTSUBMSK|=(BIT_SUB_RXD0|BIT_SUB_TXD0|BIT_SUB_ERR0);
0008dc e51f0114 LDR r0,|L1.2000|
0008e0 e590001c LDR r0,[r0,#0x1c]
0008e4 e3800007 ORR r0,r0,#7
0008e8 e51f1120 LDR r1,|L1.2000|
0008ec e581001c STR r0,[r1,#0x1c]
;;;253 if(rSUBSRCPND&BIT_SUB_RXD0) __sub_Uart0_RxInt();
0008f0 e1a00001 MOV r0,r1
0008f4 e5900018 LDR r0,[r0,#0x18]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -