Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / NUCLEO-L476RG / board.h @ 47e89ebf

History | View | Annotate | Download (97.05 KB)

1 27d0378b Simon Welzel
/*
2 0f60c8ad Thomas Schöpping
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2019  Thomas Schöpping et al.
4 27d0378b Simon Welzel

5 0f60c8ad Thomas Schöpping
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9 27d0378b Simon Welzel

10 0f60c8ad Thomas Schöpping
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14 27d0378b Simon Welzel

15 0f60c8ad Thomas Schöpping
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 27d0378b Simon Welzel
*/
18
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
/*===========================================================================*/
23
/* Driver constants.                                                         */
24
/*===========================================================================*/
25
26
/*
27
 * Setup for STMicroelectronics STM32 Nucleo64-L476RG board.
28
 */
29
30
/*
31
 * Board identifier.
32
 */
33
#define BOARD_ST_NUCLEO64_L476RG
34
#define BOARD_NAME                  "STMicroelectronics STM32 Nucleo64-L476RG"
35
36
/*
37
 * Board oscillators-related settings.
38
 */
39
#if !defined(STM32_LSECLK)
40
#define STM32_LSECLK                32768U
41
#endif
42
43
#define STM32_LSEDRV                (3U << 3U)
44
45
#if !defined(STM32_HSECLK)
46
#define STM32_HSECLK                8000000U
47
#endif
48
49
#define STM32_HSE_BYPASS
50
51
/*
52
 * Board voltages.
53
 * Required for performance limits calculation.
54
 */
55
#define STM32_VDD                   300U
56
57
/*
58
 * MCU type as defined in the ST header.
59
 */
60
#define STM32L476xx
61
62
/*
63 4c72a54c Thomas Schöpping
 * Identifiers for optional peripherals.
64
 */
65
#define BOARD_MPU6050_CONNECTED     false
66
67
68
/*
69 27d0378b Simon Welzel
 * IO pins assignments.
70
 */
71
#define GPIOA_ARD_A0                0U
72 3106e8cc Thomas Schöpping
#define GPIOA_ADC12_IN5             0U
73 27d0378b Simon Welzel
#define GPIOA_ARD_A1                1U
74 3106e8cc Thomas Schöpping
#define GPIOA_ADC12_IN6             1U
75 27d0378b Simon Welzel
#define GPIOA_ARD_D1                2U
76
#define GPIOA_USART2_TX             2U
77
#define GPIOA_ARD_D0                3U
78
#define GPIOA_USART2_RX             3U
79
#define GPIOA_ARD_A2                4U
80 3106e8cc Thomas Schöpping
#define GPIOA_ADC12_IN9             4U
81 27d0378b Simon Welzel
#define GPIOA_ARD_D13               5U
82
#define GPIOA_LED_GREEN             5U
83
#define GPIOA_ARD_D12               6U
84
#define GPIOA_ARD_D11               7U
85
#define GPIOA_ARD_D7                8U
86
#define GPIOA_ARD_D8                9U
87
#define GPIOA_ARD_D2                10U
88
#define GPIOA_PIN11                 11U
89
#define GPIOA_PIN12                 12U
90
#define GPIOA_SWDIO                 13U
91
#define GPIOA_SWCLK                 14U
92
#define GPIOA_PIN15                 15U
93
94
#define GPIOB_ARD_A3                0U
95 3106e8cc Thomas Schöpping
#define GPIOB_ADC12_IN15            0U
96 27d0378b Simon Welzel
#define GPIOB_PIN1                  1U
97
#define GPIOB_PIN2                  2U
98
#define GPIOB_ARD_D3                3U
99
#define GPIOB_SWO                   3U
100
#define GPIOB_ARD_D5                4U
101
#define GPIOB_ARD_D4                5U
102
#define GPIOB_ARD_D10               6U
103
#define GPIOB_PIN7                  7U
104
#define GPIOB_ARD_D15               8U
105
#define GPIOB_ARD_D14               9U
106
#define GPIOB_ARD_D6                10U
107
#define GPIOB_PIN11                 11U
108
#define GPIOB_PIN12                 12U
109
#define GPIOB_PIN13                 13U
110
#define GPIOB_PIN14                 14U
111
#define GPIOB_PIN15                 15U
112
113
#define GPIOC_ARD_A5                0U
114 3106e8cc Thomas Schöpping
#define GPIOC_ADC123_IN1            0U
115 27d0378b Simon Welzel
#define GPIOC_ARD_A4                1U
116 3106e8cc Thomas Schöpping
#define GPIOC_ADC123_IN2            1U
117 27d0378b Simon Welzel
#define GPIOC_PIN2                  2U
118
#define GPIOC_PIN3                  3U
119
#define GPIOC_PIN4                  4U
120
#define GPIOC_PIN5                  5U
121
#define GPIOC_PIN6                  6U
122
#define GPIOC_ARD_D9                7U
123
#define GPIOC_PIN8                  8U
124
#define GPIOC_PIN9                  9U
125
#define GPIOC_PIN10                 10U
126
#define GPIOC_PIN11                 11U
127
#define GPIOC_PIN12                 12U
128
#define GPIOC_BUTTON                13U
129
#define GPIOC_OSC32_IN              14U
130
#define GPIOC_OSC32_OUT             15U
131
132
#define GPIOD_PIN0                  0U
133
#define GPIOD_PIN1                  1U
134
#define GPIOD_PIN2                  2U
135
#define GPIOD_PIN3                  3U
136
#define GPIOD_PIN4                  4U
137
#define GPIOD_PIN5                  5U
138
#define GPIOD_PIN6                  6U
139
#define GPIOD_PIN7                  7U
140
#define GPIOD_PIN8                  8U
141
#define GPIOD_PIN9                  9U
142
#define GPIOD_PIN10                 10U
143
#define GPIOD_PIN11                 11U
144
#define GPIOD_PIN12                 12U
145
#define GPIOD_PIN13                 13U
146
#define GPIOD_PIN14                 14U
147
#define GPIOD_PIN15                 15U
148
149
#define GPIOE_PIN0                  0U
150
#define GPIOE_PIN1                  1U
151
#define GPIOE_PIN2                  2U
152
#define GPIOE_PIN3                  3U
153
#define GPIOE_PIN4                  4U
154
#define GPIOE_PIN5                  5U
155
#define GPIOE_PIN6                  6U
156
#define GPIOE_PIN7                  7U
157
#define GPIOE_PIN8                  8U
158
#define GPIOE_PIN9                  9U
159
#define GPIOE_PIN10                 10U
160
#define GPIOE_PIN11                 11U
161
#define GPIOE_PIN12                 12U
162
#define GPIOE_PIN13                 13U
163
#define GPIOE_PIN14                 14U
164
#define GPIOE_PIN15                 15U
165
166
#define GPIOF_PIN0                  0U
167
#define GPIOF_PIN1                  1U
168
#define GPIOF_PIN2                  2U
169
#define GPIOF_PIN3                  3U
170
#define GPIOF_PIN4                  4U
171
#define GPIOF_PIN5                  5U
172
#define GPIOF_PIN6                  6U
173
#define GPIOF_PIN7                  7U
174
#define GPIOF_PIN8                  8U
175
#define GPIOF_PIN9                  9U
176
#define GPIOF_PIN10                 10U
177
#define GPIOF_PIN11                 11U
178
#define GPIOF_PIN12                 12U
179
#define GPIOF_PIN13                 13U
180
#define GPIOF_PIN14                 14U
181
#define GPIOF_PIN15                 15U
182
183
#define GPIOG_PIN0                  0U
184
#define GPIOG_PIN1                  1U
185
#define GPIOG_PIN2                  2U
186
#define GPIOG_PIN3                  3U
187
#define GPIOG_PIN4                  4U
188
#define GPIOG_PIN5                  5U
189
#define GPIOG_PIN6                  6U
190
#define GPIOG_PIN7                  7U
191
#define GPIOG_PIN8                  8U
192
#define GPIOG_PIN9                  9U
193
#define GPIOG_PIN10                 10U
194
#define GPIOG_PIN11                 11U
195
#define GPIOG_PIN12                 12U
196
#define GPIOG_PIN13                 13U
197
#define GPIOG_PIN14                 14U
198
#define GPIOG_PIN15                 15U
199
200
#define GPIOH_OSC_IN                0U
201
#define GPIOH_OSC_OUT               1U
202
#define GPIOH_PIN2                  2U
203
#define GPIOH_PIN3                  3U
204
#define GPIOH_PIN4                  4U
205
#define GPIOH_PIN5                  5U
206
#define GPIOH_PIN6                  6U
207
#define GPIOH_PIN7                  7U
208
#define GPIOH_PIN8                  8U
209
#define GPIOH_PIN9                  9U
210
#define GPIOH_PIN10                 10U
211
#define GPIOH_PIN11                 11U
212
#define GPIOH_PIN12                 12U
213
#define GPIOH_PIN13                 13U
214
#define GPIOH_PIN14                 14U
215
#define GPIOH_PIN15                 15U
216
217
/*
218
 * IO lines assignments.
219
 */
220 3106e8cc Thomas Schöpping
#define LINE_ARD_A0                 PAL_LINE(GPIOA, GPIOA_ARD_A0)
221