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

📄 idle.txt

📁 SMDK2442所有设备的驱动测试程序。运行monitor程序
💻 TXT
📖 第 1 页 / 共 2 页
字号:
; generated by ARM C Compiler, ADS1.2 [Build 805]

; commandline [-errors .\err\idle.err -O0 -asm -g+ -cpu ARM920T -fs "-IC:\Program Files\ARM\ADSv1_2\INCLUDE"]
                          CODE32

                          AREA ||.text||, CODE, READONLY

                  Eint0Int PROC
;;;36     static void __irq Eint0Int(void)
;;;37      {
                  |L1.0|
000000  e92d500f          STMFD    sp!,{r0-r3,r12,lr}
;;;38         ClearPending(BIT_EINT0);
000004  e3a00001          MOV      r0,#1
000008  e3a0144a          MOV      r1,#0x4a000000
00000c  e5810000          STR      r0,[r1,#0]
000010  e3a00001          MOV      r0,#1
000014  e3a0144a          MOV      r1,#0x4a000000
000018  e5810010          STR      r0,[r1,#0x10]
00001c  e3a0044a          MOV      r0,#0x4a000000
000020  e5900010          LDR      r0,[r0,#0x10]
;;;39         Uart_Printf("EINT0 interrupt is occurred for IDLE wake-up.\n");
000024  e28f0008          ADR      r0,|L1.52|
000028  ebfffffe          BL       Uart_Printf
;;;40     }
00002c  e8bd500f          LDMFD    sp!,{r0-r3,r12,lr}
000030  e25ef004          SUBS     pc,lr,#4
                  |L1.52|
000034  544e4945          DCB      "EINT"
000038  6e692030          DCB      "0 in"
00003c  72726574          DCB      "terr"
000040  20747075          DCB      "upt "
000044  6f207369          DCB      "is o"
000048  72756363          DCB      "ccur"
00004c  20646572          DCB      "red "
000050  20726f66          DCB      "for "
000054  454c4449          DCB      "IDLE"
000058  6b617720          DCB      " wak"
00005c  70752d65          DCB      "e-up"
000060  00000a2e          DCB      ".\n\0\0"
                          ENDP

                  AlarmInt PROC
;;;42     static void __irq AlarmInt(void)
;;;43     {
                  |L1.100|
000064  e92d500f          STMFD    sp!,{r0-r3,r12,lr}
;;;44         ClearPending(BIT_RTC);
000068  e3a00440          MOV      r0,#0x40000000
00006c  e3a0144a          MOV      r1,#0x4a000000
000070  e5810000          STR      r0,[r1,#0]
000074  e3a00440          MOV      r0,#0x40000000
000078  e3a0144a          MOV      r1,#0x4a000000
00007c  e5810010          STR      r0,[r1,#0x10]
000080  e3a0044a          MOV      r0,#0x4a000000
000084  e5900010          LDR      r0,[r0,#0x10]
;;;45         Uart_Printf("ALARM interrupt is occurred for IDLE wake-up.\n");
000088  e28f0008          ADR      r0,|L1.152|
00008c  ebfffffe          BL       Uart_Printf
;;;46     }
000090  e8bd500f          LDMFD    sp!,{r0-r3,r12,lr}
000094  e25ef004          SUBS     pc,lr,#4
                  |L1.152|
000098  52414c41          DCB      "ALAR"
00009c  6e69204d          DCB      "M in"
0000a0  72726574          DCB      "terr"
0000a4  20747075          DCB      "upt "
0000a8  6f207369          DCB      "is o"
0000ac  72756363          DCB      "ccur"
0000b0  20646572          DCB      "red "
0000b4  20726f66          DCB      "for "
0000b8  454c4449          DCB      "IDLE"
0000bc  6b617720          DCB      " wak"
0000c0  70752d65          DCB      "e-up"
0000c4  00000a2e          DCB      ".\n\0\0"
                          ENDP

                  Timer0Int PROC
;;;52     //Timer0 interrupt will be used to test the IDLE mode hard	
;;;53     {
                  |L1.200|
0000c8  e92d0003          STMFD    sp!,{r0,r1}
;;;54         ClearPending(BIT_TIMER0);
0000cc  e3a00e40          MOV      r0,#0x400
0000d0  e3a0144a          MOV      r1,#0x4a000000
0000d4  e5810000          STR      r0,[r1,#0]
0000d8  e3a00e40          MOV      r0,#0x400
0000dc  e3a0144a          MOV      r1,#0x4a000000
0000e0  e5810010          STR      r0,[r1,#0x10]
0000e4  e3a0044a          MOV      r0,#0x4a000000
0000e8  e5900010          LDR      r0,[r0,#0x10]
;;;55         t0cnt++;
0000ec  e59f0148          LDR      r0,|L1.572|
0000f0  e5900000          LDR      r0,[r0,#0]  ; t0cnt
0000f4  e2800001          ADD      r0,r0,#1
0000f8  e59f113c          LDR      r1,|L1.572|
0000fc  e5810000          STR      r0,[r1,#0]  ; t0cnt
;;;56     }
000100  e8bd0003          LDMFD    sp!,{r0,r1}
000104  e25ef004          SUBS     pc,lr,#4
                          ENDP

                  Timer1Int PROC
;;;59     //Timer1 interrupt will be used to test the IDLE mode hard	
;;;60     {
                  |L1.264|
000108  e92d0003          STMFD    sp!,{r0,r1}
;;;61         ClearPending(BIT_TIMER1);
00010c  e3a00e80          MOV      r0,#0x800
000110  e3a0144a          MOV      r1,#0x4a000000
000114  e5810000          STR      r0,[r1,#0]
000118  e3a00e80          MOV      r0,#0x800
00011c  e3a0144a          MOV      r1,#0x4a000000
000120  e5810010          STR      r0,[r1,#0x10]
000124  e3a0044a          MOV      r0,#0x4a000000
000128  e5900010          LDR      r0,[r0,#0x10]
;;;62         t1cnt++;
00012c  e59f010c          LDR      r0,|L1.576|
000130  e5900000          LDR      r0,[r0,#0]  ; t1cnt
000134  e2800001          ADD      r0,r0,#1
000138  e59f1100          LDR      r1,|L1.576|
00013c  e5810000          STR      r0,[r1,#0]  ; t1cnt
;;;63     }
000140  e8bd0003          LDMFD    sp!,{r0,r1}
000144  e25ef004          SUBS     pc,lr,#4
                          ENDP

                  Test_IdleMode PROC
;;;70     void Test_IdleMode(void)
;;;71     {
000148  e92d4010          STMFD    sp!,{r4,lr}
;;;72         int i;
;;;73         int extintMode;
;;;74     
;;;75         MMU_SetAsyncBusMode(); 
00014c  ebfffffe          BL       MMU_SetAsyncBusMode
;;;76          	//ARM920T should be in the async bus mode 
;;;77         	//because FCLK is used for ARM920T in the async bus mode.
;;;78     
;;;79         Uart_Printf("[IDLE Mode Test]\n");
000150  e28f00ec          ADR      r0,|L1.580|
000154  ebfffffe          BL       Uart_Printf
;;;80         Uart_Printf("After 10 seconds, S3C2442 will wake up by RTC alarm interrupt.\n");
000158  e28f00f8          ADR      r0,|L1.600|
00015c  ebfffffe          BL       Uart_Printf
;;;81         Uart_Printf("S3C2442 will also wake up by EINT0.\n");
000160  e28f0f4c          ADR      r0,|L1.664|
000164  ebfffffe          BL       Uart_Printf
;;;82     
;;;83         //PWR_Lcd_Tft_16Bit_240320_On();
;;;84         //PWR_StartIIS();
;;;85         //PWR_StartTimer();
;;;86         
;;;87         Uart_TxEmpty(1);    //Wait until UART0 Tx buffer empty.
000168  e3a00001          MOV      r0,#1
00016c  ebfffffe          BL       Uart_TxEmpty
;;;88         
;;;89         rGPFCON=rGPFCON & ~(3<<0)|(2<<0); //PF0=EINT0
000170  e3a00456          MOV      r0,#0x56000000
000174  e5900050          LDR      r0,[r0,#0x50]
000178  e3c00003          BIC      r0,r0,#3
00017c  e3800002          ORR      r0,r0,#2
000180  e3a01456          MOV      r1,#0x56000000
000184  e5810050          STR      r0,[r1,#0x50]
;;;90         rEXTINT0=rEXTINT0&(7<<0)|(0x2<<0); //EINT0=falling edge triggered
000188  e3a00456          MOV      r0,#0x56000000
00018c  e5900088          LDR      r0,[r0,#0x88]
000190  e2000007          AND      r0,r0,#7
000194  e3800002          ORR      r0,r0,#2
000198  e3a01456          MOV      r1,#0x56000000
00019c  e5810088          STR      r0,[r1,#0x88]
;;;91         
;;;92         pISR_EINT0=(U32)Eint0Int;
0001a0  e59f0118          LDR      r0,|L1.704|
0001a4  e59f1118          LDR      r1,|L1.708|
0001a8  e5810f20          STR      r0,[r1,#0xf20]
;;;93         pISR_RTC=(U32)AlarmInt;
0001ac  e59f0114          LDR      r0,|L1.712|
0001b0  e5810f98          STR      r0,[r1,#0xf98]
;;;94     
;;;95         rSRCPND = BIT_EINT0|BIT_RTC; //to clear the previous pending states
0001b4  e3a00350          MOV      r0,#0x40000001
0001b8  e3a0144a          MOV      r1,#0x4a000000
0001bc  e5810000          STR      r0,[r1,#0]
;;;96         rINTPND = BIT_EINT0|BIT_RTC;
0001c0  e3a00350          MOV      r0,#0x40000001
0001c4  e3a0144a          MOV      r1,#0x4a000000
0001c8  e5810010          STR      r0,[r1,#0x10]
;;;97         
;;;98         rINTMSK=~(BIT_EINT0|BIT_RTC);
0001cc  e3e00350          MVN      r0,#0x40000001
0001d0  e3a0144a          MOV      r1,#0x4a000000
0001d4  e5810008          STR      r0,[r1,#8]
;;;99     
;;;100        SetAlarmWakeUp();
0001d8  ebfffffe          BL       SetAlarmWakeUp
;;;101        rRTCCON = 0x0;	// R/W disable, but interrupt will be generated.
0001dc  e3a00000          MOV      r0,#0
0001e0  e3a01457          MOV      r1,#0x57000000
0001e4  e5c10040          STRB     r0,[r1,#0x40]
;;;102    
;;;103        rCLKCON|=(1<<2);  //enter IDLE mode.
0001e8  e3a0044c          MOV      r0,#0x4c000000
0001ec  e590000c          LDR      r0,[r0,#0xc]
0001f0  e3800004          ORR      r0,r0,#4
0001f4  e3a0144c          MOV      r1,#0x4c000000
0001f8  e581000c          STR      r0,[r1,#0xc]
;;;104    
;;;105        for(i=0;i<10;i++);   
0001fc  e3a04000          MOV      r4,#0
                  |L1.512|
000200  e354000a          CMP      r4,#0xa
000204  aa000001          BGE      |L1.528|
000208  e2844001          ADD      r4,r4,#1
00020c  eafffffb          B        |L1.512|
;;;106            //wait until S3C2400X enters IDLE mode.	
;;;107            //wait EINT0 interrupt or RTC alarm interrupt
;;;108    
;;;109        rCLKCON&=~(1<<2);      
                  |L1.528|
000210  e3a0044c          MOV      r0,#0x4c000000
000214  e590000c          LDR      r0,[r0,#0xc]
000218  e3c00004          BIC      r0,r0,#4
00021c  e3a0144c          MOV      r1,#0x4c000000
000220  e581000c          STR      r0,[r1,#0xc]
;;;110        //turn-off IDLE bit. IDLE bit should be turned off after wake-up.
;;;111       
;;;112        Uart_Printf("Return to Normal Mode.\n");
000224  e28f00a0          ADR      r0,|L1.716|
000228  ebfffffe          BL       Uart_Printf
;;;113    
;;;114        rINTMSK=BIT_ALLMSK;
00022c  e3e00000          MVN      r0,#0
000230  e3a0144a          MOV      r1,#0x4a000000
000234  e5810008          STR      r0,[r1,#8]
;;;115    }
000238  e8bd8010          LDMFD    sp!,{r4,pc}
                  |L1.572|
00023c  00000000          DCD      ||.bss$2||
                  |L1.576|
000240  00000004          DCD      ||.bss$2|| + 4
                  |L1.580|
000244  4c44495b          DCB      "[IDL"
000248  6f4d2045          DCB      "E Mo"
00024c  54206564          DCB      "de T"
000250  5d747365          DCB      "est]"
000254  0000000a          DCB      "\n\0\0\0"
                  |L1.600|
000258  65746641          DCB      "Afte"
00025c  30312072          DCB      "r 10"
000260  63657320          DCB      " sec"
000264  73646e6f          DCB      "onds"
000268  3353202c          DCB      ", S3"
00026c  34343243          DCB      "C244"
000270  69772032          DCB      "2 wi"
000274  77206c6c          DCB      "ll w"
000278  20656b61          DCB      "ake "
00027c  62207075          DCB      "up b"
000280  54522079          DCB      "y RT"
000284  6c612043          DCB      "C al"
000288  206d7261          DCB      "arm "
00028c  65746e69          DCB      "inte"
000290  70757272          DCB      "rrup"
000294  000a2e74          DCB      "t.\n\0"
                  |L1.664|
000298  32433353          DCB      "S3C2"
00029c  20323434          DCB      "442 "
0002a0  6c6c6977          DCB      "will"
0002a4  736c6120          DCB      " als"
0002a8  6177206f          DCB      "o wa"
0002ac  7520656b          DCB      "ke u"
0002b0  79622070          DCB      "p by"
0002b4  4e494520          DCB      " EIN"
0002b8  0a2e3054          DCB      "T0.\n"
0002bc  00000000          DCB      "\0\0\0\0"
                  |L1.704|
0002c0  00000000          DCD      Eint0Int
                  |L1.708|
0002c4  31fff000          DCD      0x31fff000
                  |L1.712|
0002c8  00000000          DCD      AlarmInt
                  |L1.716|
0002cc  75746552          DCB      "Retu"
0002d0  74206e72          DCB      "rn t"
0002d4  6f4e206f          DCB      "o No"
0002d8  6c616d72          DCB      "rmal"
0002dc  646f4d20          DCB      " Mod"
0002e0  000a2e65          DCB      "e.\n\0"
                          ENDP

                  Test_IdleModeHard PROC
;;;119    void Test_IdleModeHard(void)
;;;120    {
0002e4  e92d4038          STMFD    sp!,{r3-r5,lr}
;;;121        int i,j;
;;;122    
;;;123        MMU_SetAsyncBusMode(); //ARM920T should be in the async. bus mode.
0002e8  ebfffffe          BL       MMU_SetAsyncBusMode
;;;124        
;;;125        Uart_Printf("[IDLE Mode Hard Test with Timer0]\n");
0002ec  e28f0f64          ADR      r0,|L1.1156|
0002f0  ebfffffe          BL       Uart_Printf
;;;126        Uart_Printf("S3C2442 will also wake up by EINT0 falling edge.\n");
0002f4  e28f0f6b          ADR      r0,|L1.1192|
0002f8  ebfffffe          BL       Uart_Printf
;;;127    
;;;128        Uart_TxEmpty(1);    //Wait until UART0 Tx buffer empty.
0002fc  e3a00001          MOV      r0,#1
000300  ebfffffe          BL       Uart_TxEmpty
;;;129    
;;;130        rGPFCON=rGPFCON & ~(3<<0)|(2<<0); //PF0=EINT0
000304  e3a00456          MOV      r0,#0x56000000
000308  e5900050          LDR      r0,[r0,#0x50]
00030c  e3c00003          BIC      r0,r0,#3
000310  e3800002          ORR      r0,r0,#2
000314  e3a01456          MOV      r1,#0x56000000
000318  e5810050          STR      r0,[r1,#0x50]
;;;131        rEXTINT0=rEXTINT0&(7<<0)|(0x2<<0); //EINT0=falling edge triggered
00031c  e3a00456          MOV      r0,#0x56000000
000320  e5900088          LDR      r0,[r0,#0x88]
000324  e2000007          AND      r0,r0,#7
000328  e3800002          ORR      r0,r0,#2

⌨️ 快捷键说明

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