📄 stm32f10x_rtc.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 934] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\stm32f10x_rtc.o --depend=.\Obj\stm32f10x_rtc.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\SRAM -I"D:\Program Files\MDK KEIL\ARM\INC\ST\STM32F10x" -D__MICROLIB --omf_browse=.\Obj\stm32f10x_rtc.crf ..\..\..\FWLib\library\src\stm32f10x_rtc.c]
THUMB
AREA ||i.RTC_ITConfig||, CODE, READONLY, ALIGN=2
RTC_ITConfig PROC
;;;45 void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState)
;;;46 {
000000 4a05 LDR r2,|L1.24|
;;;47 /* Check the parameters */
;;;48 assert_param(IS_RTC_IT(RTC_IT));
;;;49 assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;50
;;;51 if (NewState != DISABLE)
000002 2900 CMP r1,#0
;;;52 {
;;;53 RTC->CRH |= RTC_IT;
000004 f8b2f8b2 LDRH r1,[r2,#0x800]
000008 d001 BEQ |L1.14|
00000a 4301 ORRS r1,r1,r0
00000c e000 B |L1.16|
|L1.14|
;;;54 }
;;;55 else
;;;56 {
;;;57 RTC->CRH &= (u16)~RTC_IT;
00000e 4381 BICS r1,r1,r0
|L1.16|
000010 f8a2f8a2 STRH r1,[r2,#0x800] ;53
;;;58 }
;;;59 }
000014 4770 BX lr
;;;60
ENDP
000016 0000 DCW 0x0000
|L1.24|
000018 40002000 DCD 0x40002000
AREA ||i.RTC_EnterConfigMode||, CODE, READONLY, ALIGN=2
RTC_EnterConfigMode PROC
000000 4802 LDR r0,|L2.12|
000002 8801 LDRH r1,[r0,#0]
000004 f041f041 ORR r1,r1,#0x10
000008 8001 STRH r1,[r0,#0]
00000a 4770 BX lr
ENDP
|L2.12|
00000c 40002804 DCD 0x40002804
AREA ||i.RTC_ExitConfigMode||, CODE, READONLY, ALIGN=2
RTC_ExitConfigMode PROC
000000 4802 LDR r0,|L3.12|
000002 8801 LDRH r1,[r0,#0]
000004 f021f021 BIC r1,r1,#0x10
000008 8001 STRH r1,[r0,#0]
00000a 4770 BX lr
ENDP
|L3.12|
00000c 40002804 DCD 0x40002804
AREA ||i.RTC_GetCounter||, CODE, READONLY, ALIGN=2
RTC_GetCounter PROC
;;;94 u32 RTC_GetCounter(void)
;;;95 {
000000 4902 LDR r1,|L4.12|
;;;96 u16 tmp = 0;
;;;97 tmp = RTC->CNTL;
000002 8888 LDRH r0,[r1,#4]
;;;98
;;;99 return (((u32)RTC->CNTH << 16 ) | tmp) ;
000004 8809 LDRH r1,[r1,#0]
000006 ea40ea40 ORR r0,r0,r1,LSL #16
;;;100 }
00000a 4770 BX lr
;;;101
ENDP
|L4.12|
00000c 40002818 DCD 0x40002818
AREA ||i.RTC_SetCounter||, CODE, READONLY, ALIGN=2
RTC_SetCounter PROC
;;;109 void RTC_SetCounter(u32 CounterValue)
;;;110 {
000000 b500 PUSH {lr}
000002 4602 MOV r2,r0
;;;111 RTC_EnterConfigMode();
000004 f7fff7ff BL RTC_EnterConfigMode
;;;112
;;;113 /* Set RTC COUNTER MSB word */
;;;114 RTC->CNTH = CounterValue >> 16;
000008 4803 LDR r0,|L5.24|
00000a 0c11 LSRS r1,r2,#16
00000c 8001 STRH r1,[r0,#0]
;;;115 /* Set RTC COUNTER LSB word */
;;;116 RTC->CNTL = (CounterValue & RTC_LSB_Mask);
00000e 8082 STRH r2,[r0,#4]
;;;117
;;;118 RTC_ExitConfigMode();
000010 f85df85d POP {lr}
000014 f7fff7ff B.W RTC_ExitConfigMode
;;;119 }
;;;120
ENDP
|L5.24|
000018 40002818 DCD 0x40002818
AREA ||i.RTC_SetPrescaler||, CODE, READONLY, ALIGN=2
RTC_SetPrescaler PROC
;;;128 void RTC_SetPrescaler(u32 PrescalerValue)
;;;129 {
000000 b500 PUSH {lr}
000002 4602 MOV r2,r0
;;;130 /* Check the parameters */
;;;131 assert_param(IS_RTC_PRESCALER(PrescalerValue));
;;;132
;;;133 RTC_EnterConfigMode();
000004 f7fff7ff BL RTC_EnterConfigMode
;;;134
;;;135 /* Set RTC PRESCALER MSB word */
;;;136 RTC->PRLH = (PrescalerValue & PRLH_MSB_Mask) >> 16;
000008 4804 LDR r0,|L6.28|
00000a f3c2f3c2 UBFX r1,r2,#16,#4
00000e 8001 STRH r1,[r0,#0]
;;;137 /* Set RTC PRESCALER LSB word */
;;;138 RTC->PRLL = (PrescalerValue & RTC_LSB_Mask);
000010 8082 STRH r2,[r0,#4]
;;;139
;;;140 RTC_ExitConfigMode();
000012 f85df85d POP {lr}
000016 f7fff7ff B.W RTC_ExitConfigMode
;;;141 }
;;;142
ENDP
00001a 0000 DCW 0x0000
|L6.28|
00001c 40002808 DCD 0x40002808
AREA ||i.RTC_SetAlarm||, CODE, READONLY, ALIGN=2
RTC_SetAlarm PROC
;;;150 void RTC_SetAlarm(u32 AlarmValue)
;;;151 {
000000 b500 PUSH {lr}
000002 4602 MOV r2,r0
;;;152 RTC_EnterConfigMode();
000004 f7fff7ff BL RTC_EnterConfigMode
;;;153
;;;154 /* Set the ALARM MSB word */
;;;155 RTC->ALRH = AlarmValue >> 16;
000008 4803 LDR r0,|L7.24|
00000a 0c11 LSRS r1,r2,#16
00000c 8001 STRH r1,[r0,#0]
;;;156 /* Set the ALARM LSB word */
;;;157 RTC->ALRL = (AlarmValue & RTC_LSB_Mask);
00000e 8082 STRH r2,[r0,#4]
;;;158
;;;159 RTC_ExitConfigMode();
000010 f85df85d POP {lr}
000014 f7fff7ff B.W RTC_ExitConfigMode
;;;160 }
;;;161
ENDP
|L7.24|
000018 40002820 DCD 0x40002820
AREA ||i.RTC_GetDivider||, CODE, READONLY, ALIGN=2
RTC_GetDivider PROC
;;;169 u32 RTC_GetDivider(void)
;;;170 {
000000 4803 LDR r0,|L8.16|
;;;171 u32 tmp = 0x00;
;;;172
;;;173 tmp = ((u32)RTC->DIVH & (u32)0x000F) << 16;
000002 8801 LDRH r1,[r0,#0]
;;;174 tmp |= RTC->DIVL;
000004 8880 LDRH r0,[r0,#4]
000006 0709 LSLS r1,r1,#28 ;173
000008 ea40ea40 ORR r0,r0,r1,LSR #12
;;;175
;;;176 return tmp;
;;;177 }
00000c 4770 BX lr
;;;178
ENDP
00000e 0000 DCW 0x0000
|L8.16|
000010 40002810 DCD 0x40002810
AREA ||i.RTC_WaitForLastTask||, CODE, READONLY, ALIGN=2
RTC_WaitForLastTask PROC
;;;187 void RTC_WaitForLastTask(void)
;;;188 {
000000 4803 LDR r0,|L9.16|
;;;189 /* Loop until RTOFF flag is set */
;;;190 while ((RTC->CRL & RTC_FLAG_RTOFF) == (u16)RESET)
000002 bf00 NOP
|L9.4|
000004 f8b0f8b0 LDRH r1,[r0,#0x804]
000008 0689 LSLS r1,r1,#26
00000a d5fb BPL |L9.4|
;;;191 {
;;;192 }
;;;193 }
00000c 4770 BX lr
;;;194
ENDP
00000e 0000 DCW 0x0000
|L9.16|
000010 40002000 DCD 0x40002000
AREA ||i.RTC_WaitForSynchro||, CODE, READONLY, ALIGN=2
RTC_WaitForSynchro PROC
;;;207 /* Clear RSF flag */
;;;208 RTC->CRL &= (u16)~RTC_FLAG_RSF;
000000 4806 LDR r0,|L10.28|
000002 f8b0f8b0 LDRH r1,[r0,#0x804]
000006 f021f021 BIC r1,r1,#8
00000a f8a0f8a0 STRH r1,[r0,#0x804]
;;;209
;;;210 /* Loop until RSF flag is set */
;;;211 while ((RTC->CRL & RTC_FLAG_RSF) == (u16)RESET)
00000e bf00 NOP
|L10.16|
000010 f8b0f8b0 LDRH r1,[r0,#0x804]
000014 0709 LSLS r1,r1,#28
000016 d5fb BPL |L10.16|
;;;212 {
;;;213 }
;;;214 }
000018 4770 BX lr
;;;215
ENDP
00001a 0000 DCW 0x0000
|L10.28|
00001c 40002000 DCD 0x40002000
AREA ||i.RTC_GetFlagStatus||, CODE, READONLY, ALIGN=2
RTC_GetFlagStatus PROC
;;;230 {
;;;231 FlagStatus bitstatus = RESET;
000000 4903 LDR r1,|L11.16|
000002 4602 MOV r2,r0 ;230
;;;232
;;;233 /* Check the parameters */
;;;234 assert_param(IS_RTC_GET_FLAG(RTC_FLAG));
;;;235
;;;236 if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
000004 8809 LDRH r1,[r1,#0]
000006 2000 MOVS r0,#0 ;231
000008 4211 TST r1,r2
00000a d000 BEQ |L11.14|
;;;237 {
;;;238 bitstatus = SET;
00000c 2001 MOVS r0,#1
|L11.14|
;;;239 }
;;;240 else
;;;241 {
;;;242 bitstatus = RESET;
;;;243 }
;;;244 return bitstatus;
;;;245 }
00000e 4770 BX lr
;;;246
ENDP
|L11.16|
000010 40002804 DCD 0x40002804
AREA ||i.RTC_ClearFlag||, CODE, READONLY, ALIGN=2
RTC_ClearFlag PROC
;;;260 void RTC_ClearFlag(u16 RTC_FLAG)
;;;261 {
000000 4a02 LDR r2,|L12.12|
;;;262 /* Check the parameters */
;;;263 assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG));
;;;264
;;;265 /* Clear the coressponding RTC flag */
;;;266 RTC->CRL &= (u16)~RTC_FLAG;
000002 8811 LDRH r1,[r2,#0]
000004 4381 BICS r1,r1,r0
000006 8011 STRH r1,[r2,#0]
;;;267 }
000008 4770 BX lr
;;;268
ENDP
00000a 0000 DCW 0x0000
|L12.12|
00000c 40002804 DCD 0x40002804
AREA ||i.RTC_GetITStatus||, CODE, READONLY, ALIGN=2
RTC_GetITStatus PROC
;;;280 ITStatus RTC_GetITStatus(u16 RTC_IT)
;;;281 {
000000 4a05 LDR r2,|L13.24|
;;;282 ITStatus bitstatus = RESET;
;;;283
;;;284 /* Check the parameters */
;;;285 assert_param(IS_RTC_GET_IT(RTC_IT));
;;;286
;;;287 bitstatus = (ITStatus)(RTC->CRL & RTC_IT);
000002 8891 LDRH r1,[r2,#4]
;;;288
;;;289 if (((RTC->CRH & RTC_IT) != (u16)RESET) && (bitstatus != (u16)RESET))
000004 8812 LDRH r2,[r2,#0]
000006 4001 ANDS r1,r1,r0 ;287
000008 b2c9 UXTB r1,r1 ;287
00000a 4202 TST r2,r0
00000c d002 BEQ |L13.20|
00000e b109 CBZ r1,|L13.20|
;;;290 {
;;;291 bitstatus = SET;
000010 2001 MOVS r0,#1
;;;292 }
;;;293 else
;;;294 {
;;;295 bitstatus = RESET;
;;;296 }
;;;297 return bitstatus;
;;;298 }
000012 4770 BX lr
|L13.20|
000014 2000 MOVS r0,#0 ;295
000016 4770 BX lr
;;;299
ENDP
|L13.24|
000018 40002800 DCD 0x40002800
AREA ||i.RTC_ClearITPendingBit||, CODE, READONLY, ALIGN=2
RTC_ClearITPendingBit PROC
;;;311 void RTC_ClearITPendingBit(u16 RTC_IT)
;;;312 {
000000 4a02 LDR r2,|L14.12|
;;;313 /* Check the parameters */
;;;314 assert_param(IS_RTC_IT(RTC_IT));
;;;315
;;;316 /* Clear the coressponding RTC pending bit */
;;;317 RTC->CRL &= (u16)~RTC_IT;
000002 8811 LDRH r1,[r2,#0]
000004 4381 BICS r1,r1,r0
000006 8011 STRH r1,[r2,#0]
;;;318 }
000008 4770 BX lr
;;;319
ENDP
00000a 0000 DCW 0x0000
|L14.12|
00000c 40002804 DCD 0x40002804
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -