📄 stm32f10x_wwdg.lst
字号:
###############################################################################
# #
# IAR ANSI C/C++ Compiler V6.10.2.52244/W32 for ARM 07/Aug/2011 12:10:42 #
# Copyright 1999-2010 IAR Systems AB. #
# #
# Cpu mode = thumb #
# Endian = little #
# Source file = F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\STM32F10 #
# x_StdPeriph_Driver\src\stm32f10x_wwdg.c #
# Command line = F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\STM32F10 #
# x_StdPeriph_Driver\src\stm32f10x_wwdg.c -D #
# USE_STDPERIPH_DRIVER -D STM32F10X_CL -lCN #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
# t\ -o F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Fla #
# sh\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 #
# D:\arm\INC\c\DLib_Config_Normal.h -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\APP\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ #
# -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP #
# \ST\CMSIS\CM3\CoreSupport\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
# \CMSIS\CM3\DeviceSupport\ST\STM32F10x\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
# \STM32F10x_StdPeriph_Driver\inc\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\uC #
# OS-II\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II #
# \..\..\uCOS-II\Ports\ARM-Cortex-M3\Generic\IAR\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uCO #
# S-II\Source\ -I F:\stm32\我的程序\Micrium\Software\EWARM #
# \OS-II\..\..\uC-LIB\ -I F:\stm32\我的程序\Micrium\Softwa #
# re\EWARM\OS-II\..\..\uC-LIB\Ports\ARM-Cortex-M3\IAR\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uC- #
# CPU\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\. #
# .\..\uC-CPU\ARM-Cortex-M3\IAR\ -On --use_c++_inline #
# List file = F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
# t\stm32f10x_wwdg.lst #
# Object file = F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Obj #
# \stm32f10x_wwdg.o #
# #
# #
###############################################################################
F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c
1 /**
2 ******************************************************************************
3 * @file stm32f10x_wwdg.c
4 * @author MCD Application Team
5 * @version V3.4.0
6 * @date 10/15/2010
7 * @brief This file provides all the WWDG firmware functions.
8 ******************************************************************************
9 * @copy
10 *
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 *
18 * <h2><center>© COPYRIGHT 2010 STMicroelectronics</center></h2>
19 */
20
21 /* Includes ------------------------------------------------------------------*/
22 #include "stm32f10x_wwdg.h"
23 #include "stm32f10x_rcc.h"
24
25 /** @addtogroup STM32F10x_StdPeriph_Driver
26 * @{
27 */
28
29 /** @defgroup WWDG
30 * @brief WWDG driver modules
31 * @{
32 */
33
34 /** @defgroup WWDG_Private_TypesDefinitions
35 * @{
36 */
37
38 /**
39 * @}
40 */
41
42 /** @defgroup WWDG_Private_Defines
43 * @{
44 */
45
46 /* ----------- WWDG registers bit address in the alias region ----------- */
47 #define WWDG_OFFSET (WWDG_BASE - PERIPH_BASE)
48
49 /* Alias word address of EWI bit */
50 #define CFR_OFFSET (WWDG_OFFSET + 0x04)
51 #define EWI_BitNumber 0x09
52 #define CFR_EWI_BB (PERIPH_BB_BASE + (CFR_OFFSET * 32) + (EWI_BitNumber * 4))
53
54 /* --------------------- WWDG registers bit mask ------------------------ */
55
56 /* CR register bit mask */
57 #define CR_WDGA_Set ((uint32_t)0x00000080)
58
59 /* CFR register bit mask */
60 #define CFR_WDGTB_Mask ((uint32_t)0xFFFFFE7F)
61 #define CFR_W_Mask ((uint32_t)0xFFFFFF80)
62 #define BIT_Mask ((uint8_t)0x7F)
63
64 /**
65 * @}
66 */
67
68 /** @defgroup WWDG_Private_Macros
69 * @{
70 */
71
72 /**
73 * @}
74 */
75
76 /** @defgroup WWDG_Private_Variables
77 * @{
78 */
79
80 /**
81 * @}
82 */
83
84 /** @defgroup WWDG_Private_FunctionPrototypes
85 * @{
86 */
87
88 /**
89 * @}
90 */
91
92 /** @defgroup WWDG_Private_Functions
93 * @{
94 */
95
96 /**
97 * @brief Deinitializes the WWDG peripheral registers to their default reset values.
98 * @param None
99 * @retval None
100 */
\ In section .text, align 2, keep-with-next
101 void WWDG_DeInit(void)
102 {
\ WWDG_DeInit:
\ 00000000 80B5 PUSH {R7,LR}
103 RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, ENABLE);
\ 00000002 0121 MOVS R1,#+1
\ 00000004 4FF40060 MOV R0,#+2048
\ 00000008 ........ BL RCC_APB1PeriphResetCmd
104 RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, DISABLE);
\ 0000000C 0021 MOVS R1,#+0
\ 0000000E 4FF40060 MOV R0,#+2048
\ 00000012 ........ BL RCC_APB1PeriphResetCmd
105 }
\ 00000016 01BD POP {R0,PC} ;; return
106
107 /**
108 * @brief Sets the WWDG Prescaler.
109 * @param WWDG_Prescaler: specifies the WWDG Prescaler.
110 * This parameter can be one of the following values:
111 * @arg WWDG_Prescaler_1: WWDG counter clock = (PCLK1/4096)/1
112 * @arg WWDG_Prescaler_2: WWDG counter clock = (PCLK1/4096)/2
113 * @arg WWDG_Prescaler_4: WWDG counter clock = (PCLK1/4096)/4
114 * @arg WWDG_Prescaler_8: WWDG counter clock = (PCLK1/4096)/8
115 * @retval None
116 */
\ In section .text, align 2, keep-with-next
117 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
118 {
119 uint32_t tmpreg = 0;
\ WWDG_SetPrescaler:
\ 00000000 0021 MOVS R1,#+0
120 /* Check the parameters */
121 assert_param(IS_WWDG_PRESCALER(WWDG_Prescaler));
122 /* Clear WDGTB[1:0] bits */
123 tmpreg = WWDG->CFR & CFR_WDGTB_Mask;
\ 00000002 .... LDR.N R2,??DataTable6 ;; 0x40002c04
\ 00000004 1268 LDR R2,[R2, #+0]
\ 00000006 32F4C072 BICS R2,R2,#0x180
\ 0000000A 1100 MOVS R1,R2
124 /* Set WDGTB[1:0] bits according to WWDG_Prescaler value */
125 tmpreg |= WWDG_Prescaler;
\ 0000000C 0143 ORRS R1,R0,R1
126 /* Store the new value */
127 WWDG->CFR = tmpreg;
\ 0000000E .... LDR.N R2,??DataTable6 ;; 0x40002c04
\ 00000010 1160 STR R1,[R2, #+0]
128 }
\ 00000012 7047 BX LR ;; return
129
130 /**
131 * @brief Sets the WWDG window value.
132 * @param WindowValue: specifies the window value to be compared to the downcounter.
133 * This parameter value must be lower than 0x80.
134 * @retval None
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -