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

📄 stop.txt

📁 s3c24a0固件测试代码 ? ? ? ? ?啊 
💻 TXT
📖 第 1 页 / 共 5 页
字号:
000320  ebfffffe          BL       _printf
;;;87     }
000324  e8bd500f          LDMFD    sp!,{r0-r3,r12,lr}
000328  e25ef004          SUBS     pc,lr,#4
                  |L1.812|
00032c  65646f4d          DCB      "Mode"
000330  6e69206d          DCB      "m in"
000334  66202e74          DCB      "t. f"
000338  5320726f          DCB      "or S"
00033c  20504f54          DCB      "TOP "
000340  656b6177          DCB      "wake"
000344  2e70752d          DCB      "-up."
000348  0000000a          DCB      "\n\0\0\0"
                          ENDP

                  PenDownInt PROC
;;;89     static void __irq PenDownInt(void)
;;;90     {
                  |L1.844|
00034c  e92d500f          STMFD    sp!,{r0-r3,r12,lr}
;;;91         rINTSUBMSK |= BIT_SUB_PENDN;
000350  e51f0260          LDR      r0,|L1.248|
000354  e590001c          LDR      r0,[r0,#0x1c]
000358  e3800a40          ORR      r0,r0,#0x40000
00035c  e51f126c          LDR      r1,|L1.248|
000360  e581001c          STR      r0,[r1,#0x1c]
;;;92         rINTMSK |= BIT_ADC_PENUP_DOWN;
000364  e1a00001          MOV      r0,r1
000368  e5900008          LDR      r0,[r0,#8]
00036c  e3800480          ORR      r0,r0,#0x80000000
000370  e5810008          STR      r0,[r1,#8]
;;;93     
;;;94         ClearPending(BIT_ADC_PENUP_DOWN);
000374  e3a00480          MOV      r0,#0x80000000
000378  e1c11000          BIC      r1,r1,r0
00037c  e5810000          STR      r0,[r1,#0]
000380  e1c10000          BIC      r0,r1,r0
000384  e5900010          LDR      r0,[r0,#0x10]
000388  e5810010          STR      r0,[r1,#0x10]
00038c  e1a00001          MOV      r0,r1
000390  e5900010          LDR      r0,[r0,#0x10]
;;;95         rSUBSRCPND=BIT_SUB_PENDN;
000394  e3a00a40          MOV      r0,#0x40000
000398  e1c11000          BIC      r1,r1,r0
00039c  e5810018          STR      r0,[r1,#0x18]
;;;96         Uart_Printf("Touch screen pen-down for STOP wake-up.\n");
0003a0  e28f0008          ADR      r0,|L1.944|
0003a4  ebfffffe          BL       _printf
;;;97     }
0003a8  e8bd500f          LDMFD    sp!,{r0-r3,r12,lr}
0003ac  e25ef004          SUBS     pc,lr,#4
                  |L1.944|
0003b0  63756f54          DCB      "Touc"
0003b4  63732068          DCB      "h sc"
0003b8  6e656572          DCB      "reen"
0003bc  6e657020          DCB      " pen"
0003c0  776f642d          DCB      "-dow"
0003c4  6f66206e          DCB      "n fo"
0003c8  54532072          DCB      "r ST"
0003cc  7720504f          DCB      "OP w"
0003d0  2d656b61          DCB      "ake-"
0003d4  0a2e7075          DCB      "up.\n"
0003d8  00000000          DCB      "\0\0\0\0"
                          ENDP

                  Test_InitSDRAM PROC
;;;100    void Test_InitSDRAM(int check_start, int check_size)
;;;101    {
0003dc  e92d4070          STMFD    sp!,{r4-r6,lr}
0003e0  e1a05000          MOV      r5,r0
0003e4  e1a06001          MOV      r6,r1
;;;102        int i;
;;;103    
;;;104        Uart_Printf("[SDRAM Initialization]\n");
0003e8  e28f0040          ADR      r0,|L1.1072|
0003ec  ebfffffe          BL       _printf
;;;105        Uart_Printf("Fill SDRAM for self-refresh test.\n");
0003f0  e28f0050          ADR      r0,|L1.1096|
0003f4  ebfffffe          BL       _printf
;;;106    
;;;107        for(i=check_start;i<(check_start+check_size);i+=4)
0003f8  e1a04005          MOV      r4,r5
                  |L1.1020|
0003fc  e0850006          ADD      r0,r5,r6
000400  e1500004          CMP      r0,r4
000404  da000006          BLE      |L1.1060|
000408  ea000001          B        |L1.1044|
                  |L1.1036|
00040c  e2844004          ADD      r4,r4,#4
000410  eafffff9          B        |L1.1020|
;;;108        	*((U32 *)i)=i^0x55555555;
                  |L1.1044|
000414  e59f0050          LDR      r0,|L1.1132|
000418  e0240000          EOR      r0,r4,r0
00041c  e5840000          STR      r0,[r4,#0]
000420  eafffff9          B        |L1.1036|
;;;109        
;;;110        Uart_Printf("Filling SDRAM is completed.\n");
                  |L1.1060|
000424  e28f0044          ADR      r0,|L1.1136|
000428  ebfffffe          BL       _printf
;;;111    }
00042c  e8bd8070          LDMFD    sp!,{r4-r6,pc}
                  |L1.1072|
000430  5244535b          DCB      "[SDR"
000434  49204d41          DCB      "AM I"
000438  6974696e          DCB      "niti"
00043c  7a696c61          DCB      "aliz"
000440  6f697461          DCB      "atio"
000444  000a5d6e          DCB      "n]\n\0"
                  |L1.1096|
000448  6c6c6946          DCB      "Fill"
00044c  52445320          DCB      " SDR"
000450  66204d41          DCB      "AM f"
000454  7320726f          DCB      "or s"
000458  2d666c65          DCB      "elf-"
00045c  72666572          DCB      "refr"
000460  20687365          DCB      "esh "
000464  74736574          DCB      "test"
000468  00000a2e          DCB      ".\n\0\0"
                  |L1.1132|
00046c  55555555          DCD      0x55555555
                  |L1.1136|
000470  6c6c6946          DCB      "Fill"
000474  20676e69          DCB      "ing "
000478  41524453          DCB      "SDRA"
00047c  7369204d          DCB      "M is"
000480  6d6f6320          DCB      " com"
000484  74656c70          DCB      "plet"
000488  0a2e6465          DCB      "ed.\n"
00048c  00000000          DCB      "\0\0\0\0"
                          ENDP

                  Test_CheckSDRAM PROC
;;;113    void Test_CheckSDRAM(int check_start, int check_size)
;;;114    {
000490  e92d40f8          STMFD    sp!,{r3-r7,lr}
000494  e1a06000          MOV      r6,r0
000498  e1a07001          MOV      r7,r1
;;;115        int i;
;;;116        int error=0;
00049c  e3a05000          MOV      r5,#0
;;;117    
;;;118        Uart_Printf("Check SDRAM for self-refresh test\n");
0004a0  e28f007c          ADR      r0,|L1.1316|
0004a4  ebfffffe          BL       _printf
;;;119        for(i=check_start;i<(check_start+check_size);i+=4)
0004a8  e1a04006          MOV      r4,r6
                  |L1.1196|
0004ac  e0860007          ADD      r0,r6,r7
0004b0  e1500004          CMP      r0,r4
0004b4  da000012          BLE      |L1.1284|
0004b8  ea000001          B        |L1.1220|
                  |L1.1212|
0004bc  e2844004          ADD      r4,r4,#4
0004c0  eafffff9          B        |L1.1196|
;;;120        {
;;;121        	if(*((U32 *)i)!=(i^0x55555555))
                  |L1.1220|
0004c4  e5940000          LDR      r0,[r4,#0]
0004c8  e51f1064          LDR      r1,|L1.1132|
0004cc  e0241001          EOR      r1,r4,r1
0004d0  e1500001          CMP      r0,r1
0004d4  0a000006          BEQ      |L1.1268|
;;;122        	{
;;;123        	    Uart_Printf("Mem Error:%x=%x(%x)\n",i,*((U32 *)i),i^0x55555555);
0004d8  e51f0074          LDR      r0,|L1.1132|
0004dc  e0243000          EOR      r3,r4,r0
0004e0  e5942000          LDR      r2,[r4,#0]
0004e4  e1a01004          MOV      r1,r4
0004e8  e28f0058          ADR      r0,|L1.1352|
0004ec  ebfffffe          BL       _printf
;;;124        	    error++;
0004f0  e2855001          ADD      r5,r5,#1
;;;125        	}
;;;126        	if(error>20)
                  |L1.1268|
0004f4  e3550014          CMP      r5,#0x14
0004f8  da000000          BLE      |L1.1280|
;;;127    	    break;
0004fc  ea000000          B        |L1.1284|
;;;128        }
                  |L1.1280|
000500  eaffffed          B        |L1.1212|
;;;129        if(error)
                  |L1.1284|
000504  e3550000          CMP      r5,#0
000508  0a000002          BEQ      |L1.1304|
;;;130        	Uart_Printf("SDRAM self-refresh test:FAILED\n"); 
00050c  e28f004c          ADR      r0,|L1.1376|
000510  ebfffffe          BL       _printf
000514  ea000001          B        |L1.1312|
;;;131        else 
;;;132        	Uart_Printf("SDRAM self-refresh test:O.K.\n");	
                  |L1.1304|
000518  e28f0060          ADR      r0,|L1.1408|
00051c  ebfffffe          BL       _printf
;;;133    }
                  |L1.1312|
000520  e8bd80f8          LDMFD    sp!,{r3-r7,pc}
                  |L1.1316|
000524  63656843          DCB      "Chec"
000528  4453206b          DCB      "k SD"
00052c  204d4152          DCB      "RAM "
000530  20726f66          DCB      "for "
000534  666c6573          DCB      "self"
000538  6665722d          DCB      "-ref"
00053c  68736572          DCB      "resh"
000540  73657420          DCB      " tes"
000544  00000a74          DCB      "t\n\0\0"
                  |L1.1352|
000548  206d654d          DCB      "Mem "
00054c  6f727245          DCB      "Erro"
000550  78253a72          DCB      "r:%x"
000554  2878253d          DCB      "=%x("
000558  0a297825          DCB      "%x)\n"
00055c  00000000          DCB      "\0\0\0\0"
                  |L1.1376|
000560  41524453          DCB      "SDRA"
000564  6573204d          DCB      "M se"
000568  722d666c          DCB      "lf-r"
00056c  65726665          DCB      "efre"
000570  74206873          DCB      "sh t"
000574  3a747365          DCB      "est:"
000578  4c494146          DCB      "FAIL"
00057c  000a4445          DCB      "ED\n\0"
                  |L1.1408|
000580  41524453          DCB      "SDRA"
000584  6573204d          DCB      "M se"
000588  722d666c          DCB      "lf-r"
00058c  65726665          DCB      "efre"
000590  74206873          DCB      "sh t"
000594  3a747365          DCB      "est:"
000598  2e4b2e4f          DCB      "O.K."
00059c  0000000a          DCB      "\n\0\0\0"
                          ENDP

                  ConfigStopGPIO PROC
;;;135    void ConfigStopGPIO(void)
;;;136    {
0005a0  e3a00460          MOV      r0,#0x60000000
;;;137        // Check point
;;;138        // 1) NC pin: input pull-up on 
;;;139        // 2) If input is drived externally: input pull-up off
;;;140        // 3) If a connected component draws some current: output low.
;;;141        // 4) If a connected component draws no current: output high.
;;;142        // 5) UART Tx: Output(H) and enable pull-up
;;;143        //    UART Rx: Input and disable pull-up
;;;144    
;;;145        //CAUTION:Follow the configuration order for setting the ports. 
;;;146        // 1) setting value(GPnDAT) 
;;;147        // 2) setting control register  (GPnCON)
;;;148        // 3) configure pull-up resistor(GPnUP)  
;;;149    
;;;150        //32bit data bus configuration  
;;;151        rGPDAT =(1<<30)|(1<<29);
0005a4  e240156e          SUB      r1,r0,#0x1b800000
0005a8  e581000c          STR      r0,[r1,#0xc]
;;;152        
;;;153        //Ports	:GP31	    GP30	GP29	    GP28	GP27	    GP26	GP25    
;;;154        //Signal	:XuRXD1	    XuTXD1	XuRTSn1	    XuCTSn1	XkpCOL4	    XkpCOL3	XkpCOL2
;;;155        //Setting	:IN	    OUT(H)	OUT(H)	    IN		IN	    IN		IN
;;;156        //PU_OFF	:off(UART)  on(UART)    on(UART)    off(UART)   off(extPD)  off(extPD)  off(extPD)
;;;157        //---------------------------------------------------------------------------------------------
;;;158        //Ports	:GP24	    GP23	GP22	    GP21	GP20,	    GP19
;;;159        //Signal	:XkpCOL1    XkpCOL0	XkpROW4     XkpROW3	XkpROW2     XkpROW1
;;;160        //Setting	:IN	    IN		IN	    IN		IN	    IN
;;;161        //PU_OFF	:off(extPD) off(extPD)  off(extPU)  off(extPU)  off(extPU)  off(extPU)
;;;162        rGPCON_U = 0x500000; 
0005ac  e3a00850          MOV      r0,#0x500000
0005b0  e1c11000          BIC      r1,r1,r0
0005b4  e5810000          STR      r0,[r1,#0]
;;;163        
;;;164        //Ports	:GP18	    GP17    GP16	GP15	GP14	    GP13	GP12	    GP11		    
;;;165        //Signal	:XkpROW0    L3_MODE L3_CLOCK    L3_DATA	SMC_INT	    ETHER_INT	MODEM_INT   SD_INT	    
;;;166        //Setting	:IN	    IN	    IN		IN	IN	    IN		IN	    IN
;;;167        //PU_OFF	:off(extPU) on	    on	    	on	off(extPU)  on		off(extPU)  off(extPU)    
;;;168        rGPCON_M = 0x0; //ETHER_INT=Hi-Z before initialaize
0005b8  e3a00000          MOV      r0,#0
0005bc  e1c11000          BIC      r1,r1,r0
0005c0  e5810004          STR      r0,[r1,#4]
;;;169    
;;;170        //Ports	:GP10	GP9	    GP8 	GP7 		GP6		GP5		 		    
;;;171        //Signal	:YMON	EINT9	    nSS_KBD	KEYBOARD(LED3)	LCD_CS(LED2)	LCD_SCLK(LED1)	    
;;;172        //Setting	:IN	EINT9(wk)   IN		IN		IN		IN		
;;;173        //PU_OFF	:on	off(extPU)  on		off(extPU)	off(extPU)	off(extPU)    		
;;;174        //--------------------------------------------------------------------------------------------
;;;175        //Ports	:GP4		GP3	GP2	GP1	    GP0
;;;176        //Signal	:LCD_SDI(LED0)  nDTR    nDSR    SMC_WP	    SD_WP
;;;177        //Setting	:IN		IN	IN	EINT1(wk)   EINT0(wk)
;;;178        //PU_OFF	:off(extPU)	on	on	off(extPU)  off(extPU)
;;;179        rGPCON_L = 0x8000a;
0005c4  e59f03cc          LDR      r0,|L1.2456|
0005c8  e1c11000          BIC      r1,r1,r0
0005cc  e5810008          STR      r0,[r1,#8]
;;;180    
;;;181        //Configure pull-up function
;;;182        rGPPU = 0x9ffc5af3;
0005d0  e59f03c4          LDR      r0,|L1.2460|
0005d4  e00110c0          AND      r1,r1,r0,ASR #1
0005d8  e5810010          STR      r0,[r1,#0x10]
;;;183    
;;;184        //External interrupt will be falling edge triggered.
;;;185        rEXTINTC0 = 0x222; 	    //EINT2~0
0005dc  e59f03bc          LDR      r0,|L1.2464|

⌨️ 快捷键说明

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