1 | /** |
---|
2 | * @file |
---|
3 | * @ingroup stm32f4_reg |
---|
4 | * @brief Register definitions. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2012 Sebastian Huber. All rights reserved. |
---|
9 | * |
---|
10 | * embedded brains GmbH |
---|
11 | * Obere Lagerstr. 30 |
---|
12 | * 82178 Puchheim |
---|
13 | * Germany |
---|
14 | * <rtems@embedded-brains.de> |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef LIBBSP_ARM_STM32F4_STM32F4_H |
---|
22 | #define LIBBSP_ARM_STM32F4_STM32F4_H |
---|
23 | |
---|
24 | #include <bsp/utility.h> |
---|
25 | #include <bspopts.h> |
---|
26 | |
---|
27 | #define STM32F4_BASE 0x00 |
---|
28 | |
---|
29 | #ifdef STM32F4_FAMILY_F4XXXX |
---|
30 | |
---|
31 | /** |
---|
32 | * @defgroup stm32f4_reg Register Defintions |
---|
33 | * @ingroup arm_stm32f4 |
---|
34 | * @brief Register Definitions |
---|
35 | * @{ |
---|
36 | */ |
---|
37 | |
---|
38 | /** |
---|
39 | * @name STM32f4XXXX GPIO |
---|
40 | * @{ |
---|
41 | */ |
---|
42 | |
---|
43 | #include <bsp/stm32f4xxxx_gpio.h> |
---|
44 | #define STM32F4_GPIO(i) ((volatile stm32f4_gpio *) (STM32F4_BASE + 0x40020000) + (i)) |
---|
45 | |
---|
46 | /** @} */ |
---|
47 | |
---|
48 | /** |
---|
49 | * @name STM32F4XXXX RCC |
---|
50 | * @{ |
---|
51 | */ |
---|
52 | |
---|
53 | #include <bsp/stm32f4xxxx_rcc.h> |
---|
54 | #define STM32F4_RCC ((volatile stm32f4_rcc *) (STM32F4_BASE + 0x40023800)) |
---|
55 | |
---|
56 | /** @} */ |
---|
57 | |
---|
58 | #include <bsp/stm32_i2c.h> |
---|
59 | |
---|
60 | /** |
---|
61 | * @name STM32 I2C |
---|
62 | * @{ |
---|
63 | */ |
---|
64 | |
---|
65 | #define STM32F4_I2C3 ((volatile stm32f4_i2c *) (STM32F4_BASE + 0x40005C00)) |
---|
66 | #define STM32F4_I2C2 ((volatile stm32f4_i2c *) (STM32F4_BASE + 0x40005800)) |
---|
67 | #define STM32F4_I2C1 ((volatile stm32f4_i2c *) (STM32F4_BASE + 0x40005400)) |
---|
68 | |
---|
69 | /** @} */ |
---|
70 | |
---|
71 | /** |
---|
72 | * @name STM32 USART |
---|
73 | * @{ |
---|
74 | */ |
---|
75 | |
---|
76 | #include <bsp/stm32_usart.h> |
---|
77 | #define STM32F4_USART_1 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40011000)) |
---|
78 | #define STM32F4_USART_2 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004400)) |
---|
79 | #define STM32F4_USART_3 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004800)) |
---|
80 | #define STM32F4_USART_4 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004c00)) |
---|
81 | #define STM32F4_USART_5 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40005000)) |
---|
82 | #define STM32F4_USART_6 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40011400)) |
---|
83 | |
---|
84 | /** @} */ |
---|
85 | |
---|
86 | #endif /* STM32F4_FAMILY_F4XXXX */ |
---|
87 | |
---|
88 | #ifdef STM32F4_FAMILY_F10XXX |
---|
89 | |
---|
90 | /** |
---|
91 | * @name STM32F10 EXTI |
---|
92 | * @{ |
---|
93 | */ |
---|
94 | |
---|
95 | #include <bsp/stm32f10xxx_exti.h> |
---|
96 | #define STM32F4_EXTI ((volatile stm32f4_exti *) (STM32F4_BASE + 0x40010400)) |
---|
97 | |
---|
98 | /** @} */ |
---|
99 | |
---|
100 | /** |
---|
101 | * @name STM32F10XXX GPIO |
---|
102 | * @{ |
---|
103 | */ |
---|
104 | |
---|
105 | #include <bsp/stm32f10xxx_gpio.h> |
---|
106 | #define STM32F4_GPIO(i) ((volatile stm32f4_gpio *) (STM32F4_BASE + 0x40010800 + i * 0x400)) |
---|
107 | #define STM32F4_AFIO ((volatile stm32f4_afio *) (STM32F4_BASE + 0x40010000)) |
---|
108 | |
---|
109 | /** @} */ |
---|
110 | |
---|
111 | /** |
---|
112 | * @name STM32F10XXX RCC |
---|
113 | * @{ |
---|
114 | */ |
---|
115 | |
---|
116 | #include <bsp/stm32f10xxx_rcc.h> |
---|
117 | #define STM32F4_RCC ((volatile stm32f4_rcc *) (STM32F4_BASE + 0x40021000)) |
---|
118 | |
---|
119 | /** @} */ |
---|
120 | |
---|
121 | /** |
---|
122 | * @name STM32 I2C |
---|
123 | * @{ |
---|
124 | */ |
---|
125 | |
---|
126 | #include <bsp/stm32_i2c.h> |
---|
127 | #define STM32F4_I2C2 ((volatile stm32f4_i2c *) (STM32F4_BASE + 0x40005800)) |
---|
128 | #define STM32F4_I2C1 ((volatile stm32f4_i2c *) (STM32F4_BASE + 0x40005400)) |
---|
129 | |
---|
130 | /** @} */ |
---|
131 | |
---|
132 | /** |
---|
133 | * @name STM32 USART |
---|
134 | * @{ |
---|
135 | */ |
---|
136 | |
---|
137 | #include <bsp/stm32_usart.h> |
---|
138 | #define STM32F4_USART_1 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40013800)) |
---|
139 | #define STM32F4_USART_2 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004400)) |
---|
140 | #define STM32F4_USART_3 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004800)) |
---|
141 | #define STM32F4_USART_4 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004c00)) |
---|
142 | #define STM32F4_USART_5 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40005000)) |
---|
143 | |
---|
144 | /** @} */ |
---|
145 | |
---|
146 | /** @} */ |
---|
147 | |
---|
148 | #endif /* STM32F4_FAMILY_F10XXX */ |
---|
149 | |
---|
150 | #endif /* LIBBSP_ARM_STM32F4_STM32F4_H */ |
---|