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

📄 rtc_test.txt

📁 支持三星原产的S3C24A0开发板
💻 TXT
📖 第 1 页 / 共 4 页
字号:
0009e8  e5805004          STR      r5,[r0,#4]
;;;247         rGPDAT 	= save_GPDAT;
0009ec  e580600c          STR      r6,[r0,#0xc]
;;;248         rGPPU 	= save_rGPUP;    			
0009f0  e5807010          STR      r7,[r0,#0x10]
;;;249    
;;;250    	
;;;251        	rRTCCON = 0x0;  //RTC  Control disable(for power consumption), 1/32768, Normal(merge), No reset
0009f4  e3a00000          MOV      r0,#0
0009f8  e51f1704          LDR      r1,|L1.764|
0009fc  e5c10040          STRB     r0,[r1,#0x40]
;;;252    }
000a00  e8bd80f8          LDMFD    sp!,{r3-r7,pc}
                  |L1.2564|
000a04  5452205b          DCB      "[ RT"
000a08  6c412043          DCB      "C Al"
000a0c  206d7261          DCB      "arm "
000a10  74736554          DCB      "Test"
000a14  726f6620          DCB      " for"
000a18  43335320          DCB      " S3C"
000a1c  30413432          DCB      "24A0"
000a20  000a5d20          DCB      " ]\n\0"
                  |L1.2596|
000a24  5b783225          DCB      "%2x["
000a28  5d636573          DCB      "sec]"
000a2c  25203a20          DCB      " : %"
000a30  6d5b7832          DCB      "2x[m"
000a34  205d6e69          DCB      "in] "
                  |L1.2616|
000a38  0000000a          DCB      "\n\0\0\0"
                  |L1.2620|
000a3c  6c61205b          DCB      "[ al"
000a40  656d7261          DCB      "arme"
000a44  66612064          DCB      "d af"
000a48  20726574          DCB      "ter "
000a4c  63657335          DCB      "5sec"
000a50  21646e6f          DCB      "ond!"
000a54  00000a20          DCB      " \n\0\0"
                  |L1.2648|
000a58  00000000          DCD      Rtc_Int
                  |L1.2652|
000a5c  5452205b          DCB      "[ RT"
000a60  6c412043          DCB      "C Al"
000a64  206d7261          DCB      "arm "
000a68  74736554          DCB      "Test"
000a6c  204b4f20          DCB      " OK "
000a70  00000a5d          DCB      "]\n\0\0"
                          ENDP

                  Rtc_Tick PROC
;;;374    void __irq Rtc_Tick(void)
;;;375    {
000a74  e92d0003          STMFD    sp!,{r0,r1}
;;;376    	unsigned int sec_tick,f1;
;;;377    	ClearPending(BIT_TIC);
000a78  e3a00020          MOV      r0,#0x20
000a7c  e51f1244          LDR      r1,|L1.2112|
000a80  e5810000          STR      r0,[r1,#0]
000a84  e1c10000          BIC      r0,r1,r0
000a88  e5900010          LDR      r0,[r0,#0x10]
000a8c  e5810010          STR      r0,[r1,#0x10]
000a90  e1a00001          MOV      r0,r1
000a94  e5900010          LDR      r0,[r0,#0x10]
;;;378    
;;;379    	
;;;380    	//sec_tick = sec_tick+1;
;;;381    	//Uart_Printf("sec tick is .............................%d\n",_SEC_TICK);
;;;382        	//if(_SEC_TICK == 1) _Frame_Rate1 = _FRAME_NUM;
;;;383        	//if(_SEC_TICK == 10){ 	_Frame_Rate2 = _FRAME_NUM;
;;;384        	//if(sec_tick == 9) _Frame_Rate1 = _FRAME_NUM;
;;;385        	//if(sec_tick == 10){ 	_Frame_Rate2 = _FRAME_NUM;
;;;386        	//rINTMSK |= BIT_TIC; // INT_POST_LCD Disable		
;;;387        	//rRTCCON   = 0x0;            //No reset[3], Merge BCD counters[2], BCD clock select XTAL[1], RTC Control disable[0]
;;;388           //}					
;;;389    	//_SEC_TICK = sec_tick;
;;;390    
;;;391    }
000a98  e8bd0003          LDMFD    sp!,{r0,r1}
000a9c  e25ef004          SUBS     pc,lr,#4
                          ENDP

                  Test_Rtc_Tick PROC
;;;317    void Test_Rtc_Tick(void)
;;;318    {
000aa0  e92d4008          STMFD    sp!,{r3,lr}
;;;319        	Uart_Printf("[ RTC Tick interrupt(1 sec) test for S3C24A0 ]\n");
000aa4  e28f0068          ADR      r0,|L1.2836|
000aa8  ebfffffe          BL       _printf
;;;320        	Uart_Printf("Press any key to exit.\n"); 
000aac  e28f0090          ADR      r0,|L1.2884|
000ab0  ebfffffe          BL       _printf
;;;321        	Uart_Printf("\n");  
000ab4  e24f0084          ADR      r0,|L1.2616|
000ab8  ebfffffe          BL       _printf
;;;322            
;;;323        	pISR_TICK = (unsigned)Rtc_Tick;
000abc  e59f0098          LDR      r0,|L1.2908|
000ac0  e51f1280          LDR      r1,|L1.2120|
000ac4  e5810f34          STR      r0,[r1,#0xf34]
;;;324    
;;;325        	rINTMSK   &= ~(BIT_TIC); 
000ac8  e51f0290          LDR      r0,|L1.2112|
000acc  e5900008          LDR      r0,[r0,#8]
000ad0  e3c00020          BIC      r0,r0,#0x20
000ad4  e51f129c          LDR      r1,|L1.2112|
000ad8  e5810008          STR      r0,[r1,#8]
;;;326        	rRTCCON   = 0x0;            //No reset[3], Merge BCD counters[2], BCD clock select XTAL[1], RTC Control disable[0]
000adc  e3a00000          MOV      r0,#0
000ae0  e1811281          ORR      r1,r1,r1,LSL #5
000ae4  e5c10040          STRB     r0,[r1,#0x40]
;;;327        	rTICINT    = (1<<7) + 127;   //Tick time interrupt enable, Tick time count value 127
000ae8  e3a000ff          MOV      r0,#0xff
000aec  e1c11000          BIC      r1,r1,r0
000af0  e5c10044          STRB     r0,[r1,#0x44]
;;;328                                    //Period = (n + 1) / 128 second    n:Tick time count value(1~127)
;;;329        	Uart_Getch();
000af4  ebfffffe          BL       Uart_Getch
;;;330        
;;;331        	rINTMSK   = BIT_ALLMSK;
000af8  e3e00000          MVN      r0,#0
000afc  e51f12c4          LDR      r1,|L1.2112|
000b00  e5810008          STR      r0,[r1,#8]
;;;332        	rRTCCON   = 0x0;            //No reset[3], Merge BCD counters[2], BCD clock select XTAL[1], RTC Control disable[0]
000b04  e3a00000          MOV      r0,#0
000b08  e1811281          ORR      r1,r1,r1,LSL #5
000b0c  e5c10040          STRB     r0,[r1,#0x40]
;;;333    }
000b10  e8bd8008          LDMFD    sp!,{r3,pc}
                  |L1.2836|
000b14  5452205b          DCB      "[ RT"
000b18  69542043          DCB      "C Ti"
000b1c  69206b63          DCB      "ck i"
000b20  7265746e          DCB      "nter"
000b24  74707572          DCB      "rupt"
000b28  73203128          DCB      "(1 s"
000b2c  20296365          DCB      "ec) "
000b30  74736574          DCB      "test"
000b34  726f6620          DCB      " for"
000b38  43335320          DCB      " S3C"
000b3c  30413432          DCB      "24A0"
000b40  000a5d20          DCB      " ]\n\0"
                  |L1.2884|
000b44  73657250          DCB      "Pres"
000b48  6e612073          DCB      "s an"
000b4c  656b2079          DCB      "y ke"
000b50  6f742079          DCB      "y to"
000b54  69786520          DCB      " exi"
000b58  000a2e74          DCB      "t.\n\0"
                  |L1.2908|
000b5c  00000000          DCD      Rtc_Tick
                          ENDP

                  EINT9_int PROC
;;;351    void __irq EINT9_int(void)
;;;352    {
000b60  e92d500f          STMFD    sp!,{r0-r3,r12,lr}
;;;353        	rEINTMASK=rEINTMASK|(BIT_EINTPEND_EINT0);
000b64  e51f04f4          LDR      r0,|L1.1656|
000b68  e5900034          LDR      r0,[r0,#0x34]
000b6c  e3800001          ORR      r0,r0,#1
000b70  e51f1500          LDR      r1,|L1.1656|
000b74  e5810034          STR      r0,[r1,#0x34]
;;;354        	rINTMSK=rINTMSK|(BIT_EINT7_10);
000b78  e2410646          SUB      r0,r1,#0x4600000
000b7c  e5900008          LDR      r0,[r0,#8]
000b80  e3800004          ORR      r0,r0,#4
000b84  e2411646          SUB      r1,r1,#0x4600000
000b88  e5810008          STR      r0,[r1,#8]
;;;355        	ClearPending(BIT_EINT0_2);
000b8c  e3a00001          MOV      r0,#1
000b90  e1c11000          BIC      r1,r1,r0
000b94  e5810000          STR      r0,[r1,#0]
000b98  e1c10000          BIC      r0,r1,r0
000b9c  e5900010          LDR      r0,[r0,#0x10]
000ba0  e5810010          STR      r0,[r1,#0x10]
000ba4  e1a00001          MOV      r0,r1
000ba8  e5900010          LDR      r0,[r0,#0x10]
;;;356        	rEINTPEND=BIT_EINTPEND_EINT0;
000bac  e3a00001          MOV      r0,#1
000bb0  e2811646          ADD      r1,r1,#0x4600000
000bb4  e5810038          STR      r0,[r1,#0x38]
;;;357        	Uart_Printf("EINT9 interrupt is requested for RTC round RESET !\n");
000bb8  e28f0014          ADR      r0,|L1.3028|
000bbc  ebfffffe          BL       _printf
;;;358    
;;;359    	 rRTCRST = (1<<3) | 3;   //Round second reset enable, over than 30 sec
000bc0  e3a0000b          MOV      r0,#0xb
000bc4  e51f18d0          LDR      r1,|L1.764|
000bc8  e5c1006c          STRB     r0,[r1,#0x6c]
;;;360    
;;;361    
;;;362    }
000bcc  e8bd500f          LDMFD    sp!,{r0-r3,r12,lr}
000bd0  e25ef004          SUBS     pc,lr,#4
                  |L1.3028|
000bd4  544e4945          DCB      "EINT"
000bd8  6e692039          DCB      "9 in"
000bdc  72726574          DCB      "terr"
000be0  20747075          DCB      "upt "
000be4  72207369          DCB      "is r"
000be8  65757165          DCB      "eque"
000bec  64657473          DCB      "sted"
000bf0  726f6620          DCB      " for"
000bf4  43545220          DCB      " RTC"
000bf8  756f7220          DCB      " rou"
000bfc  5220646e          DCB      "nd R"
000c00  54455345          DCB      "ESET"
000c04  000a2120          DCB      " !\n\0"
                          ENDP



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

                  ||.data$0||
                  ||day||
                          DCD      ||.constdata$1||
                          DCD      ||.constdata$1||+0x2
                          DCD      ||.constdata$1||+0x9
                          DCD      ||.constdata$1||+0x10
                          DCD      ||.constdata$1||+0x18
                          DCD      ||.constdata$1||+0x22
                          DCD      ||.constdata$1||+0x2b
                          DCD      ||.constdata$1||+0x32
                  isInit
                          DCD      0x00000002
                  rtc_func
                          DCD      Display_Rtc
                          DCD      ||.constdata$1||+0x3b
                          DCD      Test_Rtc_Alarm
                          DCD      ||.constdata$1||+0x4d
                          DCD      Test_Rtc_Tick
                          DCD      ||.constdata$1||+0x5d
                          DCD      RndRst_Rtc
                          DCD      ||.constdata$1||+0x70
                          DCD      0x00000000
                          DCD      0x00000000


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

                  ||.constdata$1||
                          DCB      0x20,0x00
                          DCB      0x53,0x75,0x6e,0x64
                          DCB      0x61,0x79,0x00
                          DCB      0x4d,0x6f,0x6e,0x64
                          DCB      0x61,0x79,0x00
                          DCB      0x54,0x75,0x65,0x73
                          DCB      0x64,0x61,0x79,0x00
                          DCB      0x57,0x65,0x64,0x6e
                          DCB      0x65,0x73,0x64,0x61
                          DCB      0x79,0x00
                          DCB      0x54,0x68,0x75,0x72
                          DCB      0x73,0x64,0x61,0x79
                          DCB      0x00
                          DCB      0x46,0x72,0x69,0x64
                          DCB      0x61,0x79,0x00
                          DCB      0x53,0x61,0x74,0x75
                          DCB      0x72,0x64,0x61,0x79
                          DCB      0x00
                          DCB      0x52,0x54,0x43,0x20
                          DCB      0x74,0x69,0x6d,0x65
                          DCB      0x20,0x73,0x65,0x74
                          DCB      0x74,0x69,0x6e,0x67
                          DCB      0x09,0x00
                          DCB      0x52,0x54,0x43,0x20
                          DCB      0x41,0x6c,0x61,0x72
                          DCB      0x6d,0x20,0x54,0x65
                          DCB      0x73,0x74,0x09,0x00
                          DCB      0x52,0x54,0x43,0x20
                          DCB      0x54,0x69,0x63,0x6b
                          DCB      0x20,0x49,0x4e,0x54
                          DCB      0x20,0x54,0x65,0x73
                          DCB      0x74,0x20,0x00
                          DCB      0x52,0x54,0x43,0x20
                          DCB      0x52,0x6f,0x75,0x6e
                          DCB      0x64,0x20,0x52,0x65
                          DCB      0x73,0x65,0x74,0x20
                          DCB      0x00
                          DCB      0x00,0x00,0x00
                          DCB      0x0a,0x31,0x3a,0x53
                          DCB      0x75,0x6e,0x64,0x61
                          DCB      0x79,0x20,0x20,0x32
                          DCB      0x3a,0x4d,0x6f,0x6e
                          DCB      0x64,0x61,0x79,0x20
                          DCB      0x20,0x33,0x3a,0x54
                          DCB      0x68,0x65,0x73,0x64
                          DCB      0x61,0x79,0x20,0x20
                          DCB      0x34,0x3a,0x57,0x65
                          DCB      0x64,0x6e,0x65,0x73
                          DCB      0x64,0x61,0x79,0x20
                          DCB      0x20,0x35,0x3a,0x54
                          DCB      0x68,0x75,0x72,0x73
                          DCB      0x64,0x61,0x79,0x20
                          DCB      0x20,0x36,0x3a,0x46
                          DCB      0x72,0x69,0x64,0x61
                          DCB      0x79,0x20,0x20,0x37
                          DCB      0x3a,0x53,0x61,0x74
                          DCB      0x75,0x72,0x64,0x61
                          DCB      0x79,0x0a,0x00
                          DCB      0x00
                          DCB      0x30,0x2e,0x20,0x52
                          DCB      0x54,0x43,0x20,0x49
                          DCB      0x6e,0x69,0x74,0x69
                          DCB      0x61,0x6c,0x69,0x7a
                          DCB      0x65,0x20,0x20,0x20
                          DCB      0x20,0x20,0x31,0x2e
                          DCB      0x20,0x52,0x54,0x43
                          DCB      0x20,0x54,0x69,0x6d
                          DCB      0x65,0x20,0x53,0x65
                          DCB      0x74,0x74,0x69,0x6e
                          DCB      0x67,0x20,0x20,0x20
                          DCB      0x20,0x32,0x2e,0x20
                          DCB      0x4f,0x6e,0x6c,0x79
                          DCB      0x20,0x52,0x54,0x43
                          DCB      0x20,0x44,0x69,0x73
                          DCB      0x70,0x6c,0x61,0x79
                          DCB      0x0a,0x0a,0x00
                          DCB      0x00


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

                  isRtcInt
                  ||.bss$2||
                          % 4


        END

⌨️ 快捷键说明

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