⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spi01.txt

📁 支持三星原产的S3C24A0开发板
💻 TXT
📖 第 1 页 / 共 5 页
字号:
0008ec  e3c00840          BIC      r0,r0,#0x400000
0008f0  e5810008          STR      r0,[r1,#8]
;;;310    		
;;;311    	while((endSpi1Tx==0)||(end0SpiTx==0))
0008f4  e1a00000          NOP      
                  |L1.2296|
0008f8  e51f03d0          LDR      r0,|L1.1328|
0008fc  e5900000          LDR      r0,[r0,#0]  ; endSpi1Tx
000900  e3500000          CMP      r0,#0
000904  0a000003          BEQ      |L1.2328|
000908  e51f070c          LDR      r0,|L1.516|
00090c  e5900000          LDR      r0,[r0,#0]  ; end0SpiTx
000910  e3500000          CMP      r0,#0
000914  1a000047          BNE      |L1.2616|
;;;312    		{
;;;313    		//Uart_Printf("#");
;;;314    		if(Uart_GetKey())
                  |L1.2328|
000918  ebfffffe          BL       Uart_GetKey
00091c  e3500000          CMP      r0,#0
000920  0a000043          BEQ      |L1.2612|
;;;315    			return;
;;;316    		}
;;;317    	
;;;318    	Master_nSS_Con(1);
;;;319    	
;;;320    	Uart_Printf("ISR0 count :%d, ISR1 count :%d\n\n",c0,c1);
;;;321    	
;;;322       #if FORMAT0_A
;;;323    	rSPCON0=(0<<5)|(0<<4)|(1<<3)|(1<<2)|(0<<1)|(0<<0);//Poll,dis-SCK,master,low,A,normal
;;;324    	rSPCON1=(0<<5)|(0<<4)|(0<<3)|(1<<2)|(0<<1)|(0<<0);//Poll,dis-SCK,slave,low,A,normal
;;;325       #else
;;;326    	rSPCON0=(0<<5)|(0<<4)|(1<<3)|(1<<2)|(1<<1)|(0<<0);//Poll,dis-SCK,master,low,B,normal
;;;327    	rSPCON1=(0<<5)|(0<<4)|(0<<3)|(1<<2)|(1<<1)|(0<<0);//Poll,dis-SCK,slave,low,B,normal
;;;328       #endif
;;;329    	
;;;330    	*spi0RxStr='\0';//attach End of String(Null)
;;;331    	*spi1RxStr='\0';//attach End of String(Null)
;;;332    	Uart_Printf("SPI0Tx Strings:%s\n",tx0Str);
;;;333    	Uart_Printf("SPI0Rx Strings:%s\n",rx0Str+1);//remove first dummy data
;;;334    
;;;335    	Uart_Printf("SPI1Tx Strings:%s\n",tx1Str);
;;;336    	Uart_Printf("SPI1Rx Strings:%s\n",rx1Str+1);//remove first dummy data
;;;337    
;;;338    	if(strcmp((rx1Str+1),tx0Str)==0)
;;;339    		Uart_Printf("SPI0 test O.K !!!\n");
;;;340    	if(strcmp((rx0Str+1),tx1Str)==0)
;;;341    		Uart_Printf("SPI1 test O.K !!!\n");
;;;342    	else 
;;;343    		Uart_Printf("ERROR!!!\n");
;;;344    
;;;345    	SPI0_Port_Return();
;;;346    }
                  |L1.2340|
000924  e8bd80f8          LDMFD    sp!,{r3-r7,pc}
                  |L1.2344|
000928  4950535b          DCB      "[SPI"
00092c  614d2830          DCB      "0(Ma"
000930  72657473          DCB      "ster"
000934  53202c29          DCB      "), S"
000938  28314950          DCB      "PI1("
00093c  76616c53          DCB      "Slav"
000940  49202965          DCB      "e) I"
000944  7265746e          DCB      "nter"
000948  74707572          DCB      "rupt"
00094c  2f785220          DCB      " Rx/"
000950  74207854          DCB      "Tx t"
000954  5d747365          DCB      "est]"
000958  0000000a          DCB      "\n\0\0\0"
                  |L1.2396|
00095c  6e6e6f43          DCB      "Conn"
000960  20746365          DCB      "ect "
000964  3a37334a          DCB      "J37:"
000968  2d312820          DCB      " (1-"
00096c  61202932          DCB      "2) a"
000970  4320646e          DCB      "nd C"
000974  31324e4f          DCB      "ON21"
000978  3128203a          DCB      ": (1"
00097c  2930322d          DCB      "-20)"
000980  2d32282c          DCB      ",(2-"
000984  2c293931          DCB      "19),"
000988  312d3328          DCB      "(3-1"
00098c  282c2938          DCB      "8),("
000990  37312d34          DCB      "4-17"
000994  00000a29          DCB      ")\n\0\0"
                  |L1.2456|
000998  00000000          DCD      Spi1_Int
                  |L1.2460|
00099c  34333231          DCB      "1234"
0009a0  38373635          DCB      "5678"
0009a4  42413039          DCB      "90AB"
0009a8  46454443          DCB      "CDEF"
0009ac  4a494847          DCB      "GHIJ"
0009b0  4e4d4c4b          DCB      "KLMN"
0009b4  5251504f          DCB      "OPQR"
0009b8  56555453          DCB      "STUV"
0009bc  5a595857          DCB      "WXYZ"
0009c0  34333231          DCB      "1234"
0009c4  38373635          DCB      "5678"
0009c8  00003039          DCB      "90\0\0"
                  |L1.2508|
0009cc  44434241          DCB      "ABCD"
0009d0  48474645          DCB      "EFGH"
0009d4  4c4b4a49          DCB      "IJKL"
0009d8  504f4e4d          DCB      "MNOP"
0009dc  54535251          DCB      "QRST"
0009e0  58575655          DCB      "UVWX"
0009e4  32315a59          DCB      "YZ12"
0009e8  36353433          DCB      "3456"
0009ec  30393837          DCB      "7890"
0009f0  34333231          DCB      "1234"
0009f4  38373635          DCB      "5678"
0009f8  00003039          DCB      "90\0\0"
                  |L1.2556|
0009fc  76616c53          DCB      "Slav"
000a00  65732065          DCB      "e se"
000a04  6e697474          DCB      "ttin"
000a08  6e652067          DCB      "g en"
000a0c  2e2e2e64          DCB      "d..."
000a10  73657250          DCB      "Pres"
000a14  6e652073          DCB      "s en"
000a18  0a726574          DCB      "ter\n"
000a1c  00000000          DCB      "\0\0\0\0"
                  |L1.2592|
000a20  2053536e          DCB      "nSS "
000a24  61207369          DCB      "is a"
000a28  72657373          DCB      "sser"
000a2c  0a646574          DCB      "ted\n"
000a30  00000000          DCB      "\0\0\0\0"
                  |L1.2612|
000a34  eaffffaf          B        |L1.2296|             ;316
                  |L1.2616|
000a38  e3a00001          MOV      r0,#1                 ;318
000a3c  ebfffffe          BL       Master_nSS_Con        ;318
000a40  e51f0524          LDR      r0,|L1.1316|          ;320
000a44  e5902000          LDR      r2,[r0,#0]            ;320  ; c1
000a48  e51f088c          LDR      r0,|L1.452|           ;320
000a4c  e5901000          LDR      r1,[r0,#0]            ;320  ; c0
000a50  e28f00b4          ADR      r0,|L1.2828|          ;320
000a54  ebfffffe          BL       _printf               ;320
000a58  e3a0000c          MOV      r0,#0xc               ;323
000a5c  e51f186c          LDR      r1,|L1.504|           ;323
000a60  e5810000          STR      r0,[r1,#0]            ;323
000a64  e3a00004          MOV      r0,#4                 ;324
000a68  e1c11000          BIC      r1,r1,r0              ;324
000a6c  e5810020          STR      r0,[r1,#0x20]         ;324
000a70  e3a00000          MOV      r0,#0                 ;330
000a74  e51f1880          LDR      r1,|L1.508|           ;330
000a78  e5911000          LDR      r1,[r1,#0]            ;330  ; spi0RxStr
000a7c  e5c10000          STRB     r0,[r1,#0]            ;330
000a80  e3a00000          MOV      r0,#0                 ;331
000a84  e51f1564          LDR      r1,|L1.1320|          ;331
000a88  e5911000          LDR      r1,[r1,#0]            ;331  ; spi1RxStr
000a8c  e5c10000          STRB     r0,[r1,#0]            ;331
000a90  e1a01006          MOV      r1,r6                 ;332
000a94  e28f0094          ADR      r0,|L1.2864|          ;332
000a98  ebfffffe          BL       _printf               ;332
000a9c  e2841001          ADD      r1,r4,#1              ;333
000aa0  e28f009c          ADR      r0,|L1.2884|          ;333
000aa4  ebfffffe          BL       _printf               ;333
000aa8  e1a01007          MOV      r1,r7                 ;335
000aac  e28f00a4          ADR      r0,|L1.2904|          ;335
000ab0  ebfffffe          BL       _printf               ;335
000ab4  e2851001          ADD      r1,r5,#1              ;336
000ab8  e28f00ac          ADR      r0,|L1.2924|          ;336
000abc  ebfffffe          BL       _printf               ;336
000ac0  e1a01006          MOV      r1,r6                 ;338
000ac4  e2850001          ADD      r0,r5,#1              ;338
000ac8  ebfffffe          BL       strcmp                ;338
000acc  e3500000          CMP      r0,#0                 ;338
000ad0  1a000001          BNE      |L1.2780|             ;338
000ad4  e28f00a4          ADR      r0,|L1.2944|          ;339
000ad8  ebfffffe          BL       _printf               ;339
                  |L1.2780|
000adc  e1a01007          MOV      r1,r7                 ;340
000ae0  e2840001          ADD      r0,r4,#1              ;340
000ae4  ebfffffe          BL       strcmp                ;340
000ae8  e3500000          CMP      r0,#0                 ;340
000aec  1a000002          BNE      |L1.2812|             ;340
000af0  e28f009c          ADR      r0,|L1.2964|          ;341
000af4  ebfffffe          BL       _printf               ;341
000af8  ea000001          B        |L1.2820|             ;341
                  |L1.2812|
000afc  e59f00a4          LDR      r0,|L1.2984|          ;343
000b00  ebfffffe          BL       _printf               ;343
                  |L1.2820|
000b04  ebfffffe          BL       SPI0_Port_Return      ;345
000b08  eaffff85          B        |L1.2340|
                  |L1.2828|
000b0c  30525349          DCB      "ISR0"
000b10  756f6320          DCB      " cou"
000b14  3a20746e          DCB      "nt :"
000b18  202c6425          DCB      "%d, "
000b1c  31525349          DCB      "ISR1"
000b20  756f6320          DCB      " cou"
000b24  3a20746e          DCB      "nt :"
000b28  0a0a6425          DCB      "%d\n\n"
000b2c  00000000          DCB      "\0\0\0\0"
                  |L1.2864|
000b30  30495053          DCB      "SPI0"
000b34  53207854          DCB      "Tx S"
000b38  6e697274          DCB      "trin"
000b3c  253a7367          DCB      "gs:%"
000b40  00000a73          DCB      "s\n\0\0"
                  |L1.2884|
000b44  30495053          DCB      "SPI0"
000b48  53207852          DCB      "Rx S"
000b4c  6e697274          DCB      "trin"
000b50  253a7367          DCB      "gs:%"
000b54  00000a73          DCB      "s\n\0\0"
                  |L1.2904|
000b58  31495053          DCB      "SPI1"
000b5c  53207854          DCB      "Tx S"
000b60  6e697274          DCB      "trin"
000b64  253a7367          DCB      "gs:%"
000b68  00000a73          DCB      "s\n\0\0"
                  |L1.2924|
000b6c  31495053          DCB      "SPI1"
000b70  53207852          DCB      "Rx S"
000b74  6e697274          DCB      "trin"
000b78  253a7367          DCB      "gs:%"
000b7c  00000a73          DCB      "s\n\0\0"
                  |L1.2944|
000b80  30495053          DCB      "SPI0"
000b84  73657420          DCB      " tes"
000b88  2e4f2074          DCB      "t O."
000b8c  2121204b          DCB      "K !!"
000b90  00000a21          DCB      "!\n\0\0"
                  |L1.2964|
000b94  31495053          DCB      "SPI1"
000b98  73657420          DCB      " tes"
000b9c  2e4f2074          DCB      "t O."
000ba0  2121204b          DCB      "K !!"
000ba4  00000a21          DCB      "!\n\0\0"
                  |L1.2984|
000ba8  00000000          DCD      |L1.1516|
                          ENDP

                  Test_Spi01_SM_Int PROC
;;;349    void Test_Spi01_SM_Int(void) //SPI0: Slave Rx, SPI1:Master Tx
;;;350    {
000bac  e92d40f8          STMFD    sp!,{r3-r7,lr}
;;;351    	char *rx0Str,*tx0Str;
;;;352    	char *rx1Str,*tx1Str;
;;;353    	SPI0_Port_Init(1); // SPI0=Master, SPI1=Slave
000bb0  e3a00001          MOV      r0,#1
000bb4  ebfffffe          BL       SPI0_Port_Init
;;;354    	Uart_Printf("[SPI0(Slave), SPI1(Master) Interrupt Rx/Tx test]\n");
000bb8  e28f0f8d          ADR      r0,|L1.3572|
000bbc  ebfffffe          BL       _printf
;;;355    	Uart_Printf("Connect J36: (1-2) and CON21: (1-20),(2-19),(3-18),(4-17)\n");
000bc0  e28f0f98          ADR      r0,|L1.3624|
000bc4  ebfffffe          BL       _printf
;;;356    
;;;357    	pISR_SPI0=(unsigned)Spi0_Int;
000bc8  e51f063c          LDR      r0,|L1.1428|
000bcc  e51f163c          LDR      r1,|L1.1432|
000bd0  e5810f78          STR      r0,[r1,#0xf78]
;;;358    	pISR_VLX_SPI1=(unsigned)Spi1_Int;
000bd4  e51f0244          LDR      r0,|L1.2456|
000bd8  e5810f94          STR      r0,[r1,#0xf94]
;;;359    	
;;;360    	end0SpiTx=0;
000bdc  e3a00000          MOV      r0,#0
000be0  e51f19e4          LDR      r1,|L1.516|
000be4  e5810000          STR      r0,[r1,#0]  ; end0SpiTx
;;;361    	endSpi1Tx=0;
000be8  e3a00000          MOV      r0,#0
000bec  e51f16c4          LDR      r1,|L1.1328|
000bf0  e5810000          STR      r0,[r1,#0]  ; endSpi1Tx
;;;362    	spi0TxStr="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
000bf4  e24f0f98          ADR      r0,|L1.2460|
000bf8  e51f1a00          LDR      r1,|L1.512|
000bfc  e5810000          STR      r0,[r1,#0]  ; spi0TxStr
;;;363    	//spi0TxStr="1234567890";
;;;364    	spi1TxStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890";
000c00  e24f0f8f          ADR      r0,|L1.2508|
000c04  e51f16e0          LDR      r1,|L1.1324|
000c08  e5810000          STR      r0,[r1,#0]  ; spi1TxStr
;;;365    	//spi1TxStr="ABCDEFGHIJ";
;;;366    	spi0RxStr=(char *) SPI_BUFFER0;
000c0c  e3a00544          MOV      r0,#0x11000000
000c10  e51f1a1c          LDR      r1,|L1.508|
000c14  e5810000          STR      r0,[r1,#0]  ; spi0RxStr
;;;367    	spi1RxStr=(char *) SPI_BUFFER1;
000c18  e2800d40          ADD      r0,r0,#0x1000
000c1c  e51f16fc          LDR      r1,|L1.1320|
000c20  e5810000          STR      r0,[r1,#0]  ; spi1RxStr
;;;368    	
;;;369    	tx0Str=(char *)spi0TxStr;
000c24  e51f0a2c          LDR      r0,|L1.512|
000c28  e5906000          LDR      r6,[r0,#0]  ; spi0TxStr
;;;370    	rx0Str=(char *)spi0RxStr;
000c2c  e51f0a38          LDR      r0,|L1.508|
000c30  e5904000          LDR      r4,[r0,#0]  ; spi0RxStr

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -