📄 stm32f10x_rtc.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with Crescent Bay VAST 10.7u+w+:x ARM NEON, RVCT3.1 [Build 903] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o..\obj\stm32f10x_rtc.o --depend=..\obj\stm32f10x_rtc.d --device=DARMSTM -O3 -Otime -I..\..\LAB6 -I..\..\library\inc -IC:\Keil\ARM\INC\ST\STM32F10x -DVECT_TAB_FLASH --omf_browse=..\obj\stm32f10x_rtc.crf ..\..\library\src\stm32f10x_rtc.c]
THUMB
AREA ||.text||, CODE, READONLY, ALIGN=2
RTC_ITConfig PROC
;;;51 void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState)
;;;52 {
000000 4a44 LDR r2,|L1.276|
;;;53 /* Check the parameters */
;;;54 assert(IS_RTC_IT(RTC_IT));
;;;55 assert(IS_FUNCTIONAL_STATE(NewState));
;;;56
;;;57 if (NewState != DISABLE)
000002 2900 CMP r1,#0
;;;58 {
;;;59 RTC->CRH |= RTC_IT;
000004 f8b2f8b2 LDRH r1,[r2,#0x800]
;;;60 }
;;;61 else
;;;62 {
;;;63 RTC->CRH &= (u16)~RTC_IT;
000008 bf0c ITE EQ
00000a ea21ea21 BICEQ r0,r1,r0
00000e 4308 ORRNE r0,r0,r1
000010 f8a2f8a2 STRH r0,[r2,#0x800]
;;;64 }
;;;65 }
000014 4770 BX lr
ENDP
RTC_EnterConfigMode PROC
000016 4840 LDR r0,|L1.280|
000018 8801 LDRH r1,[r0,#0]
00001a f041f041 ORR r1,r1,#0x10
00001e 8001 STRH r1,[r0,#0]
000020 4770 BX lr
ENDP
RTC_ExitConfigMode PROC
000022 483d LDR r0,|L1.280|
000024 8801 LDRH r1,[r0,#0]
000026 f021f021 BIC r1,r1,#0x10
00002a 8001 STRH r1,[r0,#0]
00002c 4770 BX lr
ENDP
RTC_GetCounter PROC
;;;100 u32 RTC_GetCounter(void)
;;;101 {
00002e 493b LDR r1,|L1.284|
;;;102 u16 tmp = 0;
;;;103 tmp = RTC->CNTL;
000030 8888 LDRH r0,[r1,#4]
;;;104
;;;105 return (((u32)RTC->CNTH << 16 ) | tmp) ;
000032 8809 LDRH r1,[r1,#0]
000034 ea40ea40 ORR r0,r0,r1,LSL #16
;;;106 }
000038 4770 BX lr
ENDP
RTC_SetCounter PROC
;;;115 void RTC_SetCounter(u32 CounterValue)
;;;116 {
00003a 4937 LDR r1,|L1.280|
00003c 880b LDRH r3,[r1,#0]
;;;117 RTC_EnterConfigMode();
;;;118
;;;119 /* Set RTC COUNTER MSB word */
;;;120 RTC->CNTH = (CounterValue & RTC_MSB_Mask) >> 16;
00003e 0c02 LSRS r2,r0,#16
000040 f043f043 ORR r3,r3,#0x10
000044 800b STRH r3,[r1,#0]
000046 828a STRH r2,[r1,#0x14]
;;;121 /* Set RTC COUNTER LSB word */
;;;122 RTC->CNTL = (CounterValue & RTC_LSB_Mask);
000048 8308 STRH r0,[r1,#0x18]
00004a 8808 LDRH r0,[r1,#0]
00004c f020f020 BIC r0,r0,#0x10
000050 8008 STRH r0,[r1,#0]
;;;123
;;;124 RTC_ExitConfigMode();
;;;125 }
000052 4770 BX lr
ENDP
RTC_GetPrescaler PROC
;;;134 u32 RTC_GetPrescaler(void)
;;;135 {
000054 4932 LDR r1,|L1.288|
;;;136 u32 tmp = 0x00;
;;;137
;;;138 tmp = ((u32)RTC->PRLH & (u32)0x000F) << 0x10;
000056 8808 LDRH r0,[r1,#0]
;;;139 tmp |= RTC->PRLL;
000058 8889 LDRH r1,[r1,#4]
00005a 0700 LSLS r0,r0,#28
00005c ea41ea41 ORR r0,r1,r0,LSR #12
;;;140
;;;141 return tmp;
;;;142 }
000060 4770 BX lr
ENDP
RTC_SetPrescaler PROC
;;;151 void RTC_SetPrescaler(u32 PrescalerValue)
;;;152 {
000062 492d LDR r1,|L1.280|
000064 880b LDRH r3,[r1,#0]
;;;153 /* Check the parameters */
;;;154 assert(IS_RTC_PRESCALER(PrescalerValue));
;;;155
;;;156 RTC_EnterConfigMode();
;;;157
;;;158 /* Set RTC PRESCALER MSB word */
;;;159 RTC->PRLH = (PrescalerValue & PRLH_MSB_Mask) >> 0x10;
000066 f3c0f3c0 UBFX r2,r0,#16,#4
00006a f043f043 ORR r3,r3,#0x10
00006e 800b STRH r3,[r1,#0]
000070 808a STRH r2,[r1,#4]
;;;160 /* Set RTC PRESCALER LSB word */
;;;161 RTC->PRLL = (PrescalerValue & RTC_LSB_Mask);
000072 8108 STRH r0,[r1,#8]
000074 8808 LDRH r0,[r1,#0]
000076 f020f020 BIC r0,r0,#0x10
00007a 8008 STRH r0,[r1,#0]
;;;162
;;;163 RTC_ExitConfigMode();
;;;164 }
00007c 4770 BX lr
ENDP
RTC_SetAlarm PROC
;;;173 void RTC_SetAlarm(u32 AlarmValue)
;;;174 {
00007e 4926 LDR r1,|L1.280|
000080 880b LDRH r3,[r1,#0]
;;;175 RTC_EnterConfigMode();
;;;176
;;;177 /* Set the ALARM MSB word */
;;;178 RTC->ALRH = (AlarmValue & RTC_MSB_Mask) >> 16;
000082 0c02 LSRS r2,r0,#16
000084 f043f043 ORR r3,r3,#0x10
000088 800b STRH r3,[r1,#0]
00008a 838a STRH r2,[r1,#0x1c]
;;;179 /* Set the ALARM LSB word */
;;;180 RTC->ALRL = (AlarmValue & RTC_LSB_Mask);
00008c 8408 STRH r0,[r1,#0x20]
00008e 8808 LDRH r0,[r1,#0]
000090 f020f020 BIC r0,r0,#0x10
000094 8008 STRH r0,[r1,#0]
;;;181
;;;182 RTC_ExitConfigMode();
;;;183 }
000096 4770 BX lr
ENDP
RTC_GetDivider PROC
;;;192 u32 RTC_GetDivider(void)
;;;193 {
000098 4922 LDR r1,|L1.292|
;;;194 u32 tmp = 0x00;
;;;195
;;;196 tmp = ((u32)RTC->DIVH & (u32)0x000F) << 0x10;
00009a 8808 LDRH r0,[r1,#0]
;;;197 tmp |= RTC->DIVL;
00009c 8889 LDRH r1,[r1,#4]
00009e 0700 LSLS r0,r0,#28
0000a0 ea41ea41 ORR r0,r1,r0,LSR #12
;;;198
;;;199 return tmp;
;;;200 }
0000a4 4770 BX lr
ENDP
RTC_WaitForLastTask PROC
;;;210 void RTC_WaitForLastTask(void)
;;;211 {
0000a6 481b LDR r0,|L1.276|
|L1.168|
;;;212 /* Loop until RTOFF flag is set */
;;;213 while ((RTC->CRL & RTC_FLAG_RTOFF) == (u16)RESET)
0000a8 f8b0f8b0 LDRH r1,[r0,#0x804]
0000ac f011f011 TST r1,#0x20
0000b0 d0fa BEQ |L1.168|
;;;214 {
;;;215 }
;;;216 }
0000b2 4770 BX lr
ENDP
RTC_WaitForSynchro PROC
;;;230 /* Clear RSF flag */
;;;231 RTC->CRL &= (u16)~RTC_FLAG_RSF;
0000b4 4817 LDR r0,|L1.276|
0000b6 f8b0f8b0 LDRH r1,[r0,#0x804]
0000ba f021f021 BIC r1,r1,#8
0000be f8a0f8a0 STRH r1,[r0,#0x804]
;;;232
;;;233 /* Loop until RSF flag is set */
;;;234 while ((RTC->CRL & RTC_FLAG_RSF) == (u16)RESET)
0000c2 bf00 NOP
|L1.196|
0000c4 f8b0f8b0 LDRH r1,[r0,#0x804]
0000c8 f011f011 TST r1,#8
0000cc d0fa BEQ |L1.196|
;;;235 {
;;;236 }
;;;237 }
0000ce 4770 BX lr
ENDP
RTC_GetFlagStatus PROC
;;;253 {
;;;254 FlagStatus bitstatus = RESET;
0000d0 4a11 LDR r2,|L1.280|
0000d2 4601 MOV r1,r0
;;;255
;;;256 /* Check the parameters */
;;;257 assert(IS_RTC_GET_FLAG(RTC_FLAG));
;;;258
;;;259 if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
0000d4 8812 LDRH r2,[r2,#0]
0000d6 2000 MOVS r0,#0
0000d8 420a TST r2,r1
;;;260 {
;;;261 bitstatus = SET;
0000da bf18 IT NE
0000dc 2001 MOVNE r0,#1
;;;262 }
;;;263 else
;;;264 {
;;;265 bitstatus = RESET;
;;;266 }
;;;267 return bitstatus;
;;;268 }
0000de 4770 BX lr
ENDP
RTC_ClearFlag PROC
;;;283 void RTC_ClearFlag(u16 RTC_FLAG)
;;;284 {
0000e0 490d LDR r1,|L1.280|
;;;285 /* Check the parameters */
;;;286 assert(IS_RTC_CLEAR_FLAG(RTC_FLAG));
;;;287
;;;288 /* Clear the coressponding RTC flag */
;;;289 RTC->CRL &= (u16)~RTC_FLAG;
0000e2 880a LDRH r2,[r1,#0]
0000e4 ea22ea22 BIC r0,r2,r0
0000e8 8008 STRH r0,[r1,#0]
;;;290 }
0000ea 4770 BX lr
ENDP
RTC_GetITStatus PROC
;;;309
;;;310 bitstatus = (ITStatus)((RTC->CRL & RTC_IT) != (u16)RESET);
0000ec 4a09 LDR r2,|L1.276|
0000ee f8b2f8b2 LDRH r1,[r2,#0x804]
0000f2 4001 ANDS r1,r1,r0
0000f4 bf18 IT NE
0000f6 2101 MOVNE r1,#1
;;;311
;;;312 if (((RTC->CRH & RTC_IT) != (u16)RESET) && bitstatus)
0000f8 f8b2f8b2 LDRH r2,[r2,#0x800]
0000fc 4202 TST r2,r0
0000fe bf16 ITET NE
000100 2900 CMPNE r1,#0
;;;313 {
;;;314 bitstatus = SET;
;;;315 }
;;;316 else
;;;317 {
;;;318 bitstatus = RESET;
000102 2000 MOVEQ r0,#0
000104 2001 MOVNE r0,#1
;;;319 }
;;;320 return bitstatus;
;;;321 }
000106 4770 BX lr
ENDP
RTC_ClearITPendingBit PROC
;;;334 void RTC_ClearITPendingBit(u16 RTC_IT)
;;;335 {
000108 4903 LDR r1,|L1.280|
;;;336 /* Check the parameters */
;;;337 assert(IS_RTC_IT(RTC_IT));
;;;338
;;;339 /* Clear the coressponding RTC pending bit */
;;;340 RTC->CRL &= (u16)~RTC_IT;
00010a 880a LDRH r2,[r1,#0]
00010c ea22ea22 BIC r0,r2,r0
000110 8008 STRH r0,[r1,#0]
;;;341 }
000112 4770 BX lr
ENDP
|L1.276|
000114 40002000 DCD 0x40002000
|L1.280|
000118 40002804 DCD 0x40002804
|L1.284|
00011c 40002818 DCD 0x40002818
|L1.288|
000120 40002808 DCD 0x40002808
|L1.292|
000124 40002810 DCD 0x40002810
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -