📄 uart2.txt
字号:
0008d4 ebfffffe BL Uart_Printf
;;;266
;;;267
;;;268 //----------------------------------------------------------------------------------------->
;;;269 Uart_Printf("Jumper Setting <======> J16: 2-3, J18:2-3");
0008d8 e28f0f5e ADR r0,|L1.2648|
0008dc ebfffffe BL Uart_Printf
;;;270 Uart_Printf("\nConnect PC[COM1 or COM2] and UART1 of SMDK2442 with a serial cable!!! \n");
0008e0 e59f019c LDR r0,|L1.2692|
0008e4 ebfffffe BL Uart_Printf
;;;271 Uart_Printf("Then, press any key........\n");
0008e8 e28f00ec ADR r0,|L1.2524|
0008ec ebfffffe BL Uart_Printf
;;;272 Uart_Select(1);
0008f0 e3a00001 MOV r0,#1
0008f4 ebfffffe BL Uart_Select
;;;273 Uart_Getch();
0008f8 ebfffffe BL Uart_Getch
;;;274 //--------------------------->
;;;275
;;;276
;;;277 Uart_Port_Return();
0008fc ebfffffe BL Uart_Port_Return
;;;278 }
000900 e8bd8010 LDMFD sp!,{r4,pc}
|L1.2308|
000904 00000000 DCD rx_point
|L1.2312|
000908 00000000 DCD rx_filesize
|L1.2316|
00090c 00000000 DCD rx_dncs
|L1.2320|
000910 00000000 DCD rx_isdone
|L1.2324|
000914 00000000 DCD rx_checksum
|L1.2328|
000918 7261555b DCB "[Uar"
00091c 68632074 DCB "t ch"
000920 656e6e61 DCB "anne"
000924 2030206c DCB "l 0 "
000928 65746e49 DCB "Inte"
00092c 70757272 DCB "rrup"
000930 65742074 DCB "t te"
000934 0a5d7473 DCB "st]\n"
000938 00000000 DCB "\0\0\0\0"
|L1.2364|
00093c 00000000 DCD ||.constdata$1||
|L1.2368|
000940 0001c200 DCD 0x0001c200
|L1.2372|
000944 656c6553 DCB "Sele"
000948 31207463 DCB "ct 1"
00094c 4155202e DCB ". UA"
000950 6f205452 DCB "RT o"
000954 2e322072 DCB "r 2."
000958 44724920 DCB " IrD"
00095c 29442841 DCB "A(D)"
000960 646f6d20 DCB " mod"
000964 68430a65 DCB "e\nCh"
000968 65736f6f DCB "oose"
00096c 00203a20 DCB " : \0"
|L1.2416|
000970 00000048 DCD ||.constdata$1|| + 72
|L1.2420|
000974 7261555b DCB "[Uar"
000978 68632074 DCB "t ch"
00097c 656e6e61 DCB "anne"
000980 2032206c DCB "l 2 "
000984 49207854 DCB "Tx I"
000988 7265746e DCB "nter"
00098c 74707572 DCB "rupt"
000990 73655420 DCB " Tes"
000994 000a5d74 DCB "t]\n\0"
|L1.2456|
000998 706d754a DCB "Jump"
00099c 53207265 DCB "er S"
0009a0 69747465 DCB "etti"
0009a4 2020676e DCB "ng "
0009a8 3d3d3d3c DCB "<==="
0009ac 3e3d3d3d DCB "===>"
0009b0 37314a20 DCB " J17"
0009b4 332d323a DCB ":2-3"
0009b8 314a202c DCB ", J1"
0009bc 2d323a39 DCB "9:2-"
0009c0 4a202c33 DCB "3, J"
0009c4 203a3631 DCB "16: "
0009c8 2c322d31 DCB "1-2,"
0009cc 38314a20 DCB " J18"
0009d0 322d313a DCB ":1-2"
0009d4 00000000 DCB "\0\0\0\0"
|L1.2520|
0009d8 00000094 DCD ||.constdata$1|| + 148
|L1.2524|
0009dc 6e656854 DCB "Then"
0009e0 7270202c DCB ", pr"
0009e4 20737365 DCB "ess "
0009e8 20796e61 DCB "any "
0009ec 2e79656b DCB "key."
0009f0 2e2e2e2e DCB "...."
0009f4 0a2e2e2e DCB "...\n"
0009f8 00000000 DCB "\0\0\0\0"
|L1.2556|
0009fc 00000000 DCD Uart2_TxInt
|L1.2560|
000a00 31fff000 DCD 0x31fff000
|L1.2564|
000a04 61555b0a DCB "\n[Ua"
000a08 63207472 DCB "rt c"
000a0c 6e6e6168 DCB "hann"
000a10 32206c65 DCB "el 2"
000a14 20785220 DCB " Rx "
000a18 65746e49 DCB "Inte"
000a1c 70757272 DCB "rrup"
000a20 65542074 DCB "t Te"
000a24 3a5d7473 DCB "st]:"
000a28 0000000a DCB "\n\0\0\0"
|L1.2604|
000a2c 000000e0 DCD ||.constdata$1|| + 224
|L1.2608|
000a30 206f540a DCB "\nTo "
000a34 74697571 DCB "quit"
000a38 7270202c DCB ", pr"
000a3c 20737365 DCB "ess "
000a40 45544e45 DCB "ENTE"
000a44 656b2052 DCB "R ke"
000a48 21212e79 DCB "y.!!"
000a4c 00000a21 DCB "!\n\0\0"
|L1.2640|
000a50 00000000 DCD Uart2_RxIntOrErr
|L1.2644|
000a54 000a7325 DCB "%s\n\0"
|L1.2648|
000a58 706d754a DCB "Jump"
000a5c 53207265 DCB "er S"
000a60 69747465 DCB "etti"
000a64 2020676e DCB "ng "
000a68 3d3d3d3c DCB "<==="
000a6c 3e3d3d3d DCB "===>"
000a70 314a2020 DCB " J1"
000a74 32203a36 DCB "6: 2"
000a78 202c332d DCB "-3, "
000a7c 3a38314a DCB "J18:"
000a80 00332d32 DCB "2-3\0"
|L1.2692|
000a84 0000012c DCD ||.constdata$1|| + 300
ENDP
Test_Uart2_Dma PROC
;;;280 void Test_Uart2_Dma(void)
;;;281 {
000a88 e92d4008 STMFD sp!,{r3,lr}
;;;282 Uart_Port_Set();
000a8c ebfffffe BL Uart_Port_Set
;;;283 // Additional configuration for UART2 port
;;;284 //rGPHCON&=0x3fafff; // TXD2,RXD2
;;;285
;;;286 Uart_Select(1);
000a90 e3a00001 MOV r0,#1
000a94 ebfffffe BL Uart_Select
;;;287 /*********** UART2 Tx test with DMA3 ***********/
;;;288 isDone=1;
000a98 e3a00001 MOV r0,#1
000a9c e51f16c4 LDR r1,|L1.992|
000aa0 e5810000 STR r0,[r1,#0] ; isDone
;;;289 uart2TxStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890->UART2 Tx Test by DMA3 is good!!!!\r\n";
000aa4 e59f0234 LDR r0,|L1.3296|
000aa8 e51f1958 LDR r1,|L1.344|
000aac e5810000 STR r0,[r1,#0] ; uart2TxStr
;;;290 Uart_Printf("\n[Uart channel 2 DMA3 Tx Test]\n");
000ab0 e28f0f8b ADR r0,|L1.3300|
000ab4 ebfffffe BL Uart_Printf
;;;291 Uart_TxEmpty(1);
000ab8 e3a00001 MOV r0,#1
000abc ebfffffe BL Uart_TxEmpty
;;;292
;;;293 //-------------------------------------------------------------------------------------------->
;;;294 Uart_Printf("Jumper Setting <======> J17:2-3, J19:2-3, J16: 1-2, J18:1-2");
000ac0 e28f0f8f ADR r0,|L1.3332|
000ac4 ebfffffe BL Uart_Printf
;;;295 Uart_Printf("\nConnect PC[COM1 or COM2] and UART2 of SMDK2442 with a serial cable!!! \n");
000ac8 e51f00f8 LDR r0,|L1.2520|
000acc ebfffffe BL Uart_Printf
;;;296 Uart_Printf("Then, press any key........\n");
000ad0 e24f00fc ADR r0,|L1.2524|
000ad4 ebfffffe BL Uart_Printf
;;;297 Uart_Select(2); // Change the uart port
000ad8 e3a00002 MOV r0,#2
000adc ebfffffe BL Uart_Select
;;;298 Uart_Getch();
000ae0 ebfffffe BL Uart_Getch
;;;299 Uart_Printf("Port is changed.......\n");
000ae4 e28f0f96 ADR r0,|L1.3396|
000ae8 ebfffffe BL Uart_Printf
;;;300 //----------------------------------------->
;;;301
;;;302
;;;303 pISR_DMA3 =(unsigned)Uart2_TxDmaDone;
000aec e59f0268 LDR r0,|L1.3420|
000af0 e51f10f8 LDR r1,|L1.2560|
000af4 e5810f70 STR r0,[r1,#0xf70]
;;;304
;;;305 rULCON2=(0<<6)|(0<<3)|(0<<2)|(3); // Normal,No parity,One stop bit, 8bit
000af8 e3a00003 MOV r0,#3
000afc e51f19a8 LDR r1,|L1.348|
000b00 e5810000 STR r0,[r1,#0]
;;;306 rUCON2 = (TX_INTTYPE<<9)|(RX_INTTYPE<<8)|(0<<7)|(0<<6)|(0<<5)|(0<<4)|(2<<2)|(1);
000b04 e59f0254 LDR r0,|L1.3424|
000b08 e1c11000 BIC r1,r1,r0
000b0c e5810004 STR r0,[r1,#4]
;;;307 //Clock,Tx:Def,Rx:Def,Rx timeout:x,Rx error int:x,Loop-back:x,Send break:x,Tx:dma3,Rx:int
;;;308
;;;309 /***DMA3 init***/
;;;310 rDISRC3=(U32)uart2TxStr; // Start address
000b10 e51f09c0 LDR r0,|L1.344|
000b14 e5900000 LDR r0,[r0,#0] ; uart2TxStr
000b18 e3a0144b MOV r1,#0x4b000000
000b1c e58100c0 STR r0,[r1,#0xc0]
;;;311 rDISRCC3=(0<<1)|(0); // AHB,Increment
000b20 e3a00000 MOV r0,#0
000b24 e3a0144b MOV r1,#0x4b000000
000b28 e58100c4 STR r0,[r1,#0xc4]
;;;312 rDIDST3=(U32)UTXH2; // Memory buffer Address
000b2c e59f0230 LDR r0,|L1.3428|
000b30 e3a0144b MOV r1,#0x4b000000
000b34 e58100c8 STR r0,[r1,#0xc8]
;;;313 rDIDSTC3=(1<<1)|(1); // APB,Fixed
000b38 e3a00003 MOV r0,#3
000b3c e3a0144b MOV r1,#0x4b000000
000b40 e58100cc STR r0,[r1,#0xcc]
;;;314 rDCON3=(1<<31)|(0<<30)|(1<<29)|(0<<28)|(0<<27)|(0<<24)|(1<<23)|(1<<22)|(0<<20)|strlen((char*)uart2TxStr);
000b44 e51f09f4 LDR r0,|L1.344|
000b48 e5900000 LDR r0,[r0,#0] ; uart2TxStr
000b4c ebfffffe BL strlen
000b50 e3800480 ORR r0,r0,#0x80000000
000b54 e3800583 ORR r0,r0,#0x20c00000
000b58 e3a0144b MOV r1,#0x4b000000
000b5c e58100d0 STR r0,[r1,#0xd0]
;;;315 //handshake, sync PCLK, TC int, single tx, single service, Uart2, H/W request,auto-reload off, Byte size Tx, Tx count value
;;;316 rINTMSK=~(BIT_DMA3);
000b60 e3e00940 MVN r0,#0x100000
000b64 e3a0144a MOV r1,#0x4a000000
000b68 e5810008 STR r0,[r1,#8]
;;;317 rDMASKTRIG3=(0<<2)|(1<<1)|(0); //no-stop, DMA3 channel on, no-SW trigger
000b6c e3a00002 MOV r0,#2
000b70 e3a0144b MOV r1,#0x4b000000
000b74 e58100e0 STR r0,[r1,#0xe0]
;;;318
;;;319 while(isDone);
000b78 e1a00000 NOP
|L1.2940|
000b7c e51f07a4 LDR r0,|L1.992|
000b80 e5900000 LDR r0,[r0,#0] ; isDone
000b84 e3500000 CMP r0,#0
000b88 1afffffb BNE |L1.2940|
;;;320
;;;321 /*********** UART2 Rx test with DMA3 ***********/
;;;322 isDone=1;
000b8c e3a00001 MOV r0,#1
000b90 e51f17b8 LDR r1,|L1.992|
000b94 e5810000 STR r0,[r1,#0] ; isDone
;;;323 uart2RxStr=(char *)UARTBUFFER;
000b98 e3a005c4 MOV r0,#0x31000000
000b9c e51f1984 LDR r1,|L1.544|
000ba0 e5810000 STR r0,[r1,#0] ; uart2RxStr
;;;324 Uart_Printf("\n[Uart channel 2 DMA3 Rx Test]\n");
000ba4 e28f0f6f ADR r0,|L1.3432|
000ba8 ebfffffe BL Uart_Printf
;;;325 Uart_Printf("Type any five keys!!!\n");
000bac e28f0f75 ADR r0,|L1.3464|
000bb0 ebfffffe BL Uart_Printf
;;;326 Uart_Printf("Then you will see what you typed.\n");
000bb4 e28f0f79 ADR r0,|L1.3488|
000bb8 ebfffffe BL Uart_Printf
;;;327
;;;328 pISR_DMA3=(unsigned)Uart2_RxDmaDone;
000bbc e59f0200 LDR r0,|L1.3524|
000bc0 e51f11c8 LDR r1,|L1.2560|
000bc4 e5810f70 STR r0,[r1,#0xf70]
;;;329 pISR_UART2=(unsigned)Uart2_RxDmaOrErr;
000bc8 e59f01f8 LDR r0,|L1.3528|
000bcc e5810f5c STR r0,[r1,#0xf5c]
;;;330
;;;331 rULCON2=(0<<6)|(0<<3)|(0<<2)|(3); // Normal,No parity,One stop bit, 8bit
000bd0 e3a00003 MOV r0,#3
000bd4 e51f1a80 LDR r1,|L1.348|
000bd8 e5810000 STR r0,[r1,#0]
;;;332 rUCON2 &= 0x400; // For the PCLK <-> UCLK fuction
000bdc e1c10000 BIC r0,r1,r0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -