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

📄 stm32f10x_rtc.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       30/Jul/2008  14:37:40 #
# IAR ARM ANSI C/C++ Compiler V5.11.0.20622/W32 EVALUATION                    #
# Copyright 1999-2007 IAR Systems. All rights reserved.                       #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  E:\library\src\stm32f10x_rtc.c                           #
#    Command line =  E:\library\src\stm32f10x_rtc.c -D EMB_FLASH -lCN         #
#                    E:\ELE\yten\pro\Debug\List\ -lb                          #
#                    E:\ELE\yten\pro\Debug\List\ -o                           #
#                    E:\ELE\yten\pro\Debug\Obj\ --no_cse --no_unroll          #
#                    --no_inline --no_code_motion --no_tbaa --no_clustering   #
#                    --no_scheduling --debug --endian little --cpu Cortex-M3  #
#                    -e --fpu None --dlib_config "C:\Program Files\IAR        #
#                    Systems\Embedded Workbench 5.0                           #
#                    Evaluation\ARM\INC\DLib_Config_Normal.h" -I              #
#                    E:\ELE\yten\pro\ -I E:\ELE\yten\pro\..\LIBRARY\INC\ -I   #
#                    "C:\Program Files\IAR Systems\Embedded Workbench 5.0     #
#                    Evaluation\ARM\INC\" --section .text=.XML -On            #
#    List file    =  E:\ELE\yten\pro\Debug\List\stm32f10x_rtc.lst             #
#    Object file  =  E:\ELE\yten\pro\Debug\Obj\stm32f10x_rtc.o                #
#                                                                             #
#                                                                             #
###############################################################################

E:\library\src\stm32f10x_rtc.c
      1          /******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
      2          * File Name          : stm32f10x_rtc.c
      3          * Author             : MCD Application Team
      4          * Version            : V1.0
      5          * Date               : 10/08/2007
      6          * Description        : This file provides all the RTC firmware functions.
      7          ********************************************************************************
      8          * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
      9          * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
     10          * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
     11          * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
     12          * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
     13          * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
     14          *******************************************************************************/
     15          
     16          /* Includes ------------------------------------------------------------------*/
     17          #include "stm32f10x_rtc.h"
     18          
     19          /* Private typedef -----------------------------------------------------------*/
     20          /* Private define ------------------------------------------------------------*/
     21          #define CRL_CNF_Set      ((u16)0x0010)      /* Configuration Flag Enable Mask */
     22          #define CRL_CNF_Reset    ((u16)0xFFEF)      /* Configuration Flag Disable Mask */
     23          #define RTC_LSB_Mask     ((u32)0x0000FFFF)  /* RTC LSB Mask */
     24          #define RTC_MSB_Mask     ((u32)0xFFFF0000)  /* RTC MSB Mask */
     25          #define PRLH_MSB_Mask    ((u32)0x000F0000)  /* RTC Prescaler MSB Mask */
     26          
     27          /* Private macro -------------------------------------------------------------*/
     28          /* Private variables ---------------------------------------------------------*/
     29          /* Private function prototypes -----------------------------------------------*/
     30          /* Private functions ---------------------------------------------------------*/
     31          
     32          /*******************************************************************************
     33          * Function Name  : RTC_ITConfig
     34          * Description    : Enables or disables the specified RTC interrupts.
     35          * Input          : - RTC_IT: specifies the RTC interrupts sources to be enabled
     36          *                    or disabled.
     37          *                    This parameter can be any combination of the following values:
     38          *                       - RTC_IT_OW: Overflow interrupt
     39          *                       - RTC_IT_ALR: Alarm interrupt
     40          *                       - RTC_IT_SEC: Second interrupt
     41          *                  - NewState: new state of the specified RTC interrupts.
     42          *                    This parameter can be: ENABLE or DISABLE.
     43          * Output         : None
     44          * Return         : None
     45          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
     46          void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState)
     47          {
     48            /* Check the parameters */
     49            assert_param(IS_RTC_IT(RTC_IT));  
     50            assert_param(IS_FUNCTIONAL_STATE(NewState));
     51            
     52            if (NewState != DISABLE)
   \                     RTC_ITConfig:
   \   00000000   C9B2               UXTB     R1,R1            ;; ZeroExtS R1,R1,#+24,#+24
   \   00000002   0029               CMP      R1,#+0
   \   00000004   05D0               BEQ.N    ??RTC_ITConfig_0
     53            {
     54              RTC->CRH |= RTC_IT;
   \   00000006   ....               LDR.N    R2,??DataTable20  ;; 0x40002800
   \   00000008   1288               LDRH     R2,[R2, #+0]
   \   0000000A   0243               ORRS     R2,R2,R0
   \   0000000C   ....               LDR.N    R3,??DataTable20  ;; 0x40002800
   \   0000000E   1A80               STRH     R2,[R3, #+0]
   \   00000010   04E0               B.N      ??RTC_ITConfig_1
     55            }
     56            else
     57            {
     58              RTC->CRH &= (u16)~RTC_IT;
   \                     ??RTC_ITConfig_0:
   \   00000012   ....               LDR.N    R2,??DataTable20  ;; 0x40002800
   \   00000014   1288               LDRH     R2,[R2, #+0]
   \   00000016   8243               BICS     R2,R2,R0
   \   00000018   ....               LDR.N    R3,??DataTable20  ;; 0x40002800
   \   0000001A   1A80               STRH     R2,[R3, #+0]
     59            }
     60          }
   \                     ??RTC_ITConfig_1:
   \   0000001C   7047               BX       LR               ;; return
     61          
     62          /*******************************************************************************
     63          * Function Name  : RTC_EnterConfigMode
     64          * Description    : Enters the RTC configuration mode.
     65          * Input          : None
     66          * Output         : None
     67          * Return         : None
     68          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
     69          void RTC_EnterConfigMode(void)
     70          {
     71            /* Set the CNF flag to enter in the Configuration Mode */
     72            RTC->CRL |= CRL_CNF_Set;
   \                     RTC_EnterConfigMode:
   \   00000000   ....               LDR.N    R0,??DataTable22  ;; 0x40002804
   \   00000002   0088               LDRH     R0,[R0, #+0]
   \   00000004   50F01000           ORRS     R0,R0,#0x10
   \   00000008   ....               LDR.N    R1,??DataTable22  ;; 0x40002804
   \   0000000A   0880               STRH     R0,[R1, #+0]
     73          }
   \   0000000C   7047               BX       LR               ;; return
     74          
     75          /*******************************************************************************
     76          * Function Name  : RTC_ExitConfigMode
     77          * Description    : Exits from the RTC configuration mode.
     78          * Input          : None
     79          * Output         : None
     80          * Return         : None
     81          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
     82          void RTC_ExitConfigMode(void)
     83          {
     84            /* Reset the CNF flag to exit from the Configuration Mode */
     85            RTC->CRL &= CRL_CNF_Reset;
   \                     RTC_ExitConfigMode:
   \   00000000   ....               LDR.N    R0,??DataTable22  ;; 0x40002804
   \   00000002   0088               LDRH     R0,[R0, #+0]
   \   00000004   0249               LDR.N    R1,??RTC_ExitConfigMode_0  ;; 0xffef
   \   00000006   0140               ANDS     R1,R1,R0
   \   00000008   ....               LDR.N    R0,??DataTable22  ;; 0x40002804
   \   0000000A   0180               STRH     R1,[R0, #+0]
     86          }
   \   0000000C   7047               BX       LR               ;; return
   \   0000000E   00BF               Nop      
   \                     ??RTC_ExitConfigMode_0:
   \   00000010   EFFF0000           DC32     0xffef
     87          
     88          /*******************************************************************************
     89          * Function Name  : RTC_GetCounter
     90          * Description    : Gets the RTC counter value.
     91          * Input          : None
     92          * Output         : None
     93          * Return         : RTC counter value.
     94          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
     95          u32 RTC_GetCounter(void)
     96          {
     97            u16 tmp = 0;
   \                     RTC_GetCounter:
   \   00000000   0021               MOVS     R1,#+0
   \   00000002   0800               MOVS     R0,R1
     98            tmp = RTC->CNTL;
   \   00000004   ....               LDR.N    R1,??DataTable11  ;; 0x4000281c
   \   00000006   0988               LDRH     R1,[R1, #+0]
   \   00000008   0800               MOVS     R0,R1
     99          
    100            return (((u32)RTC->CNTH << 16 ) | tmp) ;
   \   0000000A   ....               LDR.N    R1,??DataTable10  ;; 0x40002818
   \   0000000C   0988               LDRH     R1,[R1, #+0]
   \   0000000E   0904               LSLS     R1,R1,#+16
   \   00000010   80B2               UXTH     R0,R0            ;; ZeroExtS R0,R0,#+16,#+16
   \   00000012   0843               ORRS     R0,R0,R1
   \   00000014   7047               BX       LR               ;; return
    101          }
    102          
    103          /*******************************************************************************
    104          * Function Name  : RTC_SetCounter
    105          * Description    : Sets the RTC counter value.
    106          * Input          : - CounterValue: RTC counter new value.
    107          * Output         : None
    108          * Return         : None
    109          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    110          void RTC_SetCounter(u32 CounterValue)
    111          { 
   \                     RTC_SetCounter:
   \   00000000   10B5               PUSH     {R4,LR}
   \   00000002   0400               MOVS     R4,R0
    112            RTC_EnterConfigMode();
   \   00000004   ........           BL       RTC_EnterConfigMode
    113          
    114            /* Set RTC COUNTER MSB word */
    115            RTC->CNTH = (CounterValue & RTC_MSB_Mask) >> 16;
   \   00000008   200C               LSRS     R0,R4,#+16
   \   0000000A   ....               LDR.N    R1,??DataTable10  ;; 0x40002818
   \   0000000C   0880               STRH     R0,[R1, #+0]
    116            /* Set RTC COUNTER LSB word */
    117            RTC->CNTL = (CounterValue & RTC_LSB_Mask);
   \   0000000E   ....               LDR.N    R0,??DataTable11  ;; 0x4000281c
   \   00000010   2100               MOVS     R1,R4
   \   00000012   0180               STRH     R1,[R0, #+0]
    118          
    119            RTC_ExitConfigMode();

⌨️ 快捷键说明

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