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

📄 stm32f10x_bkp.lst

📁 针对STM32F103的UCOS移植
💻 LST
📖 第 1 页 / 共 2 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.42A/W32 KICKSTART     13/Mar/2009  16:01:08 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  thumb                                                #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  E:\UC_OS\Micrium\Software\CPU\ST\STM32\src\stm32f10x #
#                       _bkp.c                                               #
#    Command line    =  E:\UC_OS\Micrium\Software\CPU\ST\STM32\src\stm32f10x #
#                       _bkp.c -lCN E:\UC_OS\Micrium\Software\EvalBoards\ST\ #
#                       STM3210B-EVAL\IAR\OS-Probe\Flash\List\ -o            #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\Flash\Obj\ -z6 --no_unroll            #
#                       --no_inline --no_tbaa --no_scheduling --debug        #
#                       --cpu_mode thumb --endian little --cpu cortex-M3     #
#                       --stack_align 4 -e --fpu None --dlib_config          #
#                       "C:\Program Files\IAR Systems\Embedded Workbench     #
#                       4.0 Kickstart\arm\LIB\dl7mptnnl8n.h" -I              #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\ -I E:\UC_OS\Micrium\Software\EvalBoa #
#                       rds\ST\STM3210B-EVAL\IAR\OS-Probe\..\..\..\..\..\uco #
#                       s-ii\ports\arm-cortex-m3\generic\iar\ -I             #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\ucos-ii\source\ -I     #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uc-lib\ -I             #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uc-cpu\ -I             #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uc-cpu\ARM-Cortex-M3\I #
#                       AR\ -I E:\UC_OS\Micrium\Software\EvalBoards\ST\STM32 #
#                       10B-EVAL\IAR\OS-Probe\..\..\..\..\..\cpu\st\stm32\in #
#                       c\ -I E:\UC_OS\Micrium\Software\EvalBoards\ST\STM321 #
#                       0B-EVAL\IAR\OS-Probe\..\BSP\ -I                      #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
#                       ication\Generic\RS-232\Source\ -I                    #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
#                       ication\Generic\RS-232\Ports\ST\STM32\ -I            #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
#                       ication\Generic\Source\ -I                           #
#                       E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Plugin #
#                       s\uCOS-II\ -I "C:\Program Files\IAR                  #
#                       Systems\Embedded Workbench 4.0 Kickstart\arm\INC\"   #
#    List file       =  E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\Flash\List\stm32f10x_bkp.lst          #
#    Object file     =  E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
#                       L\IAR\OS-Probe\Flash\Obj\stm32f10x_bkp.r79           #
#                                                                            #
#                                                                            #
##############################################################################

E:\UC_OS\Micrium\Software\CPU\ST\STM32\src\stm32f10x_bkp.c
      1          /******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
      2          * File Name          : stm32f10x_bkp.c
      3          * Author             : MCD Application Team
      4          * Date First Issued  : 09/29/2006
      5          * Description        : This file provides all the BKP firmware functions.
      6          ********************************************************************************
      7          * History:
      8          * 05/21/2007: V0.3
      9          * 04/02/2007: V0.2
     10          * 02/05/2007: V0.1
     11          * 09/29/2006: V0.01
     12          ********************************************************************************
     13          * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
     14          * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
     15          * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
     16          * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
     17          * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
     18          * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
     19          *******************************************************************************/
     20          
     21          /* Includes ------------------------------------------------------------------*/
     22          #include "stm32f10x_bkp.h"
     23          #include "stm32f10x_rcc.h"
     24          
     25          /* Private typedef -----------------------------------------------------------*/
     26          /* Private define ------------------------------------------------------------*/
     27          /* ------------ BKP registers bit address in the alias region ----------- */
     28          #define BKP_OFFSET        (BKP_BASE - PERIPH_BASE)
     29          
     30          /* --- RTCCR Register ---*/
     31          /* Alias word address of CCO bit */
     32          #define RTCCR_OFFSET      (BKP_OFFSET + 0x2C)
     33          #define CCO_BitNumber     0x07
     34          #define RTCCR_CCO_BB      (PERIPH_BB_BASE + (RTCCR_OFFSET * 32) + (CCO_BitNumber * 4))
     35          
     36          /* --- CR Register ---*/
     37          /* Alias word address of TPAL bit */
     38          #define CR_OFFSET         (BKP_OFFSET + 0x30)
     39          #define TPAL_BitNumber    0x01
     40          #define CR_TPAL_BB        (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TPAL_BitNumber * 4))
     41          
     42          /* Alias word address of TPE bit */
     43          #define TPE_BitNumber     0x00
     44          #define CR_TPE_BB         (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TPE_BitNumber * 4))
     45          
     46          /* --- CSR Register ---*/
     47          /* Alias word address of TPIE bit */
     48          #define CSR_OFFSET        (BKP_OFFSET + 0x34)
     49          #define TPIE_BitNumber    0x02
     50          #define CSR_TPIE_BB       (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TPIE_BitNumber * 4))
     51          
     52          /* Alias word address of TIF bit */
     53          #define TIF_BitNumber     0x09
     54          #define CSR_TIF_BB        (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TIF_BitNumber * 4))
     55          
     56          /* Alias word address of TEF bit */
     57          #define TEF_BitNumber     0x08
     58          #define CSR_TEF_BB        (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TEF_BitNumber * 4))
     59          
     60          
     61          /* ---------------------- BKP registers bit mask ------------------------ */
     62          /* RTCCR register bit mask */
     63          #define RTCCR_CAL_Mask    ((u16)0xFF80)
     64          
     65          /* CSR register bit mask */
     66          #define CSR_CTE_Set       ((u16)0x0001)
     67          #define CSR_CTI_Set       ((u16)0x0002)
     68          
     69          /* Private macro -------------------------------------------------------------*/
     70          /* Private variables ---------------------------------------------------------*/
     71          /* Private function prototypes -----------------------------------------------*/
     72          /* Private functions ---------------------------------------------------------*/
     73          
     74          /*******************************************************************************
     75          * Function Name  : BKP_DeInit
     76          * Description    : Deinitializes the BKP peripheral registers to their default
     77          *                  reset values.
     78          * Input          : None
     79          * Output         : None
     80          * Return         : None
     81          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
     82          void BKP_DeInit(void)
     83          {
   \                     BKP_DeInit:
   \   00000000   00B5               PUSH     {LR}
     84            RCC_BackupResetCmd(ENABLE);
   \   00000002   0120               MOVS     R0,#+1
   \   00000004   ........           _BLF     RCC_BackupResetCmd,??RCC_BackupResetCmd??rT
     85            RCC_BackupResetCmd(DISABLE);
   \   00000008   0020               MOVS     R0,#+0
   \   0000000A   ........           _BLF     RCC_BackupResetCmd,??RCC_BackupResetCmd??rT
     86          }
   \   0000000E   00BD               POP      {PC}             ;; return
     87          
     88          /*******************************************************************************
     89          * Function Name  : BKP_TamperPinLevelConfig
     90          * Description    : Configures the Tamper Pin active level.
     91          * Input          : - BKP_TamperPinLevel: specifies the Tamper Pin active level.
     92          *                    This parameter can be one of the following values:
     93          *                       - BKP_TamperPinLevel_High: Tamper pin active on high level
     94          *                       - BKP_TamperPinLevel_Low: Tamper pin active on low level
     95          * Output         : None
     96          * Return         : None
     97          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
     98          void BKP_TamperPinLevelConfig(u16 BKP_TamperPinLevel)
     99          {
    100            /* Check the parameters */
    101            assert(IS_BKP_TAMPER_PIN_LEVEL(BKP_TamperPinLevel));
    102          
    103            *(vu32 *) CR_TPAL_BB = BKP_TamperPinLevel;
   \                     BKP_TamperPinLevelConfig:
   \   00000000   0149               LDR.N    R1,??BKP_TamperPinLevelConfig_0  ;; 0x420d8604
   \   00000002   0860               STR      R0,[R1, #+0]
    104          }
   \   00000004   7047               BX       LR               ;; return
   \   00000006   00BF               Nop      
   \                     ??BKP_TamperPinLevelConfig_0:
   \   00000008   04860D42           DC32     0x420d8604
    105          
    106          /*******************************************************************************
    107          * Function Name  : BKP_TamperPinCmd
    108          * Description    : Enables or disables the Tamper Pin activation.
    109          * Input          : - NewState: new state of the Tamper Pin activation.
    110          *                    This parameter can be: ENABLE or DISABLE.
    111          * Output         : None
    112          * Return         : None
    113          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    114          void BKP_TamperPinCmd(FunctionalState NewState)
    115          {
    116            /* Check the parameters */
    117            assert(IS_FUNCTIONAL_STATE(NewState));
    118          
    119            *(vu32 *) CR_TPE_BB = (u32)NewState;
   \                     BKP_TamperPinCmd:
   \   00000000   0149               LDR.N    R1,??BKP_TamperPinCmd_0  ;; 0x420d8600
   \   00000002   0860               STR      R0,[R1, #+0]
    120          }
   \   00000004   7047               BX       LR               ;; return
   \   00000006   00BF               Nop      
   \                     ??BKP_TamperPinCmd_0:
   \   00000008   00860D42           DC32     0x420d8600
    121          
    122          /*******************************************************************************
    123          * Function Name  : BKP_ITConfig
    124          * Description    : Enables or disables the Tamper Pin Interrupt.
    125          * Input          : - NewState: new state of the Tamper Pin Interrupt.
    126          *                    This parameter can be: ENABLE or DISABLE.
    127          * Output         : None
    128          * Return         : None
    129          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    130          void BKP_ITConfig(FunctionalState NewState)
    131          {
    132            /* Check the parameters */
    133            assert(IS_FUNCTIONAL_STATE(NewState));
    134          
    135            *(vu32 *) CSR_TPIE_BB = (u32)NewState;
   \                     BKP_ITConfig:
   \   00000000   0149               LDR.N    R1,??BKP_ITConfig_0  ;; 0x420d8688
   \   00000002   0860               STR      R0,[R1, #+0]
    136          }
   \   00000004   7047               BX       LR               ;; return
   \   00000006   00BF               Nop      
   \                     ??BKP_ITConfig_0:
   \   00000008   88860D42           DC32     0x420d8688
    137          
    138          /*******************************************************************************
    139          * Function Name  : BKP_RTCCalibrationClockOutputCmd
    140          * Description    : Enables or disables the output of the Calibration Clock.
    141          * Input          : - NewState: new state of the Calibration Clock output.
    142          *                    This parameter can be: ENABLE or DISABLE.
    143          * Output         : None
    144          * Return         : None
    145          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    146          void BKP_RTCCalibrationClockOutputCmd(FunctionalState NewState)

⌨️ 快捷键说明

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