📄 stm32f10x_rtc.lst
字号:
246 * - RTC_FLAG_OW: Overflow flag
247 * - RTC_FLAG_ALR: Alarm flag
248 * - RTC_FLAG_SEC: Second flag
249 * Output : None
250 * Return : The new state of RTC_FLAG (SET or RESET).
251 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
252 FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG)
253 {
\ RTC_GetFlagStatus:
\ 00000000 00B5 PUSH {LR}
254 FlagStatus bitstatus = RESET;
255
256 /* Check the parameters */
257 assert(IS_RTC_GET_FLAG(RTC_FLAG));
258
259 if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
\ 00000002 .... LDR.N R1,??DataTable13 ;; 0x40002804
\ 00000004 0988 LDRH R1,[R1, #+0]
\ 00000006 0142 TST R1,R0
\ 00000008 01D0 BEQ.N ??RTC_GetFlagStatus_0
260 {
261 bitstatus = SET;
\ 0000000A 0120 MOVS R0,#+1
\ 0000000C 00BD POP {PC}
262 }
263 else
264 {
265 bitstatus = RESET;
\ ??RTC_GetFlagStatus_0:
\ 0000000E 0020 MOVS R0,#+0
266 }
267 return bitstatus;
\ 00000010 00BD POP {PC} ;; return
268 }
269
270 /*******************************************************************************
271 * Function Name : RTC_ClearFlag
272 * Description : Clears the RTC抯 pending flags.
273 * Input : - RTC_FLAG: specifies the flag to clear.
274 * This parameter can be any combination of the following values:
275 * - RTC_FLAG_RSF: Registers Synchronized flag. This flag
276 * is cleared only after an APB reset or an APB Clock stop.
277 * - RTC_FLAG_OW: Overflow flag
278 * - RTC_FLAG_ALR: Alarm flag
279 * - RTC_FLAG_SEC: Second flag
280 * Output : None
281 * Return : None
282 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
283 void RTC_ClearFlag(u16 RTC_FLAG)
284 {
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;
\ RTC_ClearFlag:
\ 00000000 .... LDR.N R1,??DataTable13 ;; 0x40002804
\ 00000002 0A88 LDRH R2,[R1, #+0]
\ 00000004 8243 BICS R2,R2,R0
\ 00000006 0A80 STRH R2,[R1, #+0]
290 }
\ 00000008 7047 BX LR ;; return
291
292 /*******************************************************************************
293 * Function Name : RTC_GetITStatus
294 * Description : Checks whether the specified RTC interrupt has occured or not.
295 * Input : - RTC_IT: specifies the RTC interrupts sources to check.
296 * This parameter can be one of the following values:
297 * - RTC_IT_OW: Overflow interrupt
298 * - RTC_IT_ALR: Alarm interrupt
299 * - RTC_IT_SEC: Second interrupt
300 * Output : None
301 * Return : The new state of the RTC_IT (SET or RESET).
302 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
303 ITStatus RTC_GetITStatus(u16 RTC_IT)
304 {
\ RTC_GetITStatus:
\ 00000000 10B5 PUSH {R4,LR}
\ 00000002 0100 MOVS R1,R0
305 ITStatus bitstatus = RESET;
306
307 /* Check the parameters */
308 assert(IS_RTC_GET_IT(RTC_IT));
309
310 bitstatus = (ITStatus)((RTC->CRL & RTC_IT) != (u16)RESET);
\ 00000004 0120 MOVS R0,#+1
\ 00000006 0022 MOVS R2,#+0
\ 00000008 .... LDR.N R3,??DataTable13 ;; 0x40002804
\ 0000000A 1B88 LDRH R3,[R3, #+0]
\ 0000000C 0B42 TST R3,R1
\ 0000000E 01D0 BEQ.N ??RTC_GetITStatus_0
\ 00000010 0300 MOVS R3,R0
\ 00000012 00E0 B.N ??RTC_GetITStatus_1
\ ??RTC_GetITStatus_0:
\ 00000014 1300 MOVS R3,R2
311
312 if (((RTC->CRH & RTC_IT) != (u16)RESET) && bitstatus)
\ ??RTC_GetITStatus_1:
\ 00000016 .... LDR.N R4,??DataTable12 ;; 0x40002800
\ 00000018 2488 LDRH R4,[R4, #+0]
\ 0000001A 0C42 TST R4,R1
\ 0000001C 01D0 BEQ.N ??RTC_GetITStatus_2
\ 0000001E 002B CMP R3,#+0
\ 00000020 00D1 BNE.N ??RTC_GetITStatus_3
313 {
314 bitstatus = SET;
315 }
316 else
317 {
318 bitstatus = RESET;
\ ??RTC_GetITStatus_2:
\ 00000022 1000 MOVS R0,R2
319 }
320 return bitstatus;
\ ??RTC_GetITStatus_3:
\ 00000024 10BD POP {R4,PC} ;; return
321 }
322
323 /*******************************************************************************
324 * Function Name : RTC_ClearITPendingBit
325 * Description : Clears the RTC抯 interrupt pending bits.
326 * Input : - RTC_IT: specifies the interrupt pending bit to clear.
327 * This parameter can be any combination of the following values:
328 * - RTC_IT_OW: Overflow interrupt
329 * - RTC_IT_ALR: Alarm interrupt
330 * - RTC_IT_SEC: Second interrupt
331 * Output : None
332 * Return : None
333 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
334 void RTC_ClearITPendingBit(u16 RTC_IT)
335 {
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;
\ RTC_ClearITPendingBit:
\ 00000000 .... LDR.N R1,??DataTable13 ;; 0x40002804
\ 00000002 0A88 LDRH R2,[R1, #+0]
\ 00000004 8243 BICS R2,R2,R0
\ 00000006 0A80 STRH R2,[R1, #+0]
341 }
\ 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
\ ??DataTable6:
\ 00000000 08280040 DC32 0x40002808
\ In segment CODE, align 4, keep-with-next
\ ??DataTable12:
\ 00000000 00280040 DC32 0x40002800
\ In segment CODE, align 4, keep-with-next
\ ??DataTable13:
\ 00000000 04280040 DC32 0x40002804
342
343 /******************* (C) COPYRIGHT 2007 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 8
RTC_GetPrescaler 0
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_GetPrescaler 24
RTC_SetPrescaler 28
RTC_SetAlarm 32
RTC_GetDivider 28
??RTC_WaitForLastTask_0 10
RTC_WaitForSynchro 24
RTC_GetFlagStatus 18
RTC_ClearFlag 10
RTC_GetITStatus 38
RTC_ClearITPendingBit 10
??DataTable4 4
??DataTable6 4
??DataTable12 4
??DataTable13 4
332 bytes in segment CODE
332 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -