?? bsp_periph.lst
字號:
###############################################################################
# #
# IAR ANSI C/C++ Compiler V6.10.2.52244/W32 for ARM 07/Aug/2011 12:10:16 #
# Copyright 1999-2010 IAR Systems AB. #
# #
# Cpu mode = thumb #
# Endian = little #
# Source file = F:\stm32\我的程序\Micrium\Software\EWARM\BSP\bsp_periph. #
# c #
# Command line = F:\stm32\我的程序\Micrium\Software\EWARM\BSP\bsp_periph. #
# 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\bsp_periph.lst #
# Object file = F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Obj #
# \bsp_periph.o #
# #
# #
###############################################################################
F:\stm32\我的程序\Micrium\Software\EWARM\BSP\bsp_periph.c
1 /*
2 *********************************************************************************************************
3 * MICIRUM BOARD SUPPORT PACKAGE
4 *
5 * (c) Copyright 2007-2008; Micrium, Inc.; Weston, FL
6 *
7 * All rights reserved. Protected by international copyright laws.
8 * Knowledge of the source code may not be used to write a similar
9 * product. This file may only be used in accordance with a license
10 * and should not be redistributed in any way.
11 *********************************************************************************************************
12 */
13
14 /*
15 *********************************************************************************************************
16 *
17 * BOARD SUPPORT PACKAGE
18 *
19 * ST Microelectronics STM32
20 * on the
21 *
22 * Micrium uC-Eval-STM32F107
23 * Evaluation Board
24 *
25 * Filename : bsp_periph.c
26 * Version : V1.00
27 * Programmer(s) : EHS
28 *********************************************************************************************************
29 */
30
31 /*
32 *********************************************************************************************************
33 * INCLUDE FILES
34 *********************************************************************************************************
35 */
36
37 #define BSP_PERIPH_MODULE
38 #include <bsp.h>
39
40
41 /*
42 *********************************************************************************************************
43 * LOCAL DEFINES
44 *********************************************************************************************************
45 */
46
47 #define BSP_PERIPH_REG_RCC_BASE 0x40021000
48 #define BSP_PERIPH_REG_RCC_CFGR (*(volatile CPU_INT32U *)(BSP_PERIPH_REG_RCC_BASE + 0x004))
49 #define BSP_PERIPH_REG_RCC_AHBENR (*(volatile CPU_INT32U *)(BSP_PERIPH_REG_RCC_BASE + 0x014))
50 #define BSP_PERIPH_REG_RCC_APB2ENR (*(volatile CPU_INT32U *)(BSP_PERIPH_REG_RCC_BASE + 0x018))
51 #define BSP_PERIPH_REG_RCC_APB1ENR (*(volatile CPU_INT32U *)(BSP_PERIPH_REG_RCC_BASE + 0x01C))
52
53
54 /*
55 *********************************************************************************************************
56 * LOCAL CONSTANTS
57 *********************************************************************************************************
58 */
59
60
61 /*
62 *********************************************************************************************************
63 * LOCAL DATA TYPES
64 *********************************************************************************************************
65 */
66
67
68 /*
69 *********************************************************************************************************
70 * LOCAL TABLES
71 *********************************************************************************************************
72 */
73
74
75 /*
76 *********************************************************************************************************
77 * LOCAL GLOBAL VARIABLES
78 *********************************************************************************************************
79 */
80
81
82 /*
83 *********************************************************************************************************
84 * LOCAL FUNCTION PROTOTYPES
85 *********************************************************************************************************
86 */
87
88
89 /*
90 *********************************************************************************************************
91 * LOCAL CONFIGURATION ERRORS
92 *********************************************************************************************************
93 */
94
95
96 /*
97 *********************************************************************************************************
98 * BSP_PeriphClkFreqGet()
99 *
100 * Description : Get clock frequency of a peripheral.
101 *
102 * Argument(s) : pwr_clk_id Power/clock ID.
103 *
104 * Return(s) : none.
105 *
106 * Caller(s) : Application.
107 *
108 * Note(s) : none.
109 *********************************************************************************************************
110 */
111
\ In section .text, align 2, keep-with-next
112 CPU_INT32U BSP_PeriphClkFreqGet (CPU_DATA pwr_clk_id)
113 {
\ BSP_PeriphClkFreqGet:
\ 00000000 70B5 PUSH {R4-R6,LR}
\ 00000002 0400 MOVS R4,R0
114 CPU_INT32U clk_freq;
115 CPU_INT32U clk_div;
116
117
118 clk_freq = BSP_CPU_ClkFreq();
\ 00000004 ........ BL BSP_CPU_ClkFreq
\ 00000008 0500 MOVS R5,R0
119
120 switch (pwr_clk_id) {
\ 0000000A 2000 MOVS R0,R4
\ 0000000C 0028 CMP R0,#+0
\ 0000000E 0228 CMP R0,#+2
\ 00000010 21D9 BLS.N ??BSP_PeriphClkFreqGet_0
\ 00000012 001F SUBS R0,R0,#+4
\ 00000014 1FD0 BEQ.N ??BSP_PeriphClkFreqGet_0
\ 00000016 801E SUBS R0,R0,#+2
\ 00000018 1DD0 BEQ.N ??BSP_PeriphClkFreqGet_0
\ 0000001A 801F SUBS R0,R0,#+6
\ 0000001C 1BD0 BEQ.N ??BSP_PeriphClkFreqGet_0
\ 0000001E 801E SUBS R0,R0,#+2
\ 00000020 0128 CMP R0,#+1
\ 00000022 18D9 BLS.N ??BSP_PeriphClkFreqGet_0
\ 00000024 1238 SUBS R0,R0,#+18
\ 00000026 18D0 BEQ.N ??BSP_PeriphClkFreqGet_1
\ 00000028 801E SUBS R0,R0,#+2
\ 0000002A 0428 CMP R0,#+4
\ 0000002C 15D9 BLS.N ??BSP_PeriphClkFreqGet_1
\ 0000002E C01F SUBS R0,R0,#+7
\ 00000030 0328 CMP R0,#+3
\ 00000032 12D9 BLS.N ??BSP_PeriphClkFreqGet_1
\ 00000034 401F SUBS R0,R0,#+5
\ 00000036 10D0 BEQ.N ??BSP_PeriphClkFreqGet_1
\ 00000038 1238 SUBS R0,R0,#+18
\ 0000003A 0528 CMP R0,#+5
\ 0000003C 1CD9 BLS.N ??BSP_PeriphClkFreqGet_2
\ 0000003E 0B38 SUBS R0,R0,#+11
\ 00000040 1AD0 BEQ.N ??BSP_PeriphClkFreqGet_2
\ 00000042 C01E SUBS R0,R0,#+3
\ 00000044 0128 CMP R0,#+1
\ 00000046 17D9 BLS.N ??BSP_PeriphClkFreqGet_2
\ 00000048 C01E SUBS R0,R0,#+3
\ 0000004A 0528 CMP R0,#+5
\ 0000004C 14D9 BLS.N ??BSP_PeriphClkFreqGet_2
\ 0000004E 0838 SUBS R0,R0,#+8
\ 00000050 0428 CMP R0,#+4
\ 00000052 11D9 BLS.N ??BSP_PeriphClkFreqGet_2
\ 00000054 1FE0 B.N ??BSP_PeriphClkFreqGet_3
121 case BSP_PERIPH_ID_DMA1:
122 case BSP_PERIPH_ID_DMA2:
123 case BSP_PERIPH_ID_SRAM:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -