📄 bsp.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.42A/W32 KICKSTART 13/Mar/2009 16:00:54 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = thumb #
# Endian = little #
# Stack alignment = 4 #
# Source file = E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\BSP\bsp.c #
# Command line = E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\BSP\bsp.c -lCN E:\UC_OS\Micrium\Software\EvalB #
# oards\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\bsp.lst #
# Object file = E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\Flash\Obj\bsp.r79 #
# #
# #
##############################################################################
E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVAL\IAR\BSP\bsp.c
1 /*
2 *********************************************************************************************************
3 * MICIRUM BOARD SUPPORT PACKAGE
4 *
5 * (c) Copyright 2007; 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 develop a similar product.
9 * Please help us continue to provide the Embedded community with the finest
10 * software available. Your honesty is greatly appreciated.
11 *********************************************************************************************************
12 */
13
14 /*
15 *********************************************************************************************************
16 *
17 * BOARD SUPPORT PACKAGE
18 *
19 * ST Microelectronics STM32
20 * with the
21 * STM3210B-EVAL Evaluation Board
22 *
23 * Filename : bsp.c
24 * Version : V1.00
25 * Programmer(s) : Brian Nagel
26 *********************************************************************************************************
27 */
28
29 /*
30 *********************************************************************************************************
31 * INCLUDE FILES
32 *********************************************************************************************************
33 */
34
35 #define BSP_GLOBALS
36 #include <includes.h>
37
38
39 /*
40 *********************************************************************************************************
41 * LOCAL DEFINES
42 *********************************************************************************************************
43 */
44 /* ---------------------- GPIOA Pins ---------------------- */
45 #define GPIOA_UART1_TX DEF_BIT_09
46 #define GPIOA_UART1_RX DEF_BIT_10
47 #define GPIOA_LCD_BL DEF_BIT_14
48
49 /* ---------------------- GPIOB Pins ---------------------- */
50 #define GPIOB_LCD_CS DEF_BIT_02
51 #define GPIOB_TEMP_INT DEF_BIT_05
52 #define GPIOB_TEMP_SCL DEF_BIT_06
53 #define GPIOB_TEMP_SDA DEF_BIT_07
54 #define GPIOB_AUDIO_PWM DEF_BIT_08
55 #define GPIOB_PB_KEY DEF_BIT_09
56 #define GPIOB_LCD_SCL DEF_BIT_13
57 #define GPIOB_LCD_SDO DEF_BIT_14
58 #define GPIOB_LCD_SDI DEF_BIT_15
59
60 /* ---------------------- GPIOC Pins ---------------------- */
61 #define GPIOC_POT DEF_BIT_04
62 #define GPIOC_LED1 DEF_BIT_06
63 #define GPIOC_LED2 DEF_BIT_07
64 #define GPIOC_LED3 DEF_BIT_08
65 #define GPIOC_LED4 DEF_BIT_09
66
67 /* ---------------------- GPIOD Pins ---------------------- */
68 #define GPIOD_CAN_RX DEF_BIT_00
69 #define GPIOD_CAN_TX DEF_BIT_01
70 #define GPIOD_UART2_CTS DEF_BIT_03
71 #define GPIOD_UART2_RTS DEF_BIT_04
72 #define GPIOD_UART2_TX DEF_BIT_05
73 #define GPIOD_UART2_RX DEF_BIT_06
74 #define GPIOD_LCD_RS DEF_BIT_07
75 #define GPIOD_JOY_UP DEF_BIT_08
76 #define GPIOD_JOY_SEL DEF_BIT_12
77 #define GPIOD_JOY_DOWN DEF_BIT_14
78 #define GPIOD_LCD_RD DEF_BIT_15
79
80 /* ---------------------- GPIOE Pins ---------------------- */
81 #define GPIOE_JOY_LEFT DEF_BIT_00
82 #define GPIOE_JOY_RIGHT DEF_BIT_01
83
84 /*
85 *********************************************************************************************************
86 * LOCAL CONSTANTS
87 *********************************************************************************************************
88 */
89
90
91 /*
92 *********************************************************************************************************
93 * LOCAL DATA TYPES
94 *********************************************************************************************************
95 */
96
97
98 /*
99 *********************************************************************************************************
100 * LOCAL TABLES
101 *********************************************************************************************************
102 */
103
104
105 /*
106 *********************************************************************************************************
107 * LOCAL GLOBAL VARIABLES
108 *********************************************************************************************************
109 */
110
111
112 /*
113 *********************************************************************************************************
114 * LOCAL FUNCTION PROTOTYPES
115 *********************************************************************************************************
116 */
117
118 static void Tmr_TickInit (void);
119 static void LED_Init (void);
120 static void PB_Init (void);
121 static void Joystick_Init (void);
122
123 /*
124 *********************************************************************************************************
125 * LOCAL CONFIGURATION ERRORS
126 *********************************************************************************************************
127 */
128
129
130 /*
131 ******************************************************************************************************************************
132 ******************************************************************************************************************************
133 ** Global Functions
134 ******************************************************************************************************************************
135 ******************************************************************************************************************************
136 */
137
138 /*
139 *********************************************************************************************************
140 * BSP INITIALIZATION
141 *
142 * Description : This function should be called by your application code before you make use of any of the
143 * functions found in this module.
144 *
145 * Arguments : none
146 *********************************************************************************************************
147 */
148
\ In segment CODE, align 4, keep-with-next
149 void BSP_Init (void)
150 {
\ BSP_Init:
\ 00000000 00B5 PUSH {LR}
151 RCC_DeInit();
\ 00000002 ........ _BLF RCC_DeInit,??RCC_DeInit??rT
152 RCC_HSEConfig(RCC_HSE_ON);
\ 00000006 5FF48030 MOVS R0,#+65536
\ 0000000A ........ _BLF RCC_HSEConfig,??RCC_HSEConfig??rT
153 RCC_WaitForHSEStartUp();
\ 0000000E ........ _BLF RCC_WaitForHSEStartUp,??RCC_WaitForHSEStartUp??rT
154
155
156 RCC_HCLKConfig(RCC_SYSCLK_Div1);
\ 00000012 0020 MOVS R0,#+0
\ 00000014 ........ _BLF RCC_HCLKConfig,??RCC_HCLKConfig??rT
157 RCC_PCLK2Config(RCC_HCLK_Div1);
\ 00000018 0020 MOVS R0,#+0
\ 0000001A ........ _BLF RCC_PCLK2Config,??RCC_PCLK2Config??rT
158 RCC_PCLK1Config(RCC_HCLK_Div2);
\ 0000001E 5FF48060 MOVS R0,#+1024
\ 00000022 ........ _BLF RCC_PCLK1Config,??RCC_PCLK1Config??rT
159 RCC_ADCCLKConfig(RCC_PCLK2_Div6);
\ 00000026 5FF40040 MOVS R0,#+32768
\ 0000002A ........ _BLF RCC_ADCCLKConfig,??RCC_ADCCLKConfig??rT
160 FLASH_SetLatency(FLASH_Latency_2);
\ 0000002E 0220 MOVS R0,#+2
\ 00000030 ........ _BLF FLASH_SetLatency,??FLASH_SetLatency??rT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -