📄 stm32f10x_rtc.lst
字号:
226 * - RTC_FLAG_ALR: Alarm flag
227 * - RTC_FLAG_SEC: Second flag
228 * Output : None
229 * Return : The new state of RTC_FLAG (SET or RESET).
230 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
231 FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG)
232 {
\ RTC_GetFlagStatus:
\ 00000000 00B5 PUSH {LR}
233 FlagStatus bitstatus = RESET;
234
235 /* Check the parameters */
236 assert_param(IS_RTC_GET_FLAG(RTC_FLAG));
237
238 if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
\ 00000002 .... LDR.N R1,??DataTable11 ;; 0x40002804
\ 00000004 0988 LDRH R1,[R1, #+0]
\ 00000006 0142 TST R1,R0
\ 00000008 01D0 BEQ.N ??RTC_GetFlagStatus_0
239 {
240 bitstatus = SET;
\ 0000000A 0120 MOVS R0,#+1
\ 0000000C 00BD POP {PC}
241 }
242 else
243 {
244 bitstatus = RESET;
\ ??RTC_GetFlagStatus_0:
\ 0000000E 0020 MOVS R0,#+0
245 }
246 return bitstatus;
\ 00000010 00BD POP {PC} ;; return
247 }
248
249 /*******************************************************************************
250 * Function Name : RTC_ClearFlag
251 * Description : Clears the RTC抯 pending flags.
252 * Input : - RTC_FLAG: specifies the flag to clear.
253 * This parameter can be any combination of the following values:
254 * - RTC_FLAG_RSF: Registers Synchronized flag. This flag
255 * is cleared only after an APB reset or an APB Clock stop.
256 * - RTC_FLAG_OW: Overflow flag
257 * - RTC_FLAG_ALR: Alarm flag
258 * - RTC_FLAG_SEC: Second flag
259 * Output : None
260 * Return : None
261 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
262 void RTC_ClearFlag(u16 RTC_FLAG)
263 {
264 /* Check the parameters */
265 assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG));
266
267 /* Clear the coressponding RTC flag */
268 RTC->CRL &= (u16)~RTC_FLAG;
\ RTC_ClearFlag:
\ 00000000 .... LDR.N R1,??DataTable11 ;; 0x40002804
\ 00000002 0A88 LDRH R2,[R1, #+0]
\ 00000004 8243 BICS R2,R2,R0
\ 00000006 0A80 STRH R2,[R1, #+0]
269 }
\ 00000008 7047 BX LR ;; return
270
271 /*******************************************************************************
272 * Function Name : RTC_GetITStatus
273 * Description : Checks whether the specified RTC interrupt has occured or not.
274 * Input : - RTC_IT: specifies the RTC interrupts sources to check.
275 * This parameter can be one of the following values:
276 * - RTC_IT_OW: Overflow interrupt
277 * - RTC_IT_ALR: Alarm interrupt
278 * - RTC_IT_SEC: Second interrupt
279 * Output : None
280 * Return : The new state of the RTC_IT (SET or RESET).
281 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
282 ITStatus RTC_GetITStatus(u16 RTC_IT)
283 {
\ RTC_GetITStatus:
\ 00000000 00B5 PUSH {LR}
284 ITStatus bitstatus = RESET;
285
286 /* Check the parameters */
287 assert_param(IS_RTC_GET_IT(RTC_IT));
288
289 bitstatus = (ITStatus)(RTC->CRL & RTC_IT);
\ 00000002 .... LDR.N R1,??DataTable11 ;; 0x40002804
\ 00000004 0A88 LDRH R2,[R1, #+0]
\ 00000006 0100 MOVS R1,R0
\ 00000008 1140 ANDS R1,R1,R2
290
291 if (((RTC->CRH & RTC_IT) != (u16)RESET) && (bitstatus != (u16)RESET))
\ 0000000A .... LDR.N R2,??DataTable10 ;; 0x40002800
\ 0000000C 1288 LDRH R2,[R2, #+0]
\ 0000000E 0242 TST R2,R0
\ 00000010 04D0 BEQ.N ??RTC_GetITStatus_0
\ 00000012 C9B2 UXTB R1,R1
\ 00000014 0029 CMP R1,#+0
\ 00000016 01D0 BEQ.N ??RTC_GetITStatus_0
292 {
293 bitstatus = SET;
\ 00000018 0120 MOVS R0,#+1
\ 0000001A 00BD POP {PC}
294 }
295 else
296 {
297 bitstatus = RESET;
\ ??RTC_GetITStatus_0:
\ 0000001C 0020 MOVS R0,#+0
298 }
299 return bitstatus;
\ 0000001E 00BD POP {PC} ;; return
300 }
301
302 /*******************************************************************************
303 * Function Name : RTC_ClearITPendingBit
304 * Description : Clears the RTC抯 interrupt pending bits.
305 * Input : - RTC_IT: specifies the interrupt pending bit to clear.
306 * This parameter can be any combination of the following values:
307 * - RTC_IT_OW: Overflow interrupt
308 * - RTC_IT_ALR: Alarm interrupt
309 * - RTC_IT_SEC: Second interrupt
310 * Output : None
311 * Return : None
312 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
313 void RTC_ClearITPendingBit(u16 RTC_IT)
314 {
315 /* Check the parameters */
316 assert_param(IS_RTC_IT(RTC_IT));
317
318 /* Clear the coressponding RTC pending bit */
319 RTC->CRL &= (u16)~RTC_IT;
\ RTC_ClearITPendingBit:
\ 00000000 .... LDR.N R1,??DataTable11 ;; 0x40002804
\ 00000002 0A88 LDRH R2,[R1, #+0]
\ 00000004 8243 BICS R2,R2,R0
\ 00000006 0A80 STRH R2,[R1, #+0]
320 }
\ 00000008 7047 BX LR ;; return
\ In segment CODE, align 4, keep-with-next
\ ??DataTable4:
\ 00000000 18280040 DC32 0x40002818
\ In segment CODE, align 4, keep-with-next
\ ??DataTable10:
\ 00000000 00280040 DC32 0x40002800
\ In segment CODE, align 4, keep-with-next
\ ??DataTable11:
\ 00000000 04280040 DC32 0x40002804
321
322 /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function CSTACK
-------- ------
RTC_ClearFlag 0
RTC_ClearITPendingBit 0
RTC_EnterConfigMode 0
RTC_ExitConfigMode 0
RTC_GetCounter 0
RTC_GetDivider 0
RTC_GetFlagStatus 4
RTC_GetITStatus 4
RTC_ITConfig 0
RTC_SetAlarm 8
RTC_SetCounter 8
RTC_SetPrescaler 8
RTC_WaitForLastTask 0
RTC_WaitForSynchro 0
Segment part sizes:
Function/Label Bytes
-------------- -----
RTC_ITConfig 20
RTC_EnterConfigMode 12
RTC_ExitConfigMode 16
RTC_GetCounter 20
RTC_SetCounter 26
RTC_SetPrescaler 32
RTC_SetAlarm 32
RTC_GetDivider 28
??RTC_WaitForLastTask_0 10
RTC_WaitForSynchro 24
RTC_GetFlagStatus 18
RTC_ClearFlag 10
RTC_GetITStatus 32
RTC_ClearITPendingBit 10
??DataTable4 4
??DataTable10 4
??DataTable11 4
302 bytes in segment CODE
302 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -