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

📄 stm32f10x_rtc.txt

📁 ucos2.86版本结合STM板极支持包
💻 TXT
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 914] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\rvmdk\stm32f10x_rtc.o --depend=.\rvmdk\stm32f10x_rtc.d --device=DARMSTM -O1 -Otime -I. -I..\BSP -I..\..\..\..\..\uCOS-II\Ports\arm-cortex-m3\Generic\RealView -I..\..\..\..\..\uCOS-II\Source -I..\..\..\..\..\CPU\ST\STM32\inc -I..\..\..\..\..\uC-CPU -I..\..\..\..\..\uC-CPU\Arm-Cortex-M3\RealView -I..\..\..\..\..\uC-LIB -I..\..\..\..\..\uC-Probe\Target\Plugins\uCOS-II -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\Source -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Ports\ST\STM32 -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Source -ID:\Keil\ARM\INC\ST\STM32F10x ..\..\..\..\..\CPU\ST\STM32\src\stm32f10x_rtc.c]
                          THUMB

                          AREA ||.text||, CODE, READONLY, ALIGN=2

                  RTC_ITConfig PROC
;;;56       
;;;57       if (NewState != DISABLE)
000000  4a43              LDR      r2,|L1.272|
000002  b129              CBZ      r1,|L1.16|
;;;58       {
;;;59         RTC->CRH |= RTC_IT;
000004  f8b2f8b2          LDRH     r1,[r2,#0x800]
000008  4308              ORRS     r0,r0,r1
00000a  f8a2f8a2          STRH     r0,[r2,#0x800]
;;;60       }
;;;61       else
;;;62       {
;;;63         RTC->CRH &= (u16)~RTC_IT;
;;;64       }
;;;65     }
00000e  4770              BX       lr
                  |L1.16|
000010  f8b2f8b2          LDRH     r1,[r2,#0x800]
000014  ea21ea21          BIC      r0,r1,r0
000018  f8a2f8a2          STRH     r0,[r2,#0x800]
00001c  4770              BX       lr
;;;66     
                          ENDP

                  RTC_EnterConfigMode PROC
;;;76       /* Set the CNF flag to enter in the Configuration Mode */
;;;77       RTC->CRL |= CRL_CNF_Set;
00001e  483d              LDR      r0,|L1.276|
000020  8801              LDRH     r1,[r0,#0]
000022  f041f041          ORR      r1,r1,#0x10
000026  8001              STRH     r1,[r0,#0]
;;;78     }
000028  4770              BX       lr
;;;79     
                          ENDP

                  RTC_ExitConfigMode PROC
;;;89       /* Reset the CNF flag to exit from the Configuration Mode */
;;;90       RTC->CRL &= CRL_CNF_Reset;
00002a  483a              LDR      r0,|L1.276|
00002c  8801              LDRH     r1,[r0,#0]
00002e  f021f021          BIC      r1,r1,#0x10
000032  8001              STRH     r1,[r0,#0]
;;;91     }
000034  4770              BX       lr
;;;92     
                          ENDP

                  RTC_GetCounter PROC
;;;102      u16 tmp = 0;
;;;103      tmp = RTC->CNTL;
000036  4938              LDR      r1,|L1.280|
000038  8888              LDRH     r0,[r1,#4]
;;;104    
;;;105      return (((u32)RTC->CNTH << 16 ) | tmp) ;
00003a  8809              LDRH     r1,[r1,#0]
00003c  ea40ea40          ORR      r0,r0,r1,LSL #16
;;;106    }
000040  4770              BX       lr
;;;107    
                          ENDP

                  RTC_SetCounter PROC
;;;115    void RTC_SetCounter(u32 CounterValue)
;;;116    { 
000042  b500              PUSH     {lr}
000044  4602              MOV      r2,r0
;;;117      RTC_EnterConfigMode();
000046  f7fff7ff          BL       RTC_EnterConfigMode
;;;118    
;;;119      /* Set RTC COUNTER MSB word */
;;;120      RTC->CNTH = (CounterValue & RTC_MSB_Mask) >> 16;
00004a  4833              LDR      r0,|L1.280|
00004c  0c11              LSRS     r1,r2,#16
00004e  8001              STRH     r1,[r0,#0]
;;;121      /* Set RTC COUNTER LSB word */
;;;122      RTC->CNTL = (CounterValue & RTC_LSB_Mask);
000050  8082              STRH     r2,[r0,#4]
;;;123    
;;;124      RTC_ExitConfigMode();
000052  f85df85d          POP      {lr}
000056  e7fe              B        RTC_ExitConfigMode
;;;125    }
;;;126    
                          ENDP

                  RTC_GetPrescaler PROC
;;;137    
;;;138      tmp = ((u32)RTC->PRLH & (u32)0x000F) << 0x10;
000058  4930              LDR      r1,|L1.284|
00005a  8808              LDRH     r0,[r1,#0]
00005c  0700              LSLS     r0,r0,#28
00005e  0b00              LSRS     r0,r0,#12
;;;139      tmp |= RTC->PRLL;
000060  8889              LDRH     r1,[r1,#4]
000062  4308              ORRS     r0,r0,r1
;;;140    
;;;141      return tmp;
;;;142    }
000064  4770              BX       lr
;;;143    
                          ENDP

                  RTC_SetPrescaler PROC
;;;151    void RTC_SetPrescaler(u32 PrescalerValue)
;;;152    {
000066  b500              PUSH     {lr}
000068  4602              MOV      r2,r0
;;;153      /* Check the parameters */
;;;154      assert(IS_RTC_PRESCALER(PrescalerValue));
;;;155      
;;;156      RTC_EnterConfigMode();
00006a  f7fff7ff          BL       RTC_EnterConfigMode
;;;157    
;;;158      /* Set RTC PRESCALER MSB word */
;;;159      RTC->PRLH = (PrescalerValue & PRLH_MSB_Mask) >> 0x10;
00006e  482b              LDR      r0,|L1.284|
000070  f3c2f3c2          UBFX     r1,r2,#16,#4
000074  8001              STRH     r1,[r0,#0]
;;;160      /* Set RTC PRESCALER LSB word */
;;;161      RTC->PRLL = (PrescalerValue & RTC_LSB_Mask);
000076  8082              STRH     r2,[r0,#4]
;;;162    
;;;163      RTC_ExitConfigMode();
000078  f85df85d          POP      {lr}
00007c  e7fe              B        RTC_ExitConfigMode
;;;164    }
;;;165    
                          ENDP

                  RTC_SetAlarm PROC
;;;173    void RTC_SetAlarm(u32 AlarmValue)
;;;174    {  
00007e  b500              PUSH     {lr}
000080  4602              MOV      r2,r0
;;;175      RTC_EnterConfigMode();
000082  f7fff7ff          BL       RTC_EnterConfigMode
;;;176    
;;;177      /* Set the ALARM MSB word */
;;;178      RTC->ALRH = (AlarmValue & RTC_MSB_Mask) >> 16;
000086  4826              LDR      r0,|L1.288|
000088  0c11              LSRS     r1,r2,#16
00008a  8001              STRH     r1,[r0,#0]
;;;179      /* Set the ALARM LSB word */
;;;180      RTC->ALRL = (AlarmValue & RTC_LSB_Mask);
00008c  8082              STRH     r2,[r0,#4]
;;;181    
;;;182      RTC_ExitConfigMode();
00008e  f85df85d          POP      {lr}
000092  e7fe              B        RTC_ExitConfigMode
;;;183    }
;;;184    
                          ENDP

                  RTC_GetDivider PROC
;;;195    
;;;196      tmp = ((u32)RTC->DIVH & (u32)0x000F) << 0x10;
000094  4923              LDR      r1,|L1.292|
000096  8808              LDRH     r0,[r1,#0]
000098  0700              LSLS     r0,r0,#28
00009a  0b00              LSRS     r0,r0,#12
;;;197      tmp |= RTC->DIVL;
00009c  8889              LDRH     r1,[r1,#4]
00009e  4308              ORRS     r0,r0,r1
;;;198    
;;;199      return tmp;
;;;200    }
0000a0  4770              BX       lr
;;;201    
                          ENDP

                  RTC_WaitForLastTask PROC
;;;210    void RTC_WaitForLastTask(void)
;;;211    {
0000a2  481b              LDR      r0,|L1.272|
                  |L1.164|
;;;212      /* Loop until RTOFF flag is set */
;;;213      while ((RTC->CRL & RTC_FLAG_RTOFF) == (u16)RESET)
0000a4  f8b0f8b0          LDRH     r1,[r0,#0x804]
0000a8  f011f011          TST      r1,#0x20
0000ac  d0fa              BEQ      |L1.164|
;;;214      {
;;;215      }
;;;216    }
0000ae  4770              BX       lr
;;;217    
                          ENDP

                  RTC_WaitForSynchro PROC
;;;230      /* Clear RSF flag */
;;;231      RTC->CRL &= (u16)~RTC_FLAG_RSF;
0000b0  4817              LDR      r0,|L1.272|
0000b2  f8b0f8b0          LDRH     r1,[r0,#0x804]
0000b6  f021f021          BIC      r1,r1,#8
0000ba  f8a0f8a0          STRH     r1,[r0,#0x804]
                  |L1.190|
;;;232    
;;;233      /* Loop until RSF flag is set */
;;;234      while ((RTC->CRL & RTC_FLAG_RSF) == (u16)RESET)
0000be  f8b0f8b0          LDRH     r1,[r0,#0x804]
0000c2  f011f011          TST      r1,#8
0000c6  d0fa              BEQ      |L1.190|
;;;235      {
;;;236      }
;;;237    }
0000c8  4770              BX       lr
;;;238    
                          ENDP

                  RTC_GetFlagStatus PROC
;;;252    FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG)
;;;253    {
0000ca  4601              MOV      r1,r0
;;;254      FlagStatus bitstatus = RESET;
0000cc  2000              MOVS     r0,#0
;;;255      
;;;256      /* Check the parameters */
;;;257      assert(IS_RTC_GET_FLAG(RTC_FLAG)); 
;;;258      
;;;259      if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
0000ce  4a11              LDR      r2,|L1.276|
0000d0  8812              LDRH     r2,[r2,#0]
0000d2  420a              TST      r2,r1
0000d4  d000              BEQ      |L1.216|
;;;260      {
;;;261        bitstatus = SET;
0000d6  2001              MOVS     r0,#1
                  |L1.216|
;;;262      }
;;;263      else
;;;264      {
;;;265        bitstatus = RESET;
;;;266      }
;;;267      return bitstatus;
;;;268    }
0000d8  4770              BX       lr
;;;269    
                          ENDP

                  RTC_ClearFlag PROC
;;;288      /* Clear the coressponding RTC flag */
;;;289      RTC->CRL &= (u16)~RTC_FLAG;
0000da  490e              LDR      r1,|L1.276|
0000dc  880a              LDRH     r2,[r1,#0]
0000de  ea22ea22          BIC      r0,r2,r0
0000e2  8008              STRH     r0,[r1,#0]
;;;290    }
0000e4  4770              BX       lr
;;;291    
                          ENDP

                  RTC_GetITStatus PROC
;;;309      
;;;310      bitstatus = (ITStatus)((RTC->CRL & RTC_IT) != (u16)RESET);
0000e6  4a0a              LDR      r2,|L1.272|
0000e8  f8b2f8b2          LDRH     r1,[r2,#0x804]
0000ec  4001              ANDS     r1,r1,r0
0000ee  d000              BEQ      |L1.242|
0000f0  2101              MOVS     r1,#1
                  |L1.242|
;;;311    
;;;312      if (((RTC->CRH & RTC_IT) != (u16)RESET) && bitstatus)
0000f2  f8b2f8b2          LDRH     r2,[r2,#0x800]
0000f6  4202              TST      r2,r0
0000f8  d002              BEQ      |L1.256|
0000fa  b109              CBZ      r1,|L1.256|
;;;313      {
;;;314        bitstatus = SET;
0000fc  2001              MOVS     r0,#1
;;;315      }
;;;316      else
;;;317      {
;;;318        bitstatus = RESET;
;;;319      }
;;;320      return bitstatus;
;;;321    }
0000fe  4770              BX       lr
                  |L1.256|
000100  2000              MOVS     r0,#0
000102  4770              BX       lr
;;;322    
                          ENDP

                  RTC_ClearITPendingBit PROC
;;;339      /* Clear the coressponding RTC pending bit */
;;;340      RTC->CRL &= (u16)~RTC_IT;
000104  4903              LDR      r1,|L1.276|
000106  880a              LDRH     r2,[r1,#0]
000108  ea22ea22          BIC      r0,r2,r0
00010c  8008              STRH     r0,[r1,#0]
;;;341    }
00010e  4770              BX       lr
;;;342    
                          ENDP

                  |L1.272|
000110  40002000          DCD      0x40002000
                  |L1.276|
000114  40002804          DCD      0x40002804
                  |L1.280|
000118  40002818          DCD      0x40002818
                  |L1.284|
00011c  40002808          DCD      0x40002808
                  |L1.288|
000120  40002820          DCD      0x40002820
                  |L1.292|
000124  40002810          DCD      0x40002810

⌨️ 快捷键说明

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