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

📄 cs8900.txt

📁 s3c24a0固件测试代码 ? ? ? ? ?啊 
💻 TXT
📖 第 1 页 / 共 2 页
字号:
;;;126    	unsigned int membase = 0;
000210  e3a08000          MOV      r8,#0
;;;127    	unsigned short signature;
;;;128    	unsigned short eisa_number;
;;;129    	unsigned short prod_id;
;;;130    
;;;131    	unsigned char r = FALSE;
000214  e3a09000          MOV      r9,#0
;;;132    
;;;133    	////////////////////////////////////////////////////////
;;;134    	// bank1 = 0x04000000
;;;135    	// cs8900 cs base address 
;;;136    	// ADDR24 - high -> ioread/write
;;;137    	// ADDR24 - low --> mem read/write
;;;138    	////////////////////////////////////////////////////////
;;;139    	// io read/write base address 
;;;140    	// = 0x04000000 + 0x01000000 (ADDR24 high) + 0x300 (cs8900 io base offset) = 0x05000300
;;;141    	//------------------------------------------------------
;;;142    	// memory read/write base address 
;;;143    	// = 0x04000000 + 0x00000000 (ADDR24 low) = 0x04000000
;;;144    	////////////////////////////////////////////////////////
;;;145    	
;;;146    	iobase = 0x05000300;
000218  e59f70c8          LDR      r7,|L1.744|
;;;147    	membase = 0x04000000;
00021c  e3a08640          MOV      r8,#0x4000000
;;;148    	
;;;149    	printf(" CS8900 Probe()\r\n");
000220  e28f00c4          ADR      r0,|L1.748|
000224  ebfffffe          BL       _printf
;;;150    
;;;151    	dwEthernetIOBase  = iobase;
000228  e59f00b4          LDR      r0,|L1.740|
00022c  e5807000          STR      r7,[r0,#0]  ; dwEthernetIOBase
;;;152    	dwEthernetMemBase = membase;
000230  e59f00c8          LDR      r0,|L1.768|
000234  e5808000          STR      r8,[r0,#0]  ; dwEthernetMemBase
;;;153    /*
;;;154    	printf(" CS2\n");
;;;155    	signature = IOREAD(IO_PACKET_PAGE_POINTER);
;;;156        getchar();
;;;157    	
;;;158    	printf(" CS1\n");
;;;159    */
;;;160    	do 
000238  e1a00000          NOP      
;;;161    	{
;;;162    		signature = IOREAD(IO_PACKET_PAGE_POINTER);
00023c  e59f00a0          LDR      r0,|L1.740|
000240  e5900000          LDR      r0,[r0,#0]  ; dwEthernetIOBase
000244  e1d050ba          LDRH     r5,[r0,#0xa]
;;;163    		printf("Signature = 0x%x\r\n", signature);
000248  e1a01005          MOV      r1,r5
00024c  e28f00b0          ADR      r0,|L1.772|
000250  ebfffffe          BL       _printf
;;;164    		if (signature != CS8900_SIGNATURE)
000254  e3550dc0          CMP      r5,#0x3000
000258  0a000002          BEQ      |L1.616|
;;;165    		{
;;;166    			printf("Signature Error = 0x%x\r\n", signature);
00025c  e1a01005          MOV      r1,r5
000260  e28f00b0          ADR      r0,|L1.792|
000264  ebfffffe          BL       _printf
;;;167    			//break;
;;;168    		}
;;;169    											/* Check the EISA registration number.	*/
;;;170    		eisa_number = READ_REG1(PKTPG_EISA_NUMBER);
                  |L1.616|
000268  e3a00000          MOV      r0,#0
00026c  ebfffffe          BL       ReadReg
000270  e1a06000          MOV      r6,r0
;;;171    		printf("Eisa Number = 0x%x\r\n", eisa_number);
000274  e1a01006          MOV      r1,r6
000278  e28f00b4          ADR      r0,|L1.820|
00027c  ebfffffe          BL       _printf
;;;172    		if (eisa_number != CS8900_EISA_NUMBER)
000280  e246cc63          SUB      r12,r6,#0x6300
000284  e25cc00e          SUBS     r12,r12,#0xe
000288  0a000003          BEQ      |L1.668|
;;;173    		{
;;;174    			printf("Eisa Number Error = 0x%x\r\n", eisa_number);
00028c  e1a01006          MOV      r1,r6
000290  e28f00b4          ADR      r0,|L1.844|
000294  ebfffffe          BL       _printf
;;;175    			break;
000298  ea000010          B        |L1.736|
;;;176    		}
;;;177    											/* Check the Product ID.				*/
;;;178    		prod_id = READ_REG1(PKTPG_PRDCT_ID_CODE);
                  |L1.668|
00029c  e3a00002          MOV      r0,#2
0002a0  ebfffffe          BL       ReadReg
0002a4  e1a04000          MOV      r4,r0
;;;179    		printf("Product ID = 0x%x\r\n", prod_id);
0002a8  e1a01004          MOV      r1,r4
0002ac  e28f00b4          ADR      r0,|L1.872|
0002b0  ebfffffe          BL       _printf
;;;180    		if (( prod_id & CS8900_PRDCT_ID_MASK)!= CS8900_PRDCT_ID)
0002b4  e59f00c0          LDR      r0,|L1.892|
0002b8  e1140000          TST      r4,r0
0002bc  0a000003          BEQ      |L1.720|
;;;181    		{
;;;182    			printf("Product ID Error = 0x%x\r\n", prod_id);
0002c0  e1a01004          MOV      r1,r4
0002c4  e28f00b4          ADR      r0,|L1.896|
0002c8  ebfffffe          BL       _printf
;;;183    			break;
0002cc  ea000003          B        |L1.736|
;;;184    		}
;;;185    	   
;;;186    		printf("CS8900 is Detected..\n");
                  |L1.720|
0002d0  e28f00c4          ADR      r0,|L1.924|
0002d4  ebfffffe          BL       _printf
;;;187    		r = TRUE;
0002d8  e3a09001          MOV      r9,#1
;;;188    	} while (0);
0002dc  e1a00000          NOP      
;;;189    
;;;190    	//return r;
;;;191    }
                  |L1.736|
0002e0  e8bd83f8          LDMFD    sp!,{r3-r9,pc}
                  |L1.740|
0002e4  00000000          DCD      ||.bss$2||
                  |L1.744|
0002e8  05000300          DCD      0x05000300
                  |L1.748|
0002ec  38534320          DCB      " CS8"
0002f0  20303039          DCB      "900 "
0002f4  626f7250          DCB      "Prob"
0002f8  0d292865          DCB      "e()\r"
0002fc  0000000a          DCB      "\n\0\0\0"
                  |L1.768|
000300  00000004          DCD      ||.bss$2|| + 4
                  |L1.772|
000304  6e676953          DCB      "Sign"
000308  72757461          DCB      "atur"
00030c  203d2065          DCB      "e = "
000310  78257830          DCB      "0x%x"
000314  00000a0d          DCB      "\r\n\0\0"
                  |L1.792|
000318  6e676953          DCB      "Sign"
00031c  72757461          DCB      "atur"
000320  72452065          DCB      "e Er"
000324  20726f72          DCB      "ror "
000328  7830203d          DCB      "= 0x"
00032c  0a0d7825          DCB      "%x\r\n"
000330  00000000          DCB      "\0\0\0\0"
                  |L1.820|
000334  61736945          DCB      "Eisa"
000338  6d754e20          DCB      " Num"
00033c  20726562          DCB      "ber "
000340  7830203d          DCB      "= 0x"
000344  0a0d7825          DCB      "%x\r\n"
000348  00000000          DCB      "\0\0\0\0"
                  |L1.844|
00034c  61736945          DCB      "Eisa"
000350  6d754e20          DCB      " Num"
000354  20726562          DCB      "ber "
000358  6f727245          DCB      "Erro"
00035c  203d2072          DCB      "r = "
000360  78257830          DCB      "0x%x"
000364  00000a0d          DCB      "\r\n\0\0"
                  |L1.872|
000368  646f7250          DCB      "Prod"
00036c  20746375          DCB      "uct "
000370  3d204449          DCB      "ID ="
000374  25783020          DCB      " 0x%"
000378  000a0d78          DCB      "x\r\n\0"
                  |L1.892|
00037c  0000e0ff          DCD      0x0000e0ff
                  |L1.896|
000380  646f7250          DCB      "Prod"
000384  20746375          DCB      "uct "
000388  45204449          DCB      "ID E"
00038c  726f7272          DCB      "rror"
000390  30203d20          DCB      " = 0"
000394  0d782578          DCB      "x%x\r"
000398  0000000a          DCB      "\n\0\0\0"
                  |L1.924|
00039c  39385343          DCB      "CS89"
0003a0  69203030          DCB      "00 i"
0003a4  65442073          DCB      "s De"
0003a8  74636574          DCB      "tect"
0003ac  2e2e6465          DCB      "ed.."
0003b0  0000000a          DCB      "\n\0\0\0"
                          ENDP



                          AREA ||.data||, DATA, ALIGN=2

                  ||.data$0||
                  func_cs8900_test
                          DCD      Detect_CS8900
                          DCD      ||.constdata$1||
                          DCD      0x00000000
                          DCD      0x00000000


                          AREA ||.constdata||, DATA, READONLY, ALIGN=0

                  ||.constdata$1||
                          DCB      0x44,0x65,0x74,0x65
                          DCB      0x63,0x74,0x20,0x43
                          DCB      0x53,0x38,0x39,0x30
                          DCB      0x30,0x20,0x20,0x20
                          DCB      0x00


                          AREA ||.bss||, NOINIT, ALIGN=2

                  dwEthernetIOBase
                  ||.bss$2||
                          % 4
                  dwEthernetMemBase
                          % 4
                  bIsPacket
                          % 4


        END

⌨️ 快捷键说明

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