aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE')
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.c266
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.h1804
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.mk9
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.chcfg1449
-rw-r--r--lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.fmpp15
5 files changed, 3543 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.c b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.c
new file mode 100644
index 000000000..68e5c6b94
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.c
@@ -0,0 +1,266 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * This file has been automatically generated using ChibiStudio board
19 * generator plugin. Do not edit manually.
20 */
21
22#include "hal.h"
23#include "stm32_gpio.h"
24
25/*===========================================================================*/
26/* Driver local definitions. */
27/*===========================================================================*/
28
29/*===========================================================================*/
30/* Driver exported variables. */
31/*===========================================================================*/
32
33/*===========================================================================*/
34/* Driver local variables and types. */
35/*===========================================================================*/
36
37/**
38 * @brief Type of STM32 GPIO port setup.
39 */
40typedef struct {
41 uint32_t moder;
42 uint32_t otyper;
43 uint32_t ospeedr;
44 uint32_t pupdr;
45 uint32_t odr;
46 uint32_t afrl;
47 uint32_t afrh;
48} gpio_setup_t;
49
50/**
51 * @brief Type of STM32 GPIO initialization data.
52 */
53typedef struct {
54#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
55 gpio_setup_t PAData;
56#endif
57#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
58 gpio_setup_t PBData;
59#endif
60#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
61 gpio_setup_t PCData;
62#endif
63#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
64 gpio_setup_t PDData;
65#endif
66#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
67 gpio_setup_t PEData;
68#endif
69#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
70 gpio_setup_t PFData;
71#endif
72#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
73 gpio_setup_t PGData;
74#endif
75#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
76 gpio_setup_t PHData;
77#endif
78#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
79 gpio_setup_t PIData;
80#endif
81#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
82 gpio_setup_t PJData;
83#endif
84#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
85 gpio_setup_t PKData;
86#endif
87} gpio_config_t;
88
89/**
90 * @brief STM32 GPIO static initialization data.
91 */
92static const gpio_config_t gpio_default_config = {
93#if STM32_HAS_GPIOA
94 {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
95 VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
96#endif
97#if STM32_HAS_GPIOB
98 {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
99 VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
100#endif
101#if STM32_HAS_GPIOC
102 {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
103 VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
104#endif
105#if STM32_HAS_GPIOD
106 {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
107 VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
108#endif
109#if STM32_HAS_GPIOE
110 {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
111 VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
112#endif
113#if STM32_HAS_GPIOF
114 {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
115 VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
116#endif
117#if STM32_HAS_GPIOG
118 {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
119 VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
120#endif
121#if STM32_HAS_GPIOH
122 {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
123 VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
124#endif
125#if STM32_HAS_GPIOI
126 {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
127 VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
128#endif
129#if STM32_HAS_GPIOJ
130 {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
131 VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
132#endif
133#if STM32_HAS_GPIOK
134 {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
135 VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
136#endif
137};
138
139/*===========================================================================*/
140/* Driver local functions. */
141/*===========================================================================*/
142
143static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
144
145 gpiop->OTYPER = config->otyper;
146 gpiop->OSPEEDR = config->ospeedr;
147 gpiop->PUPDR = config->pupdr;
148 gpiop->ODR = config->odr;
149 gpiop->AFRL = config->afrl;
150 gpiop->AFRH = config->afrh;
151 gpiop->MODER = config->moder;
152}
153
154static void stm32_gpio_init(void) {
155
156 /* Enabling GPIO-related clocks, the mask comes from the
157 registry header file.*/
158 rccResetAHB(STM32_GPIO_EN_MASK);
159 rccEnableAHB(STM32_GPIO_EN_MASK, true);
160
161 /* Initializing all the defined GPIO ports.*/
162#if STM32_HAS_GPIOA
163 gpio_init(GPIOA, &gpio_default_config.PAData);
164#endif
165#if STM32_HAS_GPIOB
166 gpio_init(GPIOB, &gpio_default_config.PBData);
167#endif
168#if STM32_HAS_GPIOC
169 gpio_init(GPIOC, &gpio_default_config.PCData);
170#endif
171#if STM32_HAS_GPIOD
172 gpio_init(GPIOD, &gpio_default_config.PDData);
173#endif
174#if STM32_HAS_GPIOE
175 gpio_init(GPIOE, &gpio_default_config.PEData);
176#endif
177#if STM32_HAS_GPIOF
178 gpio_init(GPIOF, &gpio_default_config.PFData);
179#endif
180#if STM32_HAS_GPIOG
181 gpio_init(GPIOG, &gpio_default_config.PGData);
182#endif
183#if STM32_HAS_GPIOH
184 gpio_init(GPIOH, &gpio_default_config.PHData);
185#endif
186#if STM32_HAS_GPIOI
187 gpio_init(GPIOI, &gpio_default_config.PIData);
188#endif
189#if STM32_HAS_GPIOJ
190 gpio_init(GPIOJ, &gpio_default_config.PJData);
191#endif
192#if STM32_HAS_GPIOK
193 gpio_init(GPIOK, &gpio_default_config.PKData);
194#endif
195}
196
197/*===========================================================================*/
198/* Driver interrupt handlers. */
199/*===========================================================================*/
200
201/*===========================================================================*/
202/* Driver exported functions. */
203/*===========================================================================*/
204
205/**
206 * @brief Early initialization code.
207 * @details GPIO ports and system clocks are initialized before everything
208 * else.
209 */
210void __early_init(void) {
211
212 stm32_gpio_init();
213 stm32_clock_init();
214}
215
216#if HAL_USE_SDC || defined(__DOXYGEN__)
217/**
218 * @brief SDC card detection.
219 */
220bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
221
222 (void)sdcp;
223 /* CHTODO: Fill the implementation.*/
224 return true;
225}
226
227/**
228 * @brief SDC card write protection detection.
229 */
230bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
231
232 (void)sdcp;
233 /* CHTODO: Fill the implementation.*/
234 return false;
235}
236#endif /* HAL_USE_SDC */
237
238#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
239/**
240 * @brief MMC_SPI card detection.
241 */
242bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
243
244 (void)mmcp;
245 /* CHTODO: Fill the implementation.*/
246 return true;
247}
248
249/**
250 * @brief MMC_SPI card write protection detection.
251 */
252bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
253
254 (void)mmcp;
255 /* CHTODO: Fill the implementation.*/
256 return false;
257}
258#endif
259
260/**
261 * @brief Board-specific initialization code.
262 * @note You can add your board-specific code here.
263 */
264void boardInit(void) {
265
266}
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.h b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.h
new file mode 100644
index 000000000..4174dc9a9
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.h
@@ -0,0 +1,1804 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * This file has been automatically generated using ChibiStudio board
19 * generator plugin. Do not edit manually.
20 */
21
22#ifndef BOARD_H
23#define BOARD_H
24
25/*===========================================================================*/
26/* Driver constants. */
27/*===========================================================================*/
28
29/*
30 * Setup for STMicroelectronics STM32 Nucleo144-F303ZE board.
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_ST_NUCLEO144_F303ZE
37#define BOARD_NAME "STMicroelectronics STM32 Nucleo144-F303ZE"
38
39/*
40 * Board oscillators-related settings.
41 * NOTE: LSE not fitted.
42 */
43#if !defined(STM32_LSECLK)
44#define STM32_LSECLK 0U
45#endif
46
47#define STM32_LSEDRV (3U << 3U)
48
49#if !defined(STM32_HSECLK)
50#define STM32_HSECLK 8000000U
51#endif
52
53#define STM32_HSE_BYPASS
54
55/*
56 * MCU type as defined in the ST header.
57 */
58#define STM32F303xE
59
60/*
61 * IO pins assignments.
62 */
63#define GPIOA_ZIO_D32 0U
64#define GPIOA_TIM2_CH1 0U
65#define GPIOA_ZIO_D72 1U
66#define GPIOA_COMP1_IMP 1U
67#define GPIOA_PIN2 2U
68#define GPIOA_ARD_A0 3U
69#define GPIOA_ADC1_IN4 3U
70#define GPIOA_ZIO_D24 4U
71#define GPIOA_SPI3_NSS 4U
72#define GPIOA_ARD_D13 5U
73#define GPIOA_SPI1_SCK 5U
74#define GPIOA_ARD_D12 6U
75#define GPIOA_SPI1_MISO 6U
76#define GPIOA_ARD_D11 7U
77#define GPIOA_SPI1_MOSI 7U
78#define GPIOA_ZIO_D71 7U
79#define GPIOA_ZIO_D70 8U
80#define GPIOA_I2C2_SMBAL 8U
81#define GPIOA_ZIO_D69 9U
82#define GPIOA_I2C2_SCL 9U
83#define GPIOA_ZIO_D68 10U
84#define GPIOA_I2C2_SDA 10U
85#define GPIOA_USB_DM 11U
86#define GPIOA_USB_DP 12U
87#define GPIOA_SWDIO 13U
88#define GPIOA_SWCLK 14U
89#define GPIOA_ZIO_D20 15U
90#define GPIOA_I2S3_WS 15U
91
92#define GPIOB_ZIO_D33 0U
93#define GPIOB_TIM3_CH3 0U
94#define GPIOB_LED1 0U
95#define GPIOB_ZIO_A6 1U
96#define GPIOB_ADC3_IN1 1U
97#define GPIOB_ZIO_D27 2U
98#define GPIOB_ZIO_D23 3U
99#define GPIOB_I2S3_CK 3U
100#define GPIOB_ZIO_D25 4U
101#define GPIOB_SPI3_MISO 4U
102#define GPIOB_ZIO_D22 5U
103#define GPIOB_I2S3_SD 5U
104#define GPIOB_ZIO_D26 6U
105#define GPIOB_LED2 7U
106#define GPIOB_ARD_D15 8U
107#define GPIOB_I2C1_SCL 8U
108#define GPIOB_ARD_D14 9U
109#define GPIOB_I2C1_SDA 9U
110#define GPIOB_ZIO_D36 10U
111#define GPIOB_TIM2_CH3 10U
112#define GPIOB_ZIO_D35 11U
113#define GPIOB_TIM2_CH4 11U
114#define GPIOB_ZIO_D19 12U
115#define GPIOB_I2S2_WS 12U
116#define GPIOB_ZIO_D18 13U
117#define GPIOB_I2S2_CK 13U
118#define GPIOB_LED3 14U
119#define GPIOB_ZIO_D17 15U
120#define GPIOB_I2S2_SD 15U
121
122#define GPIOC_ARD_A1 0U
123#define GPIOC_ADC12_IN6 0U
124#define GPIOC_PIN1 1U
125#define GPIOC_ZIO_A7 2U
126#define GPIOC_ADC12_IN8 2U
127#define GPIOC_ARD_A2 3U
128#define GPIOC_ADC12_IN9 3U
129#define GPIOC_ARD_D1 4U
130#define GPIOC_USART1_TX 4U
131#define GPIOC_ARD_D0 5U
132#define GPIOC_USART1_RX 5U
133#define GPIOC_ZIO_D16 6U
134#define GPIOC_I2S2_MCK 6U
135#define GPIOC_ZIO_D21 7U
136#define GPIOC_I2S3_MCK 7U
137#define GPIOC_ZIO_D43 8U
138#define GPIOC_ZIO_D44 9U
139#define GPIOC_I2S_CKIN 9U
140#define GPIOC_ZIO_D45 10U
141#define GPIOC_ZIO_D46 11U
142#define GPIOC_ZIO_D47 12U
143#define GPIOC_BUTTON 13U
144#define GPIOC_OSC32_IN 14U
145#define GPIOC_OSC32_OUT 15U
146
147#define GPIOD_ZIO_D67 0U
148#define GPIOD_CAN1_RX 0U
149#define GPIOD_ZIO_D66 1U
150#define GPIOD_CAN1_TX 1U
151#define GPIOD_ZIO_D48 2U
152#define GPIOD_ZIO_D55 3U
153#define GPIOD_USART2_CTS 3U
154#define GPIOD_ZIO_D54 4U
155#define GPIOD_USART2_RTS 4U
156#define GPIOD_ZIO_D53 5U
157#define GPIOD_USART2_TX 5U
158#define GPIOD_ZIO_D52 6U
159#define GPIOD_USART2_RX 6U
160#define GPIOD_ZIO_D51 7U
161#define GPIOD_USART2_SCLK 7U
162#define GPIOD_USART3_RX 8U
163#define GPIOD_STLK_RX 8U
164#define GPIOD_USART3_TX 9U
165#define GPIOD_STLK_TX 9U
166#define GPIOD_PIN10 10U
167#define GPIOD_ARD_A3 11U
168#define GPIOD_ADC34_IN8 11U
169#define GPIOD_ARD_A4 12U
170#define GPIOD_ADC34_IN9 12U
171#define GPIOD_ARD_A5 13U
172#define GPIOD_ADC3_IN8 13U
173#define GPIOD_ARD_D10 14U
174#define GPIOD_SPI1_NSS 14U
175#define GPIOD_ARD_D9 15U
176#define GPIOD_TIM4_CH4 15U
177
178#define GPIOE_ZIO_D34 0U
179#define GPIOE_TIM4_ETR 0U
180#define GPIOE_PIN1 1U
181#define GPIOE_ZIO_D31 2U
182#define GPIOE_ZIO_D56 2U
183#define GPIOE_ZIO_D60 3U
184#define GPIOE_ZIO_D57 4U
185#define GPIOE_ZIO_D58 5U
186#define GPIOE_ZIO_D59 6U
187#define GPIOE_ZIO_D41 7U
188#define GPIOE_TIM1_ETR 7U
189#define GPIOE_ZIO_D42 8U
190#define GPIOE_TIM1_CH1N 8U
191#define GPIOE_ARD_D6 9U
192#define GPIOE_TIM1_CH1 9U
193#define GPIOE_ZIO_D40 10U
194#define GPIOE_TIM1_CH2N 10U
195#define GPIOE_ARD_D5 11U
196#define GPIOE_TIM1_CH2 11U
197#define GPIOE_ZIO_D39 12U
198#define GPIOE_TIM1_CH3N 12U
199#define GPIOE_ARD_D3 13U
200#define GPIOE_TIM1_CH3 13U
201#define GPIOE_ZIO_D38 14U
202#define GPIOE_ZIO_D37 15U
203#define GPIOE_TIM1_BKIN1 15U
204
205#define GPIOF_PIN0 0U
206#define GPIOF_PIN1 1U
207#define GPIOF_PIN2 2U
208#define GPIOF_ZIO_D30 3U
209#define GPIOF_ZIO_A8 4U
210#define GPIOF_ADC3_IN14 4U
211#define GPIOF_ZIO_D29 5U
212#define GPIOF_PIN6 6U
213#define GPIOF_ZIO_D62 7U
214#define GPIOF_ZIO_D61 8U
215#define GPIOF_ZIO_D63 9U
216#define GPIOF_ZIO_D28 10U
217#define GPIOF_PIN11 11U
218#define GPIOF_ARD_D8 12U
219#define GPIOF_ARD_D7 13U
220#define GPIOF_ARD_D4 14U
221#define GPIOF_ARD_D2 15U
222
223#define GPIOG_ZIO_D65 0U
224#define GPIOG_ZIO_D64 1U
225#define GPIOG_ZIO_D49 2U
226#define GPIOG_ZIO_D50 3U
227#define GPIOG_PIN4 4U
228#define GPIOG_PIN5 5U
229#define GPIOG_USB_GPIO_OUT 6U
230#define GPIOG_USB_GPIO_IN 7U
231#define GPIOG_PIN8 8U
232#define GPIOG_PIN9 9U
233#define GPIOG_PIN10 10U
234#define GPIOG_PIN11 11U
235#define GPIOG_PIN12 12U
236#define GPIOG_PIN13 13U
237#define GPIOG_PIN14 14U
238#define GPIOG_PIN15 15U
239
240#define GPIOH_OSC_IN 0U
241#define GPIOH_OSC_OUT 1U
242#define GPIOH_PIN2 2U
243#define GPIOH_PIN3 3U
244#define GPIOH_PIN4 4U
245#define GPIOH_PIN5 5U
246#define GPIOH_PIN6 6U
247#define GPIOH_PIN7 7U
248#define GPIOH_PIN8 8U
249#define GPIOH_PIN9 9U
250#define GPIOH_PIN10 10U
251#define GPIOH_PIN11 11U
252#define GPIOH_PIN12 12U
253#define GPIOH_PIN13 13U
254#define GPIOH_PIN14 14U
255#define GPIOH_PIN15 15U
256
257#define GPIOI_PIN0 0U
258#define GPIOI_PIN1 1U
259#define GPIOI_PIN2 2U
260#define GPIOI_PIN3 3U
261#define GPIOI_PIN4 4U
262#define GPIOI_PIN5 5U
263#define GPIOI_PIN6 6U
264#define GPIOI_PIN7 7U
265#define GPIOI_PIN8 8U
266#define GPIOI_PIN9 9U
267#define GPIOI_PIN10 10U
268#define GPIOI_PIN11 11U
269#define GPIOI_PIN12 12U
270#define GPIOI_PIN13 13U
271#define GPIOI_PIN14 14U
272#define GPIOI_PIN15 15U
273
274#define GPIOJ_PIN0 0U
275#define GPIOJ_PIN1 1U
276#define GPIOJ_PIN2 2U
277#define GPIOJ_PIN3 3U
278#define GPIOJ_PIN4 4U
279#define GPIOJ_PIN5 5U
280#define GPIOJ_PIN6 6U
281#define GPIOJ_PIN7 7U
282#define GPIOJ_PIN8 8U
283#define GPIOJ_PIN9 9U
284#define GPIOJ_PIN10 10U
285#define GPIOJ_PIN11 11U
286#define GPIOJ_PIN12 12U
287#define GPIOJ_PIN13 13U
288#define GPIOJ_PIN14 14U
289#define GPIOJ_PIN15 15U
290
291#define GPIOK_PIN0 0U
292#define GPIOK_PIN1 1U
293#define GPIOK_PIN2 2U
294#define GPIOK_PIN3 3U
295#define GPIOK_PIN4 4U
296#define GPIOK_PIN5 5U
297#define GPIOK_PIN6 6U
298#define GPIOK_PIN7 7U
299#define GPIOK_PIN8 8U
300#define GPIOK_PIN9 9U
301#define GPIOK_PIN10 10U
302#define GPIOK_PIN11 11U
303#define GPIOK_PIN12 12U
304#define GPIOK_PIN13 13U
305#define GPIOK_PIN14 14U
306#define GPIOK_PIN15 15U
307
308/*
309 * IO lines assignments.
310 */
311#define LINE_ZIO_D32 PAL_LINE(GPIOA, 0U)
312#define LINE_TIM2_CH1 PAL_LINE(GPIOA, 0U)
313#define LINE_ZIO_D72 PAL_LINE(GPIOA, 1U)
314#define LINE_COMP1_IMP PAL_LINE(GPIOA, 1U)
315#define LINE_ARD_A0 PAL_LINE(GPIOA, 3U)
316#define LINE_ADC1_IN4 PAL_LINE(GPIOA, 3U)
317#define LINE_ZIO_D24 PAL_LINE(GPIOA, 4U)
318#define LINE_SPI3_NSS PAL_LINE(GPIOA, 4U)
319#define LINE_ARD_D13 PAL_LINE(GPIOA, 5U)
320#define LINE_SPI1_SCK PAL_LINE(GPIOA, 5U)
321#define LINE_ARD_D12 PAL_LINE(GPIOA, 6U)
322#define LINE_SPI1_MISO PAL_LINE(GPIOA, 6U)
323#define LINE_ARD_D11 PAL_LINE(GPIOA, 7U)
324#define LINE_SPI1_MOSI PAL_LINE(GPIOA, 7U)
325#define LINE_ZIO_D71 PAL_LINE(GPIOA, 7U)
326#define LINE_ZIO_D70 PAL_LINE(GPIOA, 8U)
327#define LINE_I2C2_SMBAL PAL_LINE(GPIOA, 8U)
328#define LINE_ZIO_D69 PAL_LINE(GPIOA, 9U)
329#define LINE_I2C2_SCL PAL_LINE(GPIOA, 9U)
330#define LINE_ZIO_D68 PAL_LINE(GPIOA, 10U)
331#define LINE_I2C2_SDA PAL_LINE(GPIOA, 10U)
332#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
333#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
334#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
335#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
336#define LINE_ZIO_D20 PAL_LINE(GPIOA, 15U)
337#define LINE_I2S3_WS PAL_LINE(GPIOA, 15U)
338#define LINE_ZIO_D33 PAL_LINE(GPIOB, 0U)
339#define LINE_TIM3_CH3 PAL_LINE(GPIOB, 0U)
340#define LINE_LED1 PAL_LINE(GPIOB, 0U)
341#define LINE_ZIO_A6 PAL_LINE(GPIOB, 1U)
342#define LINE_ADC3_IN1 PAL_LINE(GPIOB, 1U)
343#define LINE_ZIO_D27 PAL_LINE(GPIOB, 2U)
344#define LINE_ZIO_D23 PAL_LINE(GPIOB, 3U)
345#define LINE_I2S3_CK PAL_LINE(GPIOB, 3U)
346#define LINE_ZIO_D25 PAL_LINE(GPIOB, 4U)
347#define LINE_SPI3_MISO PAL_LINE(GPIOB, 4U)
348#define LINE_ZIO_D22 PAL_LINE(GPIOB, 5U)
349#define LINE_I2S3_SD PAL_LINE(GPIOB, 5U)
350#define LINE_ZIO_D26 PAL_LINE(GPIOB, 6U)
351#define LINE_LED2 PAL_LINE(GPIOB, 7U)
352#define LINE_ARD_D15 PAL_LINE(GPIOB, 8U)
353#define LINE_I2C1_SCL PAL_LINE(GPIOB, 8U)
354#define LINE_ARD_D14 PAL_LINE(GPIOB, 9U)
355#define LINE_I2C1_SDA PAL_LINE(GPIOB, 9U)
356#define LINE_ZIO_D36 PAL_LINE(GPIOB, 10U)
357#define LINE_TIM2_CH3 PAL_LINE(GPIOB, 10U)
358#define LINE_ZIO_D35 PAL_LINE(GPIOB, 11U)
359#define LINE_TIM2_CH4 PAL_LINE(GPIOB, 11U)
360#define LINE_ZIO_D19 PAL_LINE(GPIOB, 12U)
361#define LINE_I2S2_WS PAL_LINE(GPIOB, 12U)
362#define LINE_ZIO_D18 PAL_LINE(GPIOB, 13U)
363#define LINE_I2S2_CK PAL_LINE(GPIOB, 13U)
364#define LINE_LED3 PAL_LINE(GPIOB, 14U)
365#define LINE_ZIO_D17 PAL_LINE(GPIOB, 15U)
366#define LINE_I2S2_SD PAL_LINE(GPIOB, 15U)
367#define LINE_ARD_A1 PAL_LINE(GPIOC, 0U)
368#define LINE_ADC12_IN6 PAL_LINE(GPIOC, 0U)
369#define LINE_ZIO_A7 PAL_LINE(GPIOC, 2U)
370#define LINE_ADC12_IN8 PAL_LINE(GPIOC, 2U)
371#define LINE_ARD_A2 PAL_LINE(GPIOC, 3U)
372#define LINE_ADC12_IN9 PAL_LINE(GPIOC, 3U)
373#define LINE_ARD_D1 PAL_LINE(GPIOC, 4U)
374#define LINE_USART1_TX PAL_LINE(GPIOC, 4U)
375#define LINE_ARD_D0 PAL_LINE(GPIOC, 5U)
376#define LINE_USART1_RX PAL_LINE(GPIOC, 5U)
377#define LINE_ZIO_D16 PAL_LINE(GPIOC, 6U)
378#define LINE_I2S2_MCK PAL_LINE(GPIOC, 6U)
379#define LINE_ZIO_D21 PAL_LINE(GPIOC, 7U)
380#define LINE_I2S3_MCK PAL_LINE(GPIOC, 7U)
381#define LINE_ZIO_D43 PAL_LINE(GPIOC, 8U)
382#define LINE_ZIO_D44 PAL_LINE(GPIOC, 9U)
383#define LINE_I2S_CKIN PAL_LINE(GPIOC, 9U)
384#define LINE_ZIO_D45 PAL_LINE(GPIOC, 10U)
385#define LINE_ZIO_D46 PAL_LINE(GPIOC, 11U)
386#define LINE_ZIO_D47 PAL_LINE(GPIOC, 12U)
387#define LINE_BUTTON PAL_LINE(GPIOC, 13U)
388#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
389#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
390#define LINE_ZIO_D67 PAL_LINE(GPIOD, 0U)
391#define LINE_CAN1_RX PAL_LINE(GPIOD, 0U)
392#define LINE_ZIO_D66 PAL_LINE(GPIOD, 1U)
393#define LINE_CAN1_TX PAL_LINE(GPIOD, 1U)
394#define LINE_ZIO_D48 PAL_LINE(GPIOD, 2U)
395#define LINE_ZIO_D55 PAL_LINE(GPIOD, 3U)
396#define LINE_USART2_CTS PAL_LINE(GPIOD, 3U)
397#define LINE_ZIO_D54 PAL_LINE(GPIOD, 4U)
398#define LINE_USART2_RTS PAL_LINE(GPIOD, 4U)
399#define LINE_ZIO_D53 PAL_LINE(GPIOD, 5U)
400#define LINE_USART2_TX PAL_LINE(GPIOD, 5U)
401#define LINE_ZIO_D52 PAL_LINE(GPIOD, 6U)
402#define LINE_USART2_RX PAL_LINE(GPIOD, 6U)
403#define LINE_ZIO_D51 PAL_LINE(GPIOD, 7U)
404#define LINE_USART2_SCLK PAL_LINE(GPIOD, 7U)
405#define LINE_USART3_RX PAL_LINE(GPIOD, 8U)
406#define LINE_STLK_RX PAL_LINE(GPIOD, 8U)
407#define LINE_USART3_TX PAL_LINE(GPIOD, 9U)
408#define LINE_STLK_TX PAL_LINE(GPIOD, 9U)
409#define LINE_ARD_A3 PAL_LINE(GPIOD, 11U)
410#define LINE_ADC34_IN8 PAL_LINE(GPIOD, 11U)
411#define LINE_ARD_A4 PAL_LINE(GPIOD, 12U)
412#define LINE_ADC34_IN9 PAL_LINE(GPIOD, 12U)
413#define LINE_ARD_A5 PAL_LINE(GPIOD, 13U)
414#define LINE_ADC3_IN8 PAL_LINE(GPIOD, 13U)
415#define LINE_ARD_D10 PAL_LINE(GPIOD, 14U)
416#define LINE_SPI1_NSS PAL_LINE(GPIOD, 14U)
417#define LINE_ARD_D9 PAL_LINE(GPIOD, 15U)
418#define LINE_TIM4_CH4 PAL_LINE(GPIOD, 15U)
419#define LINE_ZIO_D34 PAL_LINE(GPIOE, 0U)
420#define LINE_TIM4_ETR PAL_LINE(GPIOE, 0U)
421#define LINE_ZIO_D31 PAL_LINE(GPIOE, 2U)
422#define LINE_ZIO_D56 PAL_LINE(GPIOE, 2U)
423#define LINE_ZIO_D60 PAL_LINE(GPIOE, 3U)
424#define LINE_ZIO_D57 PAL_LINE(GPIOE, 4U)
425#define LINE_ZIO_D58 PAL_LINE(GPIOE, 5U)
426#define LINE_ZIO_D59 PAL_LINE(GPIOE, 6U)
427#define LINE_ZIO_D41 PAL_LINE(GPIOE, 7U)
428#define LINE_TIM1_ETR PAL_LINE(GPIOE, 7U)
429#define LINE_ZIO_D42 PAL_LINE(GPIOE, 8U)
430#define LINE_TIM1_CH1N PAL_LINE(GPIOE, 8U)
431#define LINE_ARD_D6 PAL_LINE(GPIOE, 9U)
432#define LINE_TIM1_CH1 PAL_LINE(GPIOE, 9U)
433#define LINE_ZIO_D40 PAL_LINE(GPIOE, 10U)
434#define LINE_TIM1_CH2N PAL_LINE(GPIOE, 10U)
435#define LINE_ARD_D5 PAL_LINE(GPIOE, 11U)
436#define LINE_TIM1_CH2 PAL_LINE(GPIOE, 11U)
437#define LINE_ZIO_D39 PAL_LINE(GPIOE, 12U)
438#define LINE_TIM1_CH3N PAL_LINE(GPIOE, 12U)
439#define LINE_ARD_D3 PAL_LINE(GPIOE, 13U)
440#define LINE_TIM1_CH3 PAL_LINE(GPIOE, 13U)
441#define LINE_ZIO_D38 PAL_LINE(GPIOE, 14U)
442#define LINE_ZIO_D37 PAL_LINE(GPIOE, 15U)
443#define LINE_TIM1_BKIN1 PAL_LINE(GPIOE, 15U)
444#define LINE_ZIO_D30 PAL_LINE(GPIOF, 3U)
445#define LINE_ZIO_A8 PAL_LINE(GPIOF, 4U)
446#define LINE_ADC3_IN14 PAL_LINE(GPIOF, 4U)
447#define LINE_ZIO_D29 PAL_LINE(GPIOF, 5U)
448#define LINE_ZIO_D62 PAL_LINE(GPIOF, 7U)
449#define LINE_ZIO_D61 PAL_LINE(GPIOF, 8U)
450#define LINE_ZIO_D63 PAL_LINE(GPIOF, 9U)
451#define LINE_ZIO_D28 PAL_LINE(GPIOF, 10U)
452#define LINE_ARD_D8 PAL_LINE(GPIOF, 12U)
453#define LINE_ARD_D7 PAL_LINE(GPIOF, 13U)
454#define LINE_ARD_D4 PAL_LINE(GPIOF, 14U)
455#define LINE_ARD_D2 PAL_LINE(GPIOF, 15U)
456#define LINE_ZIO_D65 PAL_LINE(GPIOG, 0U)
457#define LINE_ZIO_D64 PAL_LINE(GPIOG, 1U)
458#define LINE_ZIO_D49 PAL_LINE(GPIOG, 2U)
459#define LINE_ZIO_D50 PAL_LINE(GPIOG, 3U)
460#define LINE_USB_GPIO_OUT PAL_LINE(GPIOG, 6U)
461#define LINE_USB_GPIO_IN PAL_LINE(GPIOG, 7U)
462#define LINE_OSC_IN PAL_LINE(GPIOH, 0U)
463#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U)
464
465/*===========================================================================*/
466/* Driver pre-compile time settings. */
467/*===========================================================================*/
468
469/*===========================================================================*/
470/* Derived constants and error checks. */
471/*===========================================================================*/
472
473/*===========================================================================*/
474/* Driver data structures and types. */
475/*===========================================================================*/
476
477/*===========================================================================*/
478/* Driver macros. */
479/*===========================================================================*/
480
481/*
482 * I/O ports initial setup, this configuration is established soon after reset
483 * in the initialization code.
484 * Please refer to the STM32 Reference Manual for details.
485 */
486#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
487#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
488#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
489#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
490#define PIN_ODR_LOW(n) (0U << (n))
491#define PIN_ODR_HIGH(n) (1U << (n))
492#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
493#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
494#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
495#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
496#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
497#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
498#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
499#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
500#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
501#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
502
503/*
504 * GPIOA setup:
505 *
506 * PA0 - ZIO_D32 TIM2_CH1 (input pullup).
507 * PA1 - ZIO_D72 COMP1_IMP (input pullup).
508 * PA2 - PIN2 (input pullup).
509 * PA3 - ARD_A0 ADC1_IN4 (input pullup).
510 * PA4 - ZIO_D24 SPI3_NSS (input pullup).
511 * PA5 - ARD_D13 SPI1_SCK (input pullup).
512 * PA6 - ARD_D12 SPI1_MISO (input pullup).
513 * PA7 - ARD_D11 SPI1_MOSI ZIO_D71 (input pullup).
514 * PA8 - ZIO_D70 I2C2_SMBAL (input pullup).
515 * PA9 - ZIO_D69 I2C2_SCL (input pullup).
516 * PA10 - ZIO_D68 I2C2_SDA (input pullup).
517 * PA11 - USB_DM (alternate 14).
518 * PA12 - USB_DP (alternate 14).
519 * PA13 - SWDIO (alternate 0).
520 * PA14 - SWCLK (alternate 0).
521 * PA15 - ZIO_D20 I2S3_WS (input pullup).
522 */
523#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ZIO_D32) | \
524 PIN_MODE_INPUT(GPIOA_ZIO_D72) | \
525 PIN_MODE_INPUT(GPIOA_PIN2) | \
526 PIN_MODE_INPUT(GPIOA_ARD_A0) | \
527 PIN_MODE_INPUT(GPIOA_ZIO_D24) | \
528 PIN_MODE_INPUT(GPIOA_ARD_D13) | \
529 PIN_MODE_INPUT(GPIOA_ARD_D12) | \
530 PIN_MODE_INPUT(GPIOA_ARD_D11) | \
531 PIN_MODE_INPUT(GPIOA_ZIO_D70) | \
532 PIN_MODE_INPUT(GPIOA_ZIO_D69) | \
533 PIN_MODE_INPUT(GPIOA_ZIO_D68) | \
534 PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \
535 PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \
536 PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
537 PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
538 PIN_MODE_INPUT(GPIOA_ZIO_D20))
539#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D32) | \
540 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D72) | \
541 PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
542 PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \
543 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D24) | \
544 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D13) | \
545 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | \
546 PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | \
547 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D70) | \
548 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D69) | \
549 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D68) | \
550 PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
551 PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
552 PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
553 PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
554 PIN_OTYPE_PUSHPULL(GPIOA_ZIO_D20))
555#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ZIO_D32) | \
556 PIN_OSPEED_HIGH(GPIOA_ZIO_D72) | \
557 PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
558 PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \
559 PIN_OSPEED_HIGH(GPIOA_ZIO_D24) | \
560 PIN_OSPEED_HIGH(GPIOA_ARD_D13) | \
561 PIN_OSPEED_HIGH(GPIOA_ARD_D12) | \
562 PIN_OSPEED_HIGH(GPIOA_ARD_D11) | \
563 PIN_OSPEED_HIGH(GPIOA_ZIO_D70) | \
564 PIN_OSPEED_HIGH(GPIOA_ZIO_D69) | \
565 PIN_OSPEED_HIGH(GPIOA_ZIO_D68) | \
566 PIN_OSPEED_HIGH(GPIOA_USB_DM) | \
567 PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
568 PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
569 PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
570 PIN_OSPEED_HIGH(GPIOA_ZIO_D20))
571#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ZIO_D32) | \
572 PIN_PUPDR_PULLUP(GPIOA_ZIO_D72) | \
573 PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
574 PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | \
575 PIN_PUPDR_PULLUP(GPIOA_ZIO_D24) | \
576 PIN_PUPDR_PULLUP(GPIOA_ARD_D13) | \
577 PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | \
578 PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | \
579 PIN_PUPDR_PULLUP(GPIOA_ZIO_D70) | \
580 PIN_PUPDR_PULLUP(GPIOA_ZIO_D69) | \
581 PIN_PUPDR_PULLUP(GPIOA_ZIO_D68) | \
582 PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
583 PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
584 PIN_PUPDR_FLOATING(GPIOA_SWDIO) | \
585 PIN_PUPDR_FLOATING(GPIOA_SWCLK) | \
586 PIN_PUPDR_PULLUP(GPIOA_ZIO_D20))
587#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ZIO_D32) | \
588 PIN_ODR_HIGH(GPIOA_ZIO_D72) | \
589 PIN_ODR_HIGH(GPIOA_PIN2) | \
590 PIN_ODR_HIGH(GPIOA_ARD_A0) | \
591 PIN_ODR_HIGH(GPIOA_ZIO_D24) | \
592 PIN_ODR_HIGH(GPIOA_ARD_D13) | \
593 PIN_ODR_HIGH(GPIOA_ARD_D12) | \
594 PIN_ODR_HIGH(GPIOA_ARD_D11) | \
595 PIN_ODR_HIGH(GPIOA_ZIO_D70) | \
596 PIN_ODR_HIGH(GPIOA_ZIO_D69) | \
597 PIN_ODR_HIGH(GPIOA_ZIO_D68) | \
598 PIN_ODR_HIGH(GPIOA_USB_DM) | \
599 PIN_ODR_HIGH(GPIOA_USB_DP) | \
600 PIN_ODR_HIGH(GPIOA_SWDIO) | \
601 PIN_ODR_HIGH(GPIOA_SWCLK) | \
602 PIN_ODR_HIGH(GPIOA_ZIO_D20))
603#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ZIO_D32, 0U) | \
604 PIN_AFIO_AF(GPIOA_ZIO_D72, 0U) | \
605 PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
606 PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \
607 PIN_AFIO_AF(GPIOA_ZIO_D24, 0U) | \
608 PIN_AFIO_AF(GPIOA_ARD_D13, 0U) | \
609 PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | \
610 PIN_AFIO_AF(GPIOA_ARD_D11, 0U))
611#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ZIO_D70, 0U) | \
612 PIN_AFIO_AF(GPIOA_ZIO_D69, 0U) | \
613 PIN_AFIO_AF(GPIOA_ZIO_D68, 0U) | \
614 PIN_AFIO_AF(GPIOA_USB_DM, 14U) | \
615 PIN_AFIO_AF(GPIOA_USB_DP, 14U) | \
616 PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
617 PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
618 PIN_AFIO_AF(GPIOA_ZIO_D20, 0U))
619
620/*
621 * GPIOB setup:
622 *
623 * PB0 - ZIO_D33 TIM3_CH3 LED1 (output pushpull maximum).
624 * PB1 - ZIO_A6 ADC3_IN1 (input pullup).
625 * PB2 - ZIO_D27 (input pullup).
626 * PB3 - ZIO_D23 I2S3_CK (input pullup).
627 * PB4 - ZIO_D25 SPI3_MISO (input pullup).
628 * PB5 - ZIO_D22 I2S3_SD (input pullup).
629 * PB6 - ZIO_D26 (input pullup).
630 * PB7 - LED2 (output pushpull maximum).
631 * PB8 - ARD_D15 I2C1_SCL (input pullup).
632 * PB9 - ARD_D14 I2C1_SDA (input pullup).
633 * PB10 - ZIO_D36 TIM2_CH3 (input pullup).
634 * PB11 - ZIO_D35 TIM2_CH4 (input pullup).
635 * PB12 - ZIO_D19 I2S2_WS (input pullup).
636 * PB13 - ZIO_D18 I2S2_CK (input pullup).
637 * PB14 - LED3 (output pushpull maximum).
638 * PB15 - ZIO_D17 I2S2_SD (input pullup).
639 */
640#define VAL_GPIOB_MODER (PIN_MODE_OUTPUT(GPIOB_ZIO_D33) | \
641 PIN_MODE_INPUT(GPIOB_ZIO_A6) | \
642 PIN_MODE_INPUT(GPIOB_ZIO_D27) | \
643 PIN_MODE_INPUT(GPIOB_ZIO_D23) | \
644 PIN_MODE_INPUT(GPIOB_ZIO_D25) | \
645 PIN_MODE_INPUT(GPIOB_ZIO_D22) | \
646 PIN_MODE_INPUT(GPIOB_ZIO_D26) | \
647 PIN_MODE_OUTPUT(GPIOB_LED2) | \
648 PIN_MODE_INPUT(GPIOB_ARD_D15) | \
649 PIN_MODE_INPUT(GPIOB_ARD_D14) | \
650 PIN_MODE_INPUT(GPIOB_ZIO_D36) | \
651 PIN_MODE_INPUT(GPIOB_ZIO_D35) | \
652 PIN_MODE_INPUT(GPIOB_ZIO_D19) | \
653 PIN_MODE_INPUT(GPIOB_ZIO_D18) | \
654 PIN_MODE_OUTPUT(GPIOB_LED3) | \
655 PIN_MODE_INPUT(GPIOB_ZIO_D17))
656#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D33) | \
657 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_A6) | \
658 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D27) | \
659 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D23) | \
660 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D25) | \
661 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D22) | \
662 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D26) | \
663 PIN_OTYPE_PUSHPULL(GPIOB_LED2) | \
664 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | \
665 PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | \
666 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D36) | \
667 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D35) | \
668 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D19) | \
669 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D18) | \
670 PIN_OTYPE_PUSHPULL(GPIOB_LED3) | \
671 PIN_OTYPE_PUSHPULL(GPIOB_ZIO_D17))
672#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ZIO_D33) | \
673 PIN_OSPEED_HIGH(GPIOB_ZIO_A6) | \
674 PIN_OSPEED_VERYLOW(GPIOB_ZIO_D27) | \
675 PIN_OSPEED_HIGH(GPIOB_ZIO_D23) | \
676 PIN_OSPEED_HIGH(GPIOB_ZIO_D25) | \
677 PIN_OSPEED_HIGH(GPIOB_ZIO_D22) | \
678 PIN_OSPEED_VERYLOW(GPIOB_ZIO_D26) | \
679 PIN_OSPEED_HIGH(GPIOB_LED2) | \
680 PIN_OSPEED_HIGH(GPIOB_ARD_D15) | \
681 PIN_OSPEED_HIGH(GPIOB_ARD_D14) | \
682 PIN_OSPEED_HIGH(GPIOB_ZIO_D36) | \
683 PIN_OSPEED_HIGH(GPIOB_ZIO_D35) | \
684 PIN_OSPEED_HIGH(GPIOB_ZIO_D19) | \
685 PIN_OSPEED_HIGH(GPIOB_ZIO_D18) | \
686 PIN_OSPEED_HIGH(GPIOB_LED3) | \
687 PIN_OSPEED_HIGH(GPIOB_ZIO_D17))
688#define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(GPIOB_ZIO_D33) | \
689 PIN_PUPDR_PULLUP(GPIOB_ZIO_A6) | \
690 PIN_PUPDR_PULLUP(GPIOB_ZIO_D27) | \
691 PIN_PUPDR_PULLUP(GPIOB_ZIO_D23) | \
692 PIN_PUPDR_PULLUP(GPIOB_ZIO_D25) | \
693 PIN_PUPDR_PULLUP(GPIOB_ZIO_D22) | \
694 PIN_PUPDR_PULLUP(GPIOB_ZIO_D26) | \
695 PIN_PUPDR_FLOATING(GPIOB_LED2) | \
696 PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | \
697 PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | \
698 PIN_PUPDR_PULLUP(GPIOB_ZIO_D36) | \
699 PIN_PUPDR_PULLUP(GPIOB_ZIO_D35) | \
700 PIN_PUPDR_PULLUP(GPIOB_ZIO_D19) | \
701 PIN_PUPDR_PULLUP(GPIOB_ZIO_D18) | \
702 PIN_PUPDR_FLOATING(GPIOB_LED3) | \
703 PIN_PUPDR_PULLUP(GPIOB_ZIO_D17))
704#define VAL_GPIOB_ODR (PIN_ODR_LOW(GPIOB_ZIO_D33) | \
705 PIN_ODR_HIGH(GPIOB_ZIO_A6) | \
706 PIN_ODR_HIGH(GPIOB_ZIO_D27) | \
707 PIN_ODR_HIGH(GPIOB_ZIO_D23) | \
708 PIN_ODR_HIGH(GPIOB_ZIO_D25) | \
709 PIN_ODR_HIGH(GPIOB_ZIO_D22) | \
710 PIN_ODR_HIGH(GPIOB_ZIO_D26) | \
711 PIN_ODR_LOW(GPIOB_LED2) | \
712 PIN_ODR_HIGH(GPIOB_ARD_D15) | \
713 PIN_ODR_HIGH(GPIOB_ARD_D14) | \
714 PIN_ODR_HIGH(GPIOB_ZIO_D36) | \
715 PIN_ODR_HIGH(GPIOB_ZIO_D35) | \
716 PIN_ODR_HIGH(GPIOB_ZIO_D19) | \
717 PIN_ODR_HIGH(GPIOB_ZIO_D18) | \
718 PIN_ODR_LOW(GPIOB_LED3) | \
719 PIN_ODR_HIGH(GPIOB_ZIO_D17))
720#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ZIO_D33, 0U) | \
721 PIN_AFIO_AF(GPIOB_ZIO_A6, 0U) | \
722 PIN_AFIO_AF(GPIOB_ZIO_D27, 0U) | \
723 PIN_AFIO_AF(GPIOB_ZIO_D23, 0U) | \
724 PIN_AFIO_AF(GPIOB_ZIO_D25, 0U) | \
725 PIN_AFIO_AF(GPIOB_ZIO_D22, 0U) | \
726 PIN_AFIO_AF(GPIOB_ZIO_D26, 0U) | \
727 PIN_AFIO_AF(GPIOB_LED2, 0U))
728#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | \
729 PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | \
730 PIN_AFIO_AF(GPIOB_ZIO_D36, 0U) | \
731 PIN_AFIO_AF(GPIOB_ZIO_D35, 0U) | \
732 PIN_AFIO_AF(GPIOB_ZIO_D19, 0U) | \
733 PIN_AFIO_AF(GPIOB_ZIO_D18, 0U) | \
734 PIN_AFIO_AF(GPIOB_LED3, 0U) | \
735 PIN_AFIO_AF(GPIOB_ZIO_D17, 0U))
736
737/*
738 * GPIOC setup:
739 *
740 * PC0 - ARD_A1 ADC12_IN6 (input pullup).
741 * PC1 - PIN1 (input pullup).
742 * PC2 - ZIO_A7 ADC12_IN8 (input pullup).
743 * PC3 - ARD_A2 ADC12_IN9 (input pullup).
744 * PC4 - ARD_D1 USART1_TX (input pullup).
745 * PC5 - ARD_D0 USART1_RX (input pullup).
746 * PC6 - ZIO_D16 I2S2_MCK (input pullup).
747 * PC7 - ZIO_D21 I2S3_MCK (input pullup).
748 * PC8 - ZIO_D43 (input pullup).
749 * PC9 - ZIO_D44 I2S_CKIN (input pullup).
750 * PC10 - ZIO_D45 (input pullup).
751 * PC11 - ZIO_D46 (input pullup).
752 * PC12 - ZIO_D47 (input pullup).
753 * PC13 - BUTTON (input floating).
754 * PC14 - OSC32_IN (input floating).
755 * PC15 - OSC32_OUT (input floating).
756 */
757#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A1) | \
758 PIN_MODE_INPUT(GPIOC_PIN1) | \
759 PIN_MODE_INPUT(GPIOC_ZIO_A7) | \
760 PIN_MODE_INPUT(GPIOC_ARD_A2) | \
761 PIN_MODE_INPUT(GPIOC_ARD_D1) | \
762 PIN_MODE_INPUT(GPIOC_ARD_D0) | \
763 PIN_MODE_INPUT(GPIOC_ZIO_D16) | \
764 PIN_MODE_INPUT(GPIOC_ZIO_D21) | \
765 PIN_MODE_INPUT(GPIOC_ZIO_D43) | \
766 PIN_MODE_INPUT(GPIOC_ZIO_D44) | \
767 PIN_MODE_INPUT(GPIOC_ZIO_D45) | \
768 PIN_MODE_INPUT(GPIOC_ZIO_D46) | \
769 PIN_MODE_INPUT(GPIOC_ZIO_D47) | \
770 PIN_MODE_INPUT(GPIOC_BUTTON) | \
771 PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
772 PIN_MODE_INPUT(GPIOC_OSC32_OUT))
773#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A1) | \
774 PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
775 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_A7) | \
776 PIN_OTYPE_PUSHPULL(GPIOC_ARD_A2) | \
777 PIN_OTYPE_PUSHPULL(GPIOC_ARD_D1) | \
778 PIN_OTYPE_PUSHPULL(GPIOC_ARD_D0) | \
779 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D16) | \
780 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D21) | \
781 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D43) | \
782 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D44) | \
783 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D45) | \
784 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D46) | \
785 PIN_OTYPE_PUSHPULL(GPIOC_ZIO_D47) | \
786 PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | \
787 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
788 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
789#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A1) | \
790 PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
791 PIN_OSPEED_HIGH(GPIOC_ZIO_A7) | \
792 PIN_OSPEED_HIGH(GPIOC_ARD_A2) | \
793 PIN_OSPEED_HIGH(GPIOC_ARD_D1) | \
794 PIN_OSPEED_HIGH(GPIOC_ARD_D0) | \
795 PIN_OSPEED_HIGH(GPIOC_ZIO_D16) | \
796 PIN_OSPEED_HIGH(GPIOC_ZIO_D21) | \
797 PIN_OSPEED_VERYLOW(GPIOC_ZIO_D43) | \
798 PIN_OSPEED_HIGH(GPIOC_ZIO_D44) | \
799 PIN_OSPEED_VERYLOW(GPIOC_ZIO_D45) | \
800 PIN_OSPEED_VERYLOW(GPIOC_ZIO_D46) | \
801 PIN_OSPEED_VERYLOW(GPIOC_ZIO_D47) | \
802 PIN_OSPEED_HIGH(GPIOC_BUTTON) | \
803 PIN_OSPEED_VERYLOW(GPIOC_OSC32_IN) | \
804 PIN_OSPEED_VERYLOW(GPIOC_OSC32_OUT))
805#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A1) | \
806 PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
807 PIN_PUPDR_PULLUP(GPIOC_ZIO_A7) | \
808 PIN_PUPDR_PULLUP(GPIOC_ARD_A2) | \
809 PIN_PUPDR_PULLUP(GPIOC_ARD_D1) | \
810 PIN_PUPDR_PULLUP(GPIOC_ARD_D0) | \
811 PIN_PUPDR_PULLUP(GPIOC_ZIO_D16) | \
812 PIN_PUPDR_PULLUP(GPIOC_ZIO_D21) | \
813 PIN_PUPDR_PULLUP(GPIOC_ZIO_D43) | \
814 PIN_PUPDR_PULLUP(GPIOC_ZIO_D44) | \
815 PIN_PUPDR_PULLUP(GPIOC_ZIO_D45) | \
816 PIN_PUPDR_PULLUP(GPIOC_ZIO_D46) | \
817 PIN_PUPDR_PULLUP(GPIOC_ZIO_D47) | \
818 PIN_PUPDR_FLOATING(GPIOC_BUTTON) | \
819 PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
820 PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
821#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A1) | \
822 PIN_ODR_HIGH(GPIOC_PIN1) | \
823 PIN_ODR_HIGH(GPIOC_ZIO_A7) | \
824 PIN_ODR_HIGH(GPIOC_ARD_A2) | \
825 PIN_ODR_HIGH(GPIOC_ARD_D1) | \
826 PIN_ODR_HIGH(GPIOC_ARD_D0) | \
827 PIN_ODR_HIGH(GPIOC_ZIO_D16) | \
828 PIN_ODR_HIGH(GPIOC_ZIO_D21) | \
829 PIN_ODR_HIGH(GPIOC_ZIO_D43) | \
830 PIN_ODR_HIGH(GPIOC_ZIO_D44) | \
831 PIN_ODR_HIGH(GPIOC_ZIO_D45) | \
832 PIN_ODR_HIGH(GPIOC_ZIO_D46) | \
833 PIN_ODR_HIGH(GPIOC_ZIO_D47) | \
834 PIN_ODR_HIGH(GPIOC_BUTTON) | \
835 PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
836 PIN_ODR_HIGH(GPIOC_OSC32_OUT))
837#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A1, 0U) | \
838 PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
839 PIN_AFIO_AF(GPIOC_ZIO_A7, 0U) | \
840 PIN_AFIO_AF(GPIOC_ARD_A2, 0U) | \
841 PIN_AFIO_AF(GPIOC_ARD_D1, 0U) | \
842 PIN_AFIO_AF(GPIOC_ARD_D0, 0U) | \
843 PIN_AFIO_AF(GPIOC_ZIO_D16, 0U) | \
844 PIN_AFIO_AF(GPIOC_ZIO_D21, 0U))
845#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_ZIO_D43, 0U) | \
846 PIN_AFIO_AF(GPIOC_ZIO_D44, 0U) | \
847 PIN_AFIO_AF(GPIOC_ZIO_D45, 0U) | \
848 PIN_AFIO_AF(GPIOC_ZIO_D46, 0U) | \
849 PIN_AFIO_AF(GPIOC_ZIO_D47, 0U) | \
850 PIN_AFIO_AF(GPIOC_BUTTON, 0U) | \
851 PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
852 PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
853
854/*
855 * GPIOD setup:
856 *
857 * PD0 - ZIO_D67 CAN1_RX (input pullup).
858 * PD1 - ZIO_D66 CAN1_TX (input pullup).
859 * PD2 - ZIO_D48 (input pullup).
860 * PD3 - ZIO_D55 USART2_CTS (input pullup).
861 * PD4 - ZIO_D54 USART2_RTS (input pullup).
862 * PD5 - ZIO_D53 USART2_TX (input pullup).
863 * PD6 - ZIO_D52 USART2_RX (input pullup).
864 * PD7 - ZIO_D51 USART2_SCLK (input pullup).
865 * PD8 - USART3_RX STLK_RX (alternate 7).
866 * PD9 - USART3_TX STLK_TX (alternate 7).
867 * PD10 - PIN10 (input pullup).
868 * PD11 - ARD_A3 ADC34_IN8 (input pullup).
869 * PD12 - ARD_A4 ADC34_IN9 (input pullup).
870 * PD13 - ARD_A5 ADC3_IN8 (input pullup).
871 * PD14 - ARD_D10 SPI1_NSS (input pullup).
872 * PD15 - ARD_D9 TIM4_CH4 (input pullup).
873 */
874#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_ZIO_D67) | \
875 PIN_MODE_INPUT(GPIOD_ZIO_D66) | \
876 PIN_MODE_INPUT(GPIOD_ZIO_D48) | \
877 PIN_MODE_INPUT(GPIOD_ZIO_D55) | \
878 PIN_MODE_INPUT(GPIOD_ZIO_D54) | \
879 PIN_MODE_INPUT(GPIOD_ZIO_D53) | \
880 PIN_MODE_INPUT(GPIOD_ZIO_D52) | \
881 PIN_MODE_INPUT(GPIOD_ZIO_D51) | \
882 PIN_MODE_ALTERNATE(GPIOD_USART3_RX) | \
883 PIN_MODE_ALTERNATE(GPIOD_USART3_TX) | \
884 PIN_MODE_INPUT(GPIOD_PIN10) | \
885 PIN_MODE_INPUT(GPIOD_ARD_A3) | \
886 PIN_MODE_INPUT(GPIOD_ARD_A4) | \
887 PIN_MODE_INPUT(GPIOD_ARD_A5) | \
888 PIN_MODE_INPUT(GPIOD_ARD_D10) | \
889 PIN_MODE_INPUT(GPIOD_ARD_D9))
890#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D67) | \
891 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D66) | \
892 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D48) | \
893 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D55) | \
894 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D54) | \
895 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D53) | \
896 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D52) | \
897 PIN_OTYPE_PUSHPULL(GPIOD_ZIO_D51) | \
898 PIN_OTYPE_PUSHPULL(GPIOD_USART3_RX) | \
899 PIN_OTYPE_PUSHPULL(GPIOD_USART3_TX) | \
900 PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
901 PIN_OTYPE_PUSHPULL(GPIOD_ARD_A3) | \
902 PIN_OTYPE_PUSHPULL(GPIOD_ARD_A4) | \
903 PIN_OTYPE_PUSHPULL(GPIOD_ARD_A5) | \
904 PIN_OTYPE_PUSHPULL(GPIOD_ARD_D10) | \
905 PIN_OTYPE_PUSHPULL(GPIOD_ARD_D9))
906#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_ZIO_D67) | \
907 PIN_OSPEED_HIGH(GPIOD_ZIO_D66) | \
908 PIN_OSPEED_VERYLOW(GPIOD_ZIO_D48) | \
909 PIN_OSPEED_HIGH(GPIOD_ZIO_D55) | \
910 PIN_OSPEED_HIGH(GPIOD_ZIO_D54) | \
911 PIN_OSPEED_HIGH(GPIOD_ZIO_D53) | \
912 PIN_OSPEED_HIGH(GPIOD_ZIO_D52) | \
913 PIN_OSPEED_HIGH(GPIOD_ZIO_D51) | \
914 PIN_OSPEED_HIGH(GPIOD_USART3_RX) | \
915 PIN_OSPEED_HIGH(GPIOD_USART3_TX) | \
916 PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
917 PIN_OSPEED_HIGH(GPIOD_ARD_A3) | \
918 PIN_OSPEED_HIGH(GPIOD_ARD_A4) | \
919 PIN_OSPEED_HIGH(GPIOD_ARD_A5) | \
920 PIN_OSPEED_HIGH(GPIOD_ARD_D10) | \
921 PIN_OSPEED_HIGH(GPIOD_ARD_D9))
922#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_ZIO_D67) | \
923 PIN_PUPDR_PULLUP(GPIOD_ZIO_D66) | \
924 PIN_PUPDR_PULLUP(GPIOD_ZIO_D48) | \
925 PIN_PUPDR_PULLUP(GPIOD_ZIO_D55) | \
926 PIN_PUPDR_PULLUP(GPIOD_ZIO_D54) | \
927 PIN_PUPDR_PULLUP(GPIOD_ZIO_D53) | \
928 PIN_PUPDR_PULLUP(GPIOD_ZIO_D52) | \
929 PIN_PUPDR_PULLUP(GPIOD_ZIO_D51) | \
930 PIN_PUPDR_FLOATING(GPIOD_USART3_RX) | \
931 PIN_PUPDR_FLOATING(GPIOD_USART3_TX) | \
932 PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
933 PIN_PUPDR_PULLUP(GPIOD_ARD_A3) | \
934 PIN_PUPDR_PULLUP(GPIOD_ARD_A4) | \
935 PIN_PUPDR_PULLUP(GPIOD_ARD_A5) | \
936 PIN_PUPDR_PULLUP(GPIOD_ARD_D10) | \
937 PIN_PUPDR_PULLUP(GPIOD_ARD_D9))
938#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_ZIO_D67) | \
939 PIN_ODR_HIGH(GPIOD_ZIO_D66) | \
940 PIN_ODR_HIGH(GPIOD_ZIO_D48) | \
941 PIN_ODR_HIGH(GPIOD_ZIO_D55) | \
942 PIN_ODR_HIGH(GPIOD_ZIO_D54) | \
943 PIN_ODR_HIGH(GPIOD_ZIO_D53) | \
944 PIN_ODR_HIGH(GPIOD_ZIO_D52) | \
945 PIN_ODR_HIGH(GPIOD_ZIO_D51) | \
946 PIN_ODR_HIGH(GPIOD_USART3_RX) | \
947 PIN_ODR_HIGH(GPIOD_USART3_TX) | \
948 PIN_ODR_HIGH(GPIOD_PIN10) | \
949 PIN_ODR_HIGH(GPIOD_ARD_A3) | \
950 PIN_ODR_HIGH(GPIOD_ARD_A4) | \
951 PIN_ODR_HIGH(GPIOD_ARD_A5) | \
952 PIN_ODR_HIGH(GPIOD_ARD_D10) | \
953 PIN_ODR_HIGH(GPIOD_ARD_D9))
954#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_ZIO_D67, 0U) | \
955 PIN_AFIO_AF(GPIOD_ZIO_D66, 0U) | \
956 PIN_AFIO_AF(GPIOD_ZIO_D48, 0U) | \
957 PIN_AFIO_AF(GPIOD_ZIO_D55, 0U) | \
958 PIN_AFIO_AF(GPIOD_ZIO_D54, 0U) | \
959 PIN_AFIO_AF(GPIOD_ZIO_D53, 0U) | \
960 PIN_AFIO_AF(GPIOD_ZIO_D52, 0U) | \
961 PIN_AFIO_AF(GPIOD_ZIO_D51, 0U))
962#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_USART3_RX, 7U) | \
963 PIN_AFIO_AF(GPIOD_USART3_TX, 7U) | \
964 PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
965 PIN_AFIO_AF(GPIOD_ARD_A3, 0U) | \
966 PIN_AFIO_AF(GPIOD_ARD_A4, 0U) | \
967 PIN_AFIO_AF(GPIOD_ARD_A5, 0U) | \
968 PIN_AFIO_AF(GPIOD_ARD_D10, 0U) | \
969 PIN_AFIO_AF(GPIOD_ARD_D9, 0U))
970
971/*
972 * GPIOE setup:
973 *
974 * PE0 - ZIO_D34 TIM4_ETR (input pullup).
975 * PE1 - PIN1 (input pullup).
976 * PE2 - ZIO_D31 ZIO_D56 (input pullup).
977 * PE3 - ZIO_D60 (input pullup).
978 * PE4 - ZIO_D57 (input pullup).
979 * PE5 - ZIO_D58 (input pullup).
980 * PE6 - ZIO_D59 (input pullup).
981 * PE7 - ZIO_D41 TIM1_ETR (input pullup).
982 * PE8 - ZIO_D42 TIM1_CH1N (input pullup).
983 * PE9 - ARD_D6 TIM1_CH1 (input pullup).
984 * PE10 - ZIO_D40 TIM1_CH2N (input pullup).
985 * PE11 - ARD_D5 TIM1_CH2 (input pullup).
986 * PE12 - ZIO_D39 TIM1_CH3N (input pullup).
987 * PE13 - ARD_D3 TIM1_CH3 (input pullup).
988 * PE14 - ZIO_D38 (input pullup).
989 * PE15 - ZIO_D37 TIM1_BKIN1 (input pullup).
990 */
991#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_ZIO_D34) | \
992 PIN_MODE_INPUT(GPIOE_PIN1) | \
993 PIN_MODE_INPUT(GPIOE_ZIO_D31) | \
994 PIN_MODE_INPUT(GPIOE_ZIO_D60) | \
995 PIN_MODE_INPUT(GPIOE_ZIO_D57) | \
996 PIN_MODE_INPUT(GPIOE_ZIO_D58) | \
997 PIN_MODE_INPUT(GPIOE_ZIO_D59) | \
998 PIN_MODE_INPUT(GPIOE_ZIO_D41) | \
999 PIN_MODE_INPUT(GPIOE_ZIO_D42) | \
1000 PIN_MODE_INPUT(GPIOE_ARD_D6) | \
1001 PIN_MODE_INPUT(GPIOE_ZIO_D40) | \
1002 PIN_MODE_INPUT(GPIOE_ARD_D5) | \
1003 PIN_MODE_INPUT(GPIOE_ZIO_D39) | \
1004 PIN_MODE_INPUT(GPIOE_ARD_D3) | \
1005 PIN_MODE_INPUT(GPIOE_ZIO_D38) | \
1006 PIN_MODE_INPUT(GPIOE_ZIO_D37))
1007#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D34) | \
1008 PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
1009 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D31) | \
1010 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D60) | \
1011 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D57) | \
1012 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D58) | \
1013 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D59) | \
1014 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D41) | \
1015 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D42) | \
1016 PIN_OTYPE_PUSHPULL(GPIOE_ARD_D6) | \
1017 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D40) | \
1018 PIN_OTYPE_PUSHPULL(GPIOE_ARD_D5) | \
1019 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D39) | \
1020 PIN_OTYPE_PUSHPULL(GPIOE_ARD_D3) | \
1021 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D38) | \
1022 PIN_OTYPE_PUSHPULL(GPIOE_ZIO_D37))
1023#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_ZIO_D34) | \
1024 PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
1025 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D31) | \
1026 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D60) | \
1027 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D57) | \
1028 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D58) | \
1029 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D59) | \
1030 PIN_OSPEED_HIGH(GPIOE_ZIO_D41) | \
1031 PIN_OSPEED_HIGH(GPIOE_ZIO_D42) | \
1032 PIN_OSPEED_HIGH(GPIOE_ARD_D6) | \
1033 PIN_OSPEED_HIGH(GPIOE_ZIO_D40) | \
1034 PIN_OSPEED_HIGH(GPIOE_ARD_D5) | \
1035 PIN_OSPEED_HIGH(GPIOE_ZIO_D39) | \
1036 PIN_OSPEED_HIGH(GPIOE_ARD_D3) | \
1037 PIN_OSPEED_VERYLOW(GPIOE_ZIO_D38) | \
1038 PIN_OSPEED_HIGH(GPIOE_ZIO_D37))
1039#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_ZIO_D34) | \
1040 PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
1041 PIN_PUPDR_PULLUP(GPIOE_ZIO_D31) | \
1042 PIN_PUPDR_PULLUP(GPIOE_ZIO_D60) | \
1043 PIN_PUPDR_PULLUP(GPIOE_ZIO_D57) | \
1044 PIN_PUPDR_PULLUP(GPIOE_ZIO_D58) | \
1045 PIN_PUPDR_PULLUP(GPIOE_ZIO_D59) | \
1046 PIN_PUPDR_PULLUP(GPIOE_ZIO_D41) | \
1047 PIN_PUPDR_PULLUP(GPIOE_ZIO_D42) | \
1048 PIN_PUPDR_PULLUP(GPIOE_ARD_D6) | \
1049 PIN_PUPDR_PULLUP(GPIOE_ZIO_D40) | \
1050 PIN_PUPDR_PULLUP(GPIOE_ARD_D5) | \
1051 PIN_PUPDR_PULLUP(GPIOE_ZIO_D39) | \
1052 PIN_PUPDR_PULLUP(GPIOE_ARD_D3) | \
1053 PIN_PUPDR_PULLUP(GPIOE_ZIO_D38) | \
1054 PIN_PUPDR_PULLUP(GPIOE_ZIO_D37))
1055#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_ZIO_D34) | \
1056 PIN_ODR_HIGH(GPIOE_PIN1) | \
1057 PIN_ODR_HIGH(GPIOE_ZIO_D31) | \
1058 PIN_ODR_HIGH(GPIOE_ZIO_D60) | \
1059 PIN_ODR_HIGH(GPIOE_ZIO_D57) | \
1060 PIN_ODR_HIGH(GPIOE_ZIO_D58) | \
1061 PIN_ODR_HIGH(GPIOE_ZIO_D59) | \
1062 PIN_ODR_HIGH(GPIOE_ZIO_D41) | \
1063 PIN_ODR_HIGH(GPIOE_ZIO_D42) | \
1064 PIN_ODR_HIGH(GPIOE_ARD_D6) | \
1065 PIN_ODR_HIGH(GPIOE_ZIO_D40) | \
1066 PIN_ODR_HIGH(GPIOE_ARD_D5) | \
1067 PIN_ODR_HIGH(GPIOE_ZIO_D39) | \
1068 PIN_ODR_HIGH(GPIOE_ARD_D3) | \
1069 PIN_ODR_HIGH(GPIOE_ZIO_D38) | \
1070 PIN_ODR_HIGH(GPIOE_ZIO_D37))
1071#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_ZIO_D34, 0U) | \
1072 PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
1073 PIN_AFIO_AF(GPIOE_ZIO_D31, 0U) | \
1074 PIN_AFIO_AF(GPIOE_ZIO_D60, 0U) | \
1075 PIN_AFIO_AF(GPIOE_ZIO_D57, 0U) | \
1076 PIN_AFIO_AF(GPIOE_ZIO_D58, 0U) | \
1077 PIN_AFIO_AF(GPIOE_ZIO_D59, 0U) | \
1078 PIN_AFIO_AF(GPIOE_ZIO_D41, 0U))
1079#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_ZIO_D42, 0U) | \
1080 PIN_AFIO_AF(GPIOE_ARD_D6, 0U) | \
1081 PIN_AFIO_AF(GPIOE_ZIO_D40, 0U) | \
1082 PIN_AFIO_AF(GPIOE_ARD_D5, 0U) | \
1083 PIN_AFIO_AF(GPIOE_ZIO_D39, 0U) | \
1084 PIN_AFIO_AF(GPIOE_ARD_D3, 0U) | \
1085 PIN_AFIO_AF(GPIOE_ZIO_D38, 0U) | \
1086 PIN_AFIO_AF(GPIOE_ZIO_D37, 0U))
1087
1088/*
1089 * GPIOF setup:
1090 *
1091 * PF0 - PIN0 (input pullup).
1092 * PF1 - PIN1 (input pullup).
1093 * PF2 - PIN2 (input pullup).
1094 * PF3 - ZIO_D30 (input pullup).
1095 * PF4 - ZIO_A8 ADC3_IN14 (input pullup).
1096 * PF5 - ZIO_D29 (input pullup).
1097 * PF6 - PIN6 (input pullup).
1098 * PF7 - ZIO_D62 (input pullup).
1099 * PF8 - ZIO_D61 (input pullup).
1100 * PF9 - ZIO_D63 (input pullup).
1101 * PF10 - ZIO_D28 (input pullup).
1102 * PF11 - PIN11 (input pullup).
1103 * PF12 - ARD_D8 (input pullup).
1104 * PF13 - ARD_D7 (input pullup).
1105 * PF14 - ARD_D4 (input pullup).
1106 * PF15 - ARD_D2 (input pullup).
1107 */
1108#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | \
1109 PIN_MODE_INPUT(GPIOF_PIN1) | \
1110 PIN_MODE_INPUT(GPIOF_PIN2) | \
1111 PIN_MODE_INPUT(GPIOF_ZIO_D30) | \
1112 PIN_MODE_INPUT(GPIOF_ZIO_A8) | \
1113 PIN_MODE_INPUT(GPIOF_ZIO_D29) | \
1114 PIN_MODE_INPUT(GPIOF_PIN6) | \
1115 PIN_MODE_INPUT(GPIOF_ZIO_D62) | \
1116 PIN_MODE_INPUT(GPIOF_ZIO_D61) | \
1117 PIN_MODE_INPUT(GPIOF_ZIO_D63) | \
1118 PIN_MODE_INPUT(GPIOF_ZIO_D28) | \
1119 PIN_MODE_INPUT(GPIOF_PIN11) | \
1120 PIN_MODE_INPUT(GPIOF_ARD_D8) | \
1121 PIN_MODE_INPUT(GPIOF_ARD_D7) | \
1122 PIN_MODE_INPUT(GPIOF_ARD_D4) | \
1123 PIN_MODE_INPUT(GPIOF_ARD_D2))
1124#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \
1125 PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \
1126 PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
1127 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D30) | \
1128 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_A8) | \
1129 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D29) | \
1130 PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
1131 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D62) | \
1132 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D61) | \
1133 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D63) | \
1134 PIN_OTYPE_PUSHPULL(GPIOF_ZIO_D28) | \
1135 PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
1136 PIN_OTYPE_PUSHPULL(GPIOF_ARD_D8) | \
1137 PIN_OTYPE_PUSHPULL(GPIOF_ARD_D7) | \
1138 PIN_OTYPE_PUSHPULL(GPIOF_ARD_D4) | \
1139 PIN_OTYPE_PUSHPULL(GPIOF_ARD_D2))
1140#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_PIN0) | \
1141 PIN_OSPEED_VERYLOW(GPIOF_PIN1) | \
1142 PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
1143 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D30) | \
1144 PIN_OSPEED_HIGH(GPIOF_ZIO_A8) | \
1145 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D29) | \
1146 PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
1147 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D62) | \
1148 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D61) | \
1149 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D63) | \
1150 PIN_OSPEED_VERYLOW(GPIOF_ZIO_D28) | \
1151 PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
1152 PIN_OSPEED_VERYLOW(GPIOF_ARD_D8) | \
1153 PIN_OSPEED_VERYLOW(GPIOF_ARD_D7) | \
1154 PIN_OSPEED_VERYLOW(GPIOF_ARD_D4) | \
1155 PIN_OSPEED_VERYLOW(GPIOF_ARD_D2))
1156#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \
1157 PIN_PUPDR_PULLUP(GPIOF_PIN1) | \
1158 PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
1159 PIN_PUPDR_PULLUP(GPIOF_ZIO_D30) | \
1160 PIN_PUPDR_PULLUP(GPIOF_ZIO_A8) | \
1161 PIN_PUPDR_PULLUP(GPIOF_ZIO_D29) | \
1162 PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
1163 PIN_PUPDR_PULLUP(GPIOF_ZIO_D62) | \
1164 PIN_PUPDR_PULLUP(GPIOF_ZIO_D61) | \
1165 PIN_PUPDR_PULLUP(GPIOF_ZIO_D63) | \
1166 PIN_PUPDR_PULLUP(GPIOF_ZIO_D28) | \
1167 PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
1168 PIN_PUPDR_PULLUP(GPIOF_ARD_D8) | \
1169 PIN_PUPDR_PULLUP(GPIOF_ARD_D7) | \
1170 PIN_PUPDR_PULLUP(GPIOF_ARD_D4) | \
1171 PIN_PUPDR_PULLUP(GPIOF_ARD_D2))
1172#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \
1173 PIN_ODR_HIGH(GPIOF_PIN1) | \
1174 PIN_ODR_HIGH(GPIOF_PIN2) | \
1175 PIN_ODR_HIGH(GPIOF_ZIO_D30) | \
1176 PIN_ODR_HIGH(GPIOF_ZIO_A8) | \
1177 PIN_ODR_HIGH(GPIOF_ZIO_D29) | \
1178 PIN_ODR_HIGH(GPIOF_PIN6) | \
1179 PIN_ODR_HIGH(GPIOF_ZIO_D62) | \
1180 PIN_ODR_HIGH(GPIOF_ZIO_D61) | \
1181 PIN_ODR_HIGH(GPIOF_ZIO_D63) | \
1182 PIN_ODR_HIGH(GPIOF_ZIO_D28) | \
1183 PIN_ODR_HIGH(GPIOF_PIN11) | \
1184 PIN_ODR_HIGH(GPIOF_ARD_D8) | \
1185 PIN_ODR_HIGH(GPIOF_ARD_D7) | \
1186 PIN_ODR_HIGH(GPIOF_ARD_D4) | \
1187 PIN_ODR_HIGH(GPIOF_ARD_D2))
1188#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \
1189 PIN_AFIO_AF(GPIOF_PIN1, 0U) | \
1190 PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
1191 PIN_AFIO_AF(GPIOF_ZIO_D30, 0U) | \
1192 PIN_AFIO_AF(GPIOF_ZIO_A8, 0U) | \
1193 PIN_AFIO_AF(GPIOF_ZIO_D29, 0U) | \
1194 PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
1195 PIN_AFIO_AF(GPIOF_ZIO_D62, 0U))
1196#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_ZIO_D61, 0U) | \
1197 PIN_AFIO_AF(GPIOF_ZIO_D63, 0U) | \
1198 PIN_AFIO_AF(GPIOF_ZIO_D28, 0U) | \
1199 PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
1200 PIN_AFIO_AF(GPIOF_ARD_D8, 0U) | \
1201 PIN_AFIO_AF(GPIOF_ARD_D7, 0U) | \
1202 PIN_AFIO_AF(GPIOF_ARD_D4, 0U) | \
1203 PIN_AFIO_AF(GPIOF_ARD_D2, 0U))
1204
1205/*
1206 * GPIOG setup:
1207 *
1208 * PG0 - ZIO_D65 (input pullup).
1209 * PG1 - ZIO_D64 (input pullup).
1210 * PG2 - ZIO_D49 (input pullup).
1211 * PG3 - ZIO_D50 (input pullup).
1212 * PG4 - PIN4 (input pullup).
1213 * PG5 - PIN5 (input pullup).
1214 * PG6 - USB_GPIO_OUT (output pushpull maximum).
1215 * PG7 - USB_GPIO_IN (input pullup).
1216 * PG8 - PIN8 (input pullup).
1217 * PG9 - PIN9 (input pullup).
1218 * PG10 - PIN10 (input pullup).
1219 * PG11 - PIN11 (input pullup).
1220 * PG12 - PIN12 (input pullup).
1221 * PG13 - PIN13 (input pullup).
1222 * PG14 - PIN14 (input pullup).
1223 * PG15 - PIN15 (input pullup).
1224 */
1225#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_ZIO_D65) | \
1226 PIN_MODE_INPUT(GPIOG_ZIO_D64) | \
1227 PIN_MODE_INPUT(GPIOG_ZIO_D49) | \
1228 PIN_MODE_INPUT(GPIOG_ZIO_D50) | \
1229 PIN_MODE_INPUT(GPIOG_PIN4) | \
1230 PIN_MODE_INPUT(GPIOG_PIN5) | \
1231 PIN_MODE_OUTPUT(GPIOG_USB_GPIO_OUT) | \
1232 PIN_MODE_INPUT(GPIOG_USB_GPIO_IN) | \
1233 PIN_MODE_INPUT(GPIOG_PIN8) | \
1234 PIN_MODE_INPUT(GPIOG_PIN9) | \
1235 PIN_MODE_INPUT(GPIOG_PIN10) | \
1236 PIN_MODE_INPUT(GPIOG_PIN11) | \
1237 PIN_MODE_INPUT(GPIOG_PIN12) | \
1238 PIN_MODE_INPUT(GPIOG_PIN13) | \
1239 PIN_MODE_INPUT(GPIOG_PIN14) | \
1240 PIN_MODE_INPUT(GPIOG_PIN15))
1241#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D65) | \
1242 PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D64) | \
1243 PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D49) | \
1244 PIN_OTYPE_PUSHPULL(GPIOG_ZIO_D50) | \
1245 PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \
1246 PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \
1247 PIN_OTYPE_PUSHPULL(GPIOG_USB_GPIO_OUT) |\
1248 PIN_OTYPE_PUSHPULL(GPIOG_USB_GPIO_IN) |\
1249 PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \
1250 PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \
1251 PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \
1252 PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \
1253 PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \
1254 PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \
1255 PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \
1256 PIN_OTYPE_PUSHPULL(GPIOG_PIN15))
1257#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_ZIO_D65) | \
1258 PIN_OSPEED_VERYLOW(GPIOG_ZIO_D64) | \
1259 PIN_OSPEED_VERYLOW(GPIOG_ZIO_D49) | \
1260 PIN_OSPEED_VERYLOW(GPIOG_ZIO_D50) | \
1261 PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \
1262 PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \
1263 PIN_OSPEED_HIGH(GPIOG_USB_GPIO_OUT) | \
1264 PIN_OSPEED_HIGH(GPIOG_USB_GPIO_IN) | \
1265 PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \
1266 PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \
1267 PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \
1268 PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \
1269 PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \
1270 PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \
1271 PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \
1272 PIN_OSPEED_VERYLOW(GPIOG_PIN15))
1273#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_ZIO_D65) | \
1274 PIN_PUPDR_PULLUP(GPIOG_ZIO_D64) | \
1275 PIN_PUPDR_PULLUP(GPIOG_ZIO_D49) | \
1276 PIN_PUPDR_PULLUP(GPIOG_ZIO_D50) | \
1277 PIN_PUPDR_PULLUP(GPIOG_PIN4) | \
1278 PIN_PUPDR_PULLUP(GPIOG_PIN5) | \
1279 PIN_PUPDR_FLOATING(GPIOG_USB_GPIO_OUT) |\
1280 PIN_PUPDR_PULLUP(GPIOG_USB_GPIO_IN) | \
1281 PIN_PUPDR_PULLUP(GPIOG_PIN8) | \
1282 PIN_PUPDR_PULLUP(GPIOG_PIN9) | \
1283 PIN_PUPDR_PULLUP(GPIOG_PIN10) | \
1284 PIN_PUPDR_PULLUP(GPIOG_PIN11) | \
1285 PIN_PUPDR_PULLUP(GPIOG_PIN12) | \
1286 PIN_PUPDR_PULLUP(GPIOG_PIN13) | \
1287 PIN_PUPDR_PULLUP(GPIOG_PIN14) | \
1288 PIN_PUPDR_PULLUP(GPIOG_PIN15))
1289#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_ZIO_D65) | \
1290 PIN_ODR_HIGH(GPIOG_ZIO_D64) | \
1291 PIN_ODR_HIGH(GPIOG_ZIO_D49) | \
1292 PIN_ODR_HIGH(GPIOG_ZIO_D50) | \
1293 PIN_ODR_HIGH(GPIOG_PIN4) | \
1294 PIN_ODR_HIGH(GPIOG_PIN5) | \
1295 PIN_ODR_HIGH(GPIOG_USB_GPIO_OUT) | \
1296 PIN_ODR_HIGH(GPIOG_USB_GPIO_IN) | \
1297 PIN_ODR_HIGH(GPIOG_PIN8) | \
1298 PIN_ODR_HIGH(GPIOG_PIN9) | \
1299 PIN_ODR_HIGH(GPIOG_PIN10) | \
1300 PIN_ODR_HIGH(GPIOG_PIN11) | \
1301 PIN_ODR_HIGH(GPIOG_PIN12) | \
1302 PIN_ODR_HIGH(GPIOG_PIN13) | \
1303 PIN_ODR_HIGH(GPIOG_PIN14) | \
1304 PIN_ODR_HIGH(GPIOG_PIN15))
1305#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_ZIO_D65, 0U) | \
1306 PIN_AFIO_AF(GPIOG_ZIO_D64, 0U) | \
1307 PIN_AFIO_AF(GPIOG_ZIO_D49, 0U) | \
1308 PIN_AFIO_AF(GPIOG_ZIO_D50, 0U) | \
1309 PIN_AFIO_AF(GPIOG_PIN4, 0U) | \
1310 PIN_AFIO_AF(GPIOG_PIN5, 0U) | \
1311 PIN_AFIO_AF(GPIOG_USB_GPIO_OUT, 0U) | \
1312 PIN_AFIO_AF(GPIOG_USB_GPIO_IN, 0U))
1313#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \
1314 PIN_AFIO_AF(GPIOG_PIN9, 0U) | \
1315 PIN_AFIO_AF(GPIOG_PIN10, 0U) | \
1316 PIN_AFIO_AF(GPIOG_PIN11, 0U) | \
1317 PIN_AFIO_AF(GPIOG_PIN12, 0U) | \
1318 PIN_AFIO_AF(GPIOG_PIN13, 0U) | \
1319 PIN_AFIO_AF(GPIOG_PIN14, 0U) | \
1320 PIN_AFIO_AF(GPIOG_PIN15, 0U))
1321
1322/*
1323 * GPIOH setup:
1324 *
1325 * PH0 - OSC_IN (input floating).
1326 * PH1 - OSC_OUT (input floating).
1327 * PH2 - PIN2 (input pullup).
1328 * PH3 - PIN3 (input pullup).
1329 * PH4 - PIN4 (input pullup).
1330 * PH5 - PIN5 (input pullup).
1331 * PH6 - PIN6 (input pullup).
1332 * PH7 - PIN7 (input pullup).
1333 * PH8 - PIN8 (input pullup).
1334 * PH9 - PIN9 (input pullup).
1335 * PH10 - PIN10 (input pullup).
1336 * PH11 - PIN11 (input pullup).
1337 * PH12 - PIN12 (input pullup).
1338 * PH13 - PIN13 (input pullup).
1339 * PH14 - PIN14 (input pullup).
1340 * PH15 - PIN15 (input pullup).
1341 */
1342#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \
1343 PIN_MODE_INPUT(GPIOH_OSC_OUT) | \
1344 PIN_MODE_INPUT(GPIOH_PIN2) | \
1345 PIN_MODE_INPUT(GPIOH_PIN3) | \
1346 PIN_MODE_INPUT(GPIOH_PIN4) | \
1347 PIN_MODE_INPUT(GPIOH_PIN5) | \
1348 PIN_MODE_INPUT(GPIOH_PIN6) | \
1349 PIN_MODE_INPUT(GPIOH_PIN7) | \
1350 PIN_MODE_INPUT(GPIOH_PIN8) | \
1351 PIN_MODE_INPUT(GPIOH_PIN9) | \
1352 PIN_MODE_INPUT(GPIOH_PIN10) | \
1353 PIN_MODE_INPUT(GPIOH_PIN11) | \
1354 PIN_MODE_INPUT(GPIOH_PIN12) | \
1355 PIN_MODE_INPUT(GPIOH_PIN13) | \
1356 PIN_MODE_INPUT(GPIOH_PIN14) | \
1357 PIN_MODE_INPUT(GPIOH_PIN15))
1358#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \
1359 PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \
1360 PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \
1361 PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \
1362 PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \
1363 PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \
1364 PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \
1365 PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \
1366 PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \
1367 PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \
1368 PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \
1369 PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \
1370 PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \
1371 PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \
1372 PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \
1373 PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
1374#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \
1375 PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \
1376 PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \
1377 PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \
1378 PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \
1379 PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \
1380 PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \
1381 PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \
1382 PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \
1383 PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \
1384 PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \
1385 PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \
1386 PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \
1387 PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \
1388 PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \
1389 PIN_OSPEED_VERYLOW(GPIOH_PIN15))
1390#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \
1391 PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \
1392 PIN_PUPDR_PULLUP(GPIOH_PIN2) | \
1393 PIN_PUPDR_PULLUP(GPIOH_PIN3) | \
1394 PIN_PUPDR_PULLUP(GPIOH_PIN4) | \
1395 PIN_PUPDR_PULLUP(GPIOH_PIN5) | \
1396 PIN_PUPDR_PULLUP(GPIOH_PIN6) | \
1397 PIN_PUPDR_PULLUP(GPIOH_PIN7) | \
1398 PIN_PUPDR_PULLUP(GPIOH_PIN8) | \
1399 PIN_PUPDR_PULLUP(GPIOH_PIN9) | \
1400 PIN_PUPDR_PULLUP(GPIOH_PIN10) | \
1401 PIN_PUPDR_PULLUP(GPIOH_PIN11) | \
1402 PIN_PUPDR_PULLUP(GPIOH_PIN12) | \
1403 PIN_PUPDR_PULLUP(GPIOH_PIN13) | \
1404 PIN_PUPDR_PULLUP(GPIOH_PIN14) | \
1405 PIN_PUPDR_PULLUP(GPIOH_PIN15))
1406#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \
1407 PIN_ODR_HIGH(GPIOH_OSC_OUT) | \
1408 PIN_ODR_HIGH(GPIOH_PIN2) | \
1409 PIN_ODR_HIGH(GPIOH_PIN3) | \
1410 PIN_ODR_HIGH(GPIOH_PIN4) | \
1411 PIN_ODR_HIGH(GPIOH_PIN5) | \
1412 PIN_ODR_HIGH(GPIOH_PIN6) | \
1413 PIN_ODR_HIGH(GPIOH_PIN7) | \
1414 PIN_ODR_HIGH(GPIOH_PIN8) | \
1415 PIN_ODR_HIGH(GPIOH_PIN9) | \
1416 PIN_ODR_HIGH(GPIOH_PIN10) | \
1417 PIN_ODR_HIGH(GPIOH_PIN11) | \
1418 PIN_ODR_HIGH(GPIOH_PIN12) | \
1419 PIN_ODR_HIGH(GPIOH_PIN13) | \
1420 PIN_ODR_HIGH(GPIOH_PIN14) | \
1421 PIN_ODR_HIGH(GPIOH_PIN15))
1422#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \
1423 PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \
1424 PIN_AFIO_AF(GPIOH_PIN2, 0U) | \
1425 PIN_AFIO_AF(GPIOH_PIN3, 0U) | \
1426 PIN_AFIO_AF(GPIOH_PIN4, 0U) | \
1427 PIN_AFIO_AF(GPIOH_PIN5, 0U) | \
1428 PIN_AFIO_AF(GPIOH_PIN6, 0U) | \
1429 PIN_AFIO_AF(GPIOH_PIN7, 0U))
1430#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \
1431 PIN_AFIO_AF(GPIOH_PIN9, 0U) | \
1432 PIN_AFIO_AF(GPIOH_PIN10, 0U) | \
1433 PIN_AFIO_AF(GPIOH_PIN11, 0U) | \
1434 PIN_AFIO_AF(GPIOH_PIN12, 0U) | \
1435 PIN_AFIO_AF(GPIOH_PIN13, 0U) | \
1436 PIN_AFIO_AF(GPIOH_PIN14, 0U) | \
1437 PIN_AFIO_AF(GPIOH_PIN15, 0U))
1438
1439/*
1440 * GPIOI setup:
1441 *
1442 * PI0 - PIN0 (input pullup).
1443 * PI1 - PIN1 (input pullup).
1444 * PI2 - PIN2 (input pullup).
1445 * PI3 - PIN3 (input pullup).
1446 * PI4 - PIN4 (input pullup).
1447 * PI5 - PIN5 (input pullup).
1448 * PI6 - PIN6 (input pullup).
1449 * PI7 - PIN7 (input pullup).
1450 * PI8 - PIN8 (input pullup).
1451 * PI9 - PIN9 (input pullup).
1452 * PI10 - PIN10 (input pullup).
1453 * PI11 - PIN11 (input pullup).
1454 * PI12 - PIN12 (input pullup).
1455 * PI13 - PIN13 (input pullup).
1456 * PI14 - PIN14 (input pullup).
1457 * PI15 - PIN15 (input pullup).
1458 */
1459#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | \
1460 PIN_MODE_INPUT(GPIOI_PIN1) | \
1461 PIN_MODE_INPUT(GPIOI_PIN2) | \
1462 PIN_MODE_INPUT(GPIOI_PIN3) | \
1463 PIN_MODE_INPUT(GPIOI_PIN4) | \
1464 PIN_MODE_INPUT(GPIOI_PIN5) | \
1465 PIN_MODE_INPUT(GPIOI_PIN6) | \
1466 PIN_MODE_INPUT(GPIOI_PIN7) | \
1467 PIN_MODE_INPUT(GPIOI_PIN8) | \
1468 PIN_MODE_INPUT(GPIOI_PIN9) | \
1469 PIN_MODE_INPUT(GPIOI_PIN10) | \
1470 PIN_MODE_INPUT(GPIOI_PIN11) | \
1471 PIN_MODE_INPUT(GPIOI_PIN12) | \
1472 PIN_MODE_INPUT(GPIOI_PIN13) | \
1473 PIN_MODE_INPUT(GPIOI_PIN14) | \
1474 PIN_MODE_INPUT(GPIOI_PIN15))
1475#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \
1476 PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \
1477 PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \
1478 PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \
1479 PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \
1480 PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \
1481 PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \
1482 PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \
1483 PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \
1484 PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \
1485 PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \
1486 PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \
1487 PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \
1488 PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \
1489 PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \
1490 PIN_OTYPE_PUSHPULL(GPIOI_PIN15))
1491#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOI_PIN0) | \
1492 PIN_OSPEED_VERYLOW(GPIOI_PIN1) | \
1493 PIN_OSPEED_VERYLOW(GPIOI_PIN2) | \
1494 PIN_OSPEED_VERYLOW(GPIOI_PIN3) | \
1495 PIN_OSPEED_VERYLOW(GPIOI_PIN4) | \
1496 PIN_OSPEED_VERYLOW(GPIOI_PIN5) | \
1497 PIN_OSPEED_VERYLOW(GPIOI_PIN6) | \
1498 PIN_OSPEED_VERYLOW(GPIOI_PIN7) | \
1499 PIN_OSPEED_VERYLOW(GPIOI_PIN8) | \
1500 PIN_OSPEED_VERYLOW(GPIOI_PIN9) | \
1501 PIN_OSPEED_VERYLOW(GPIOI_PIN10) | \
1502 PIN_OSPEED_VERYLOW(GPIOI_PIN11) | \
1503 PIN_OSPEED_VERYLOW(GPIOI_PIN12) | \
1504 PIN_OSPEED_VERYLOW(GPIOI_PIN13) | \
1505 PIN_OSPEED_VERYLOW(GPIOI_PIN14) | \
1506 PIN_OSPEED_VERYLOW(GPIOI_PIN15))
1507#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | \
1508 PIN_PUPDR_PULLUP(GPIOI_PIN1) | \
1509 PIN_PUPDR_PULLUP(GPIOI_PIN2) | \
1510 PIN_PUPDR_PULLUP(GPIOI_PIN3) | \
1511 PIN_PUPDR_PULLUP(GPIOI_PIN4) | \
1512 PIN_PUPDR_PULLUP(GPIOI_PIN5) | \
1513 PIN_PUPDR_PULLUP(GPIOI_PIN6) | \
1514 PIN_PUPDR_PULLUP(GPIOI_PIN7) | \
1515 PIN_PUPDR_PULLUP(GPIOI_PIN8) | \
1516 PIN_PUPDR_PULLUP(GPIOI_PIN9) | \
1517 PIN_PUPDR_PULLUP(GPIOI_PIN10) | \
1518 PIN_PUPDR_PULLUP(GPIOI_PIN11) | \
1519 PIN_PUPDR_PULLUP(GPIOI_PIN12) | \
1520 PIN_PUPDR_PULLUP(GPIOI_PIN13) | \
1521 PIN_PUPDR_PULLUP(GPIOI_PIN14) | \
1522 PIN_PUPDR_PULLUP(GPIOI_PIN15))
1523#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \
1524 PIN_ODR_HIGH(GPIOI_PIN1) | \
1525 PIN_ODR_HIGH(GPIOI_PIN2) | \
1526 PIN_ODR_HIGH(GPIOI_PIN3) | \
1527 PIN_ODR_HIGH(GPIOI_PIN4) | \
1528 PIN_ODR_HIGH(GPIOI_PIN5) | \
1529 PIN_ODR_HIGH(GPIOI_PIN6) | \
1530 PIN_ODR_HIGH(GPIOI_PIN7) | \
1531 PIN_ODR_HIGH(GPIOI_PIN8) | \
1532 PIN_ODR_HIGH(GPIOI_PIN9) | \
1533 PIN_ODR_HIGH(GPIOI_PIN10) | \
1534 PIN_ODR_HIGH(GPIOI_PIN11) | \
1535 PIN_ODR_HIGH(GPIOI_PIN12) | \
1536 PIN_ODR_HIGH(GPIOI_PIN13) | \
1537 PIN_ODR_HIGH(GPIOI_PIN14) | \
1538 PIN_ODR_HIGH(GPIOI_PIN15))
1539#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \
1540 PIN_AFIO_AF(GPIOI_PIN1, 0U) | \
1541 PIN_AFIO_AF(GPIOI_PIN2, 0U) | \
1542 PIN_AFIO_AF(GPIOI_PIN3, 0U) | \
1543 PIN_AFIO_AF(GPIOI_PIN4, 0U) | \
1544 PIN_AFIO_AF(GPIOI_PIN5, 0U) | \
1545 PIN_AFIO_AF(GPIOI_PIN6, 0U) | \
1546 PIN_AFIO_AF(GPIOI_PIN7, 0U))
1547#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \
1548 PIN_AFIO_AF(GPIOI_PIN9, 0U) | \
1549 PIN_AFIO_AF(GPIOI_PIN10, 0U) | \
1550 PIN_AFIO_AF(GPIOI_PIN11, 0U) | \
1551 PIN_AFIO_AF(GPIOI_PIN12, 0U) | \
1552 PIN_AFIO_AF(GPIOI_PIN13, 0U) | \
1553 PIN_AFIO_AF(GPIOI_PIN14, 0U) | \
1554 PIN_AFIO_AF(GPIOI_PIN15, 0U))
1555
1556/*
1557 * GPIOJ setup:
1558 *
1559 * PJ0 - PIN0 (input pullup).
1560 * PJ1 - PIN1 (input pullup).
1561 * PJ2 - PIN2 (input pullup).
1562 * PJ3 - PIN3 (input pullup).
1563 * PJ4 - PIN4 (input pullup).
1564 * PJ5 - PIN5 (input pullup).
1565 * PJ6 - PIN6 (input pullup).
1566 * PJ7 - PIN7 (input pullup).
1567 * PJ8 - PIN8 (input pullup).
1568 * PJ9 - PIN9 (input pullup).
1569 * PJ10 - PIN10 (input pullup).
1570 * PJ11 - PIN11 (input pullup).
1571 * PJ12 - PIN12 (input pullup).
1572 * PJ13 - PIN13 (input pullup).
1573 * PJ14 - PIN14 (input pullup).
1574 * PJ15 - PIN15 (input pullup).
1575 */
1576#define VAL_GPIOJ_MODER (PIN_MODE_INPUT(GPIOJ_PIN0) | \
1577 PIN_MODE_INPUT(GPIOJ_PIN1) | \
1578 PIN_MODE_INPUT(GPIOJ_PIN2) | \
1579 PIN_MODE_INPUT(GPIOJ_PIN3) | \
1580 PIN_MODE_INPUT(GPIOJ_PIN4) | \
1581 PIN_MODE_INPUT(GPIOJ_PIN5) | \
1582 PIN_MODE_INPUT(GPIOJ_PIN6) | \
1583 PIN_MODE_INPUT(GPIOJ_PIN7) | \
1584 PIN_MODE_INPUT(GPIOJ_PIN8) | \
1585 PIN_MODE_INPUT(GPIOJ_PIN9) | \
1586 PIN_MODE_INPUT(GPIOJ_PIN10) | \
1587 PIN_MODE_INPUT(GPIOJ_PIN11) | \
1588 PIN_MODE_INPUT(GPIOJ_PIN12) | \
1589 PIN_MODE_INPUT(GPIOJ_PIN13) | \
1590 PIN_MODE_INPUT(GPIOJ_PIN14) | \
1591 PIN_MODE_INPUT(GPIOJ_PIN15))
1592#define VAL_GPIOJ_OTYPER (PIN_OTYPE_PUSHPULL(GPIOJ_PIN0) | \
1593 PIN_OTYPE_PUSHPULL(GPIOJ_PIN1) | \
1594 PIN_OTYPE_PUSHPULL(GPIOJ_PIN2) | \
1595 PIN_OTYPE_PUSHPULL(GPIOJ_PIN3) | \
1596 PIN_OTYPE_PUSHPULL(GPIOJ_PIN4) | \
1597 PIN_OTYPE_PUSHPULL(GPIOJ_PIN5) | \
1598 PIN_OTYPE_PUSHPULL(GPIOJ_PIN6) | \
1599 PIN_OTYPE_PUSHPULL(GPIOJ_PIN7) | \
1600 PIN_OTYPE_PUSHPULL(GPIOJ_PIN8) | \
1601 PIN_OTYPE_PUSHPULL(GPIOJ_PIN9) | \
1602 PIN_OTYPE_PUSHPULL(GPIOJ_PIN10) | \
1603 PIN_OTYPE_PUSHPULL(GPIOJ_PIN11) | \
1604 PIN_OTYPE_PUSHPULL(GPIOJ_PIN12) | \
1605 PIN_OTYPE_PUSHPULL(GPIOJ_PIN13) | \
1606 PIN_OTYPE_PUSHPULL(GPIOJ_PIN14) | \
1607 PIN_OTYPE_PUSHPULL(GPIOJ_PIN15))
1608#define VAL_GPIOJ_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOJ_PIN0) | \
1609 PIN_OSPEED_VERYLOW(GPIOJ_PIN1) | \
1610 PIN_OSPEED_VERYLOW(GPIOJ_PIN2) | \
1611 PIN_OSPEED_VERYLOW(GPIOJ_PIN3) | \
1612 PIN_OSPEED_VERYLOW(GPIOJ_PIN4) | \
1613 PIN_OSPEED_VERYLOW(GPIOJ_PIN5) | \
1614 PIN_OSPEED_VERYLOW(GPIOJ_PIN6) | \
1615 PIN_OSPEED_VERYLOW(GPIOJ_PIN7) | \
1616 PIN_OSPEED_VERYLOW(GPIOJ_PIN8) | \
1617 PIN_OSPEED_VERYLOW(GPIOJ_PIN9) | \
1618 PIN_OSPEED_VERYLOW(GPIOJ_PIN10) | \
1619 PIN_OSPEED_VERYLOW(GPIOJ_PIN11) | \
1620 PIN_OSPEED_VERYLOW(GPIOJ_PIN12) | \
1621 PIN_OSPEED_VERYLOW(GPIOJ_PIN13) | \
1622 PIN_OSPEED_VERYLOW(GPIOJ_PIN14) | \
1623 PIN_OSPEED_VERYLOW(GPIOJ_PIN15))
1624#define VAL_GPIOJ_PUPDR (PIN_PUPDR_PULLUP(GPIOJ_PIN0) | \
1625 PIN_PUPDR_PULLUP(GPIOJ_PIN1) | \
1626 PIN_PUPDR_PULLUP(GPIOJ_PIN2) | \
1627 PIN_PUPDR_PULLUP(GPIOJ_PIN3) | \
1628 PIN_PUPDR_PULLUP(GPIOJ_PIN4) | \
1629 PIN_PUPDR_PULLUP(GPIOJ_PIN5) | \
1630 PIN_PUPDR_PULLUP(GPIOJ_PIN6) | \
1631 PIN_PUPDR_PULLUP(GPIOJ_PIN7) | \
1632 PIN_PUPDR_PULLUP(GPIOJ_PIN8) | \
1633 PIN_PUPDR_PULLUP(GPIOJ_PIN9) | \
1634 PIN_PUPDR_PULLUP(GPIOJ_PIN10) | \
1635 PIN_PUPDR_PULLUP(GPIOJ_PIN11) | \
1636 PIN_PUPDR_PULLUP(GPIOJ_PIN12) | \
1637 PIN_PUPDR_PULLUP(GPIOJ_PIN13) | \
1638 PIN_PUPDR_PULLUP(GPIOJ_PIN14) | \
1639 PIN_PUPDR_PULLUP(GPIOJ_PIN15))
1640#define VAL_GPIOJ_ODR (PIN_ODR_HIGH(GPIOJ_PIN0) | \
1641 PIN_ODR_HIGH(GPIOJ_PIN1) | \
1642 PIN_ODR_HIGH(GPIOJ_PIN2) | \
1643 PIN_ODR_HIGH(GPIOJ_PIN3) | \
1644 PIN_ODR_HIGH(GPIOJ_PIN4) | \
1645 PIN_ODR_HIGH(GPIOJ_PIN5) | \
1646 PIN_ODR_HIGH(GPIOJ_PIN6) | \
1647 PIN_ODR_HIGH(GPIOJ_PIN7) | \
1648 PIN_ODR_HIGH(GPIOJ_PIN8) | \
1649 PIN_ODR_HIGH(GPIOJ_PIN9) | \
1650 PIN_ODR_HIGH(GPIOJ_PIN10) | \
1651 PIN_ODR_HIGH(GPIOJ_PIN11) | \
1652 PIN_ODR_HIGH(GPIOJ_PIN12) | \
1653 PIN_ODR_HIGH(GPIOJ_PIN13) | \
1654 PIN_ODR_HIGH(GPIOJ_PIN14) | \
1655 PIN_ODR_HIGH(GPIOJ_PIN15))
1656#define VAL_GPIOJ_AFRL (PIN_AFIO_AF(GPIOJ_PIN0, 0U) | \
1657 PIN_AFIO_AF(GPIOJ_PIN1, 0U) | \
1658 PIN_AFIO_AF(GPIOJ_PIN2, 0U) | \
1659 PIN_AFIO_AF(GPIOJ_PIN3, 0U) | \
1660 PIN_AFIO_AF(GPIOJ_PIN4, 0U) | \
1661 PIN_AFIO_AF(GPIOJ_PIN5, 0U) | \
1662 PIN_AFIO_AF(GPIOJ_PIN6, 0U) | \
1663 PIN_AFIO_AF(GPIOJ_PIN7, 0U))
1664#define VAL_GPIOJ_AFRH (PIN_AFIO_AF(GPIOJ_PIN8, 0U) | \
1665 PIN_AFIO_AF(GPIOJ_PIN9, 0U) | \
1666 PIN_AFIO_AF(GPIOJ_PIN10, 0U) | \
1667 PIN_AFIO_AF(GPIOJ_PIN11, 0U) | \
1668 PIN_AFIO_AF(GPIOJ_PIN12, 0U) | \
1669 PIN_AFIO_AF(GPIOJ_PIN13, 0U) | \
1670 PIN_AFIO_AF(GPIOJ_PIN14, 0U) | \
1671 PIN_AFIO_AF(GPIOJ_PIN15, 0U))
1672
1673/*
1674 * GPIOK setup:
1675 *
1676 * PK0 - PIN0 (input pullup).
1677 * PK1 - PIN1 (input pullup).
1678 * PK2 - PIN2 (input pullup).
1679 * PK3 - PIN3 (input pullup).
1680 * PK4 - PIN4 (input pullup).
1681 * PK5 - PIN5 (input pullup).
1682 * PK6 - PIN6 (input pullup).
1683 * PK7 - PIN7 (input pullup).
1684 * PK8 - PIN8 (input pullup).
1685 * PK9 - PIN9 (input pullup).
1686 * PK10 - PIN10 (input pullup).
1687 * PK11 - PIN11 (input pullup).
1688 * PK12 - PIN12 (input pullup).
1689 * PK13 - PIN13 (input pullup).
1690 * PK14 - PIN14 (input pullup).
1691 * PK15 - PIN15 (input pullup).
1692 */
1693#define VAL_GPIOK_MODER (PIN_MODE_INPUT(GPIOK_PIN0) | \
1694 PIN_MODE_INPUT(GPIOK_PIN1) | \
1695 PIN_MODE_INPUT(GPIOK_PIN2) | \
1696 PIN_MODE_INPUT(GPIOK_PIN3) | \
1697 PIN_MODE_INPUT(GPIOK_PIN4) | \
1698 PIN_MODE_INPUT(GPIOK_PIN5) | \
1699 PIN_MODE_INPUT(GPIOK_PIN6) | \
1700 PIN_MODE_INPUT(GPIOK_PIN7) | \
1701 PIN_MODE_INPUT(GPIOK_PIN8) | \
1702 PIN_MODE_INPUT(GPIOK_PIN9) | \
1703 PIN_MODE_INPUT(GPIOK_PIN10) | \
1704 PIN_MODE_INPUT(GPIOK_PIN11) | \
1705 PIN_MODE_INPUT(GPIOK_PIN12) | \
1706 PIN_MODE_INPUT(GPIOK_PIN13) | \
1707 PIN_MODE_INPUT(GPIOK_PIN14) | \
1708 PIN_MODE_INPUT(GPIOK_PIN15))
1709#define VAL_GPIOK_OTYPER (PIN_OTYPE_PUSHPULL(GPIOK_PIN0) | \
1710 PIN_OTYPE_PUSHPULL(GPIOK_PIN1) | \
1711 PIN_OTYPE_PUSHPULL(GPIOK_PIN2) | \
1712 PIN_OTYPE_PUSHPULL(GPIOK_PIN3) | \
1713 PIN_OTYPE_PUSHPULL(GPIOK_PIN4) | \
1714 PIN_OTYPE_PUSHPULL(GPIOK_PIN5) | \
1715 PIN_OTYPE_PUSHPULL(GPIOK_PIN6) | \
1716 PIN_OTYPE_PUSHPULL(GPIOK_PIN7) | \
1717 PIN_OTYPE_PUSHPULL(GPIOK_PIN8) | \
1718 PIN_OTYPE_PUSHPULL(GPIOK_PIN9) | \
1719 PIN_OTYPE_PUSHPULL(GPIOK_PIN10) | \
1720 PIN_OTYPE_PUSHPULL(GPIOK_PIN11) | \
1721 PIN_OTYPE_PUSHPULL(GPIOK_PIN12) | \
1722 PIN_OTYPE_PUSHPULL(GPIOK_PIN13) | \
1723 PIN_OTYPE_PUSHPULL(GPIOK_PIN14) | \
1724 PIN_OTYPE_PUSHPULL(GPIOK_PIN15))
1725#define VAL_GPIOK_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOK_PIN0) | \
1726 PIN_OSPEED_VERYLOW(GPIOK_PIN1) | \
1727 PIN_OSPEED_VERYLOW(GPIOK_PIN2) | \
1728 PIN_OSPEED_VERYLOW(GPIOK_PIN3) | \
1729 PIN_OSPEED_VERYLOW(GPIOK_PIN4) | \
1730 PIN_OSPEED_VERYLOW(GPIOK_PIN5) | \
1731 PIN_OSPEED_VERYLOW(GPIOK_PIN6) | \
1732 PIN_OSPEED_VERYLOW(GPIOK_PIN7) | \
1733 PIN_OSPEED_VERYLOW(GPIOK_PIN8) | \
1734 PIN_OSPEED_VERYLOW(GPIOK_PIN9) | \
1735 PIN_OSPEED_VERYLOW(GPIOK_PIN10) | \
1736 PIN_OSPEED_VERYLOW(GPIOK_PIN11) | \
1737 PIN_OSPEED_VERYLOW(GPIOK_PIN12) | \
1738 PIN_OSPEED_VERYLOW(GPIOK_PIN13) | \
1739 PIN_OSPEED_VERYLOW(GPIOK_PIN14) | \
1740 PIN_OSPEED_VERYLOW(GPIOK_PIN15))
1741#define VAL_GPIOK_PUPDR (PIN_PUPDR_PULLUP(GPIOK_PIN0) | \
1742 PIN_PUPDR_PULLUP(GPIOK_PIN1) | \
1743 PIN_PUPDR_PULLUP(GPIOK_PIN2) | \
1744 PIN_PUPDR_PULLUP(GPIOK_PIN3) | \
1745 PIN_PUPDR_PULLUP(GPIOK_PIN4) | \
1746 PIN_PUPDR_PULLUP(GPIOK_PIN5) | \
1747 PIN_PUPDR_PULLUP(GPIOK_PIN6) | \
1748 PIN_PUPDR_PULLUP(GPIOK_PIN7) | \
1749 PIN_PUPDR_PULLUP(GPIOK_PIN8) | \
1750 PIN_PUPDR_PULLUP(GPIOK_PIN9) | \
1751 PIN_PUPDR_PULLUP(GPIOK_PIN10) | \
1752 PIN_PUPDR_PULLUP(GPIOK_PIN11) | \
1753 PIN_PUPDR_PULLUP(GPIOK_PIN12) | \
1754 PIN_PUPDR_PULLUP(GPIOK_PIN13) | \
1755 PIN_PUPDR_PULLUP(GPIOK_PIN14) | \
1756 PIN_PUPDR_PULLUP(GPIOK_PIN15))
1757#define VAL_GPIOK_ODR (PIN_ODR_HIGH(GPIOK_PIN0) | \
1758 PIN_ODR_HIGH(GPIOK_PIN1) | \
1759 PIN_ODR_HIGH(GPIOK_PIN2) | \
1760 PIN_ODR_HIGH(GPIOK_PIN3) | \
1761 PIN_ODR_HIGH(GPIOK_PIN4) | \
1762 PIN_ODR_HIGH(GPIOK_PIN5) | \
1763 PIN_ODR_HIGH(GPIOK_PIN6) | \
1764 PIN_ODR_HIGH(GPIOK_PIN7) | \
1765 PIN_ODR_HIGH(GPIOK_PIN8) | \
1766 PIN_ODR_HIGH(GPIOK_PIN9) | \
1767 PIN_ODR_HIGH(GPIOK_PIN10) | \
1768 PIN_ODR_HIGH(GPIOK_PIN11) | \
1769 PIN_ODR_HIGH(GPIOK_PIN12) | \
1770 PIN_ODR_HIGH(GPIOK_PIN13) | \
1771 PIN_ODR_HIGH(GPIOK_PIN14) | \
1772 PIN_ODR_HIGH(GPIOK_PIN15))
1773#define VAL_GPIOK_AFRL (PIN_AFIO_AF(GPIOK_PIN0, 0U) | \
1774 PIN_AFIO_AF(GPIOK_PIN1, 0U) | \
1775 PIN_AFIO_AF(GPIOK_PIN2, 0U) | \
1776 PIN_AFIO_AF(GPIOK_PIN3, 0U) | \
1777 PIN_AFIO_AF(GPIOK_PIN4, 0U) | \
1778 PIN_AFIO_AF(GPIOK_PIN5, 0U) | \
1779 PIN_AFIO_AF(GPIOK_PIN6, 0U) | \
1780 PIN_AFIO_AF(GPIOK_PIN7, 0U))
1781#define VAL_GPIOK_AFRH (PIN_AFIO_AF(GPIOK_PIN8, 0U) | \
1782 PIN_AFIO_AF(GPIOK_PIN9, 0U) | \
1783 PIN_AFIO_AF(GPIOK_PIN10, 0U) | \
1784 PIN_AFIO_AF(GPIOK_PIN11, 0U) | \
1785 PIN_AFIO_AF(GPIOK_PIN12, 0U) | \
1786 PIN_AFIO_AF(GPIOK_PIN13, 0U) | \
1787 PIN_AFIO_AF(GPIOK_PIN14, 0U) | \
1788 PIN_AFIO_AF(GPIOK_PIN15, 0U))
1789
1790/*===========================================================================*/
1791/* External declarations. */
1792/*===========================================================================*/
1793
1794#if !defined(_FROM_ASM_)
1795#ifdef __cplusplus
1796extern "C" {
1797#endif
1798 void boardInit(void);
1799#ifdef __cplusplus
1800}
1801#endif
1802#endif /* _FROM_ASM_ */
1803
1804#endif /* BOARD_H */
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.mk b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.mk
new file mode 100644
index 000000000..dfef0eabc
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/board.mk
@@ -0,0 +1,9 @@
1# List of all the board related files.
2BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F303ZE/board.c
3
4# Required include directories
5BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F303ZE
6
7# Shared variables
8ALLCSRC += $(BOARDSRC)
9ALLINC += $(BOARDINC)
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.chcfg b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.chcfg
new file mode 100644
index 000000000..18189fdf9
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.chcfg
@@ -0,0 +1,1449 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- STM32F3xx board Template -->
3<board
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f3xx_board.xsd">
6 <configuration_settings>
7 <templates_path>resources/gencfg/processors/boards/stm32f3xx/templates</templates_path>
8 <output_path>..</output_path>
9 <hal_version>5.0.x</hal_version>
10 </configuration_settings>
11 <board_name>STMicroelectronics STM32 Nucleo144-F303ZE</board_name>
12 <board_id>ST_NUCLEO144_F303ZE</board_id>
13 <board_functions></board_functions>
14 <subtype>STM32F303xE</subtype>
15 <clocks HSEFrequency="8000000" HSEBypass="true" LSEFrequency="0"
16 LSEBypass="false" LSEDrive="3 High Drive (default)" />
17 <ports>
18 <GPIOA>
19 <pin0
20 ID="ZIO_D32 TIM2_CH1"
21 Type="PushPull"
22 Level="High"
23 Speed="Maximum"
24 Resistor="PullUp"
25 Mode="Input"
26 Alternate="0" />
27 <pin1
28 ID="ZIO_D72 COMP1_IMP"
29 Type="PushPull"
30 Level="High"
31 Speed="Maximum"
32 Resistor="PullUp"
33 Mode="Input"
34 Alternate="0" />
35 <pin2
36 ID=""
37 Type="PushPull"
38 Level="High"
39 Speed="Minimum"
40 Resistor="PullUp"
41 Mode="Input"
42 Alternate="0" />
43 <pin3
44 ID="ARD_A0 ADC1_IN4"
45 Type="PushPull"
46 Level="High"
47 Speed="Maximum"
48 Resistor="PullUp"
49 Mode="Input"
50 Alternate="0" />
51 <pin4
52 ID="ZIO_D24 SPI3_NSS"
53 Type="PushPull"
54 Level="High"
55 Speed="Maximum"
56 Resistor="PullUp"
57 Mode="Input"
58 Alternate="0" />
59 <pin5
60 ID="ARD_D13 SPI1_SCK"
61 Type="PushPull"
62 Level="High"
63 Speed="Maximum"
64 Resistor="PullUp"
65 Mode="Input"
66 Alternate="0" />
67 <pin6
68 ID="ARD_D12 SPI1_MISO"
69 Type="PushPull"
70 Level="High"
71 Speed="Maximum"
72 Resistor="PullUp"
73 Mode="Input"
74 Alternate="0" />
75 <pin7
76 ID="ARD_D11 SPI1_MOSI ZIO_D71"
77 Type="PushPull"
78 Level="High"
79 Speed="Maximum"
80 Resistor="PullUp"
81 Mode="Input"
82 Alternate="0" />
83 <pin8
84 ID="ZIO_D70 I2C2_SMBAL"
85 Type="PushPull"
86 Level="High"
87 Speed="Maximum"
88 Resistor="PullUp"
89 Mode="Input"
90 Alternate="0" />
91 <pin9
92 ID="ZIO_D69 I2C2_SCL"
93 Type="PushPull"
94 Level="High"
95 Speed="Maximum"
96 Resistor="PullUp"
97 Mode="Input"
98 Alternate="0" />
99 <pin10
100 ID="ZIO_D68 I2C2_SDA"
101 Type="PushPull"
102 Level="High"
103 Speed="Maximum"
104 Resistor="PullUp"
105 Mode="Input"
106 Alternate="0" />
107 <pin11
108 ID="USB_DM"
109 Type="PushPull"
110 Speed="Maximum"
111 Resistor="Floating"
112 Level="High"
113 Mode="Alternate"
114 Alternate="14" />
115 <pin12
116 ID="USB_DP"
117 Type="PushPull"
118 Speed="Minimum"
119 Resistor="Floating"
120 Level="High"
121 Mode="Alternate"
122 Alternate="14" />
123 <pin13
124 ID="SWDIO"
125 Type="PushPull"
126 Level="High"
127 Speed="Maximum"
128 Resistor="Floating"
129 Mode="Alternate"
130 Alternate="0" />
131 <pin14
132 ID="SWCLK"
133 Type="PushPull"
134 Level="High"
135 Speed="Maximum"
136 Resistor="Floating"
137 Mode="Alternate"
138 Alternate="0" />
139 <pin15
140 ID="ZIO_D20 I2S3_WS"
141 Type="PushPull"
142 Level="High"
143 Speed="Maximum"
144 Resistor="PullUp"
145 Mode="Input"
146 Alternate="0" />
147 </GPIOA>
148 <GPIOB>
149 <pin0
150 ID="ZIO_D33 TIM3_CH3 LED1"
151 Type="PushPull"
152 Level="Low"
153 Speed="Maximum"
154 Resistor="Floating"
155 Mode="Output"
156 Alternate="0" />
157 <pin1
158 ID="ZIO_A6 ADC3_IN1"
159 Type="PushPull"
160 Level="High"
161 Speed="Maximum"
162 Resistor="PullUp"
163 Mode="Input"
164 Alternate="0" />
165 <pin2
166 ID="ZIO_D27"
167 Type="PushPull"
168 Level="High"
169 Speed="Minimum"
170 Resistor="PullUp"
171 Mode="Input"
172 Alternate="0" />
173 <pin3
174 ID="ZIO_D23 I2S3_CK"
175 Type="PushPull"
176 Level="High"
177 Speed="Maximum"
178 Resistor="PullUp"
179 Mode="Input"
180 Alternate="0" />
181 <pin4
182 ID="ZIO_D25 SPI3_MISO"
183 Type="PushPull"
184 Level="High"
185 Speed="Maximum"
186 Resistor="PullUp"
187 Mode="Input"
188 Alternate="0" />
189 <pin5
190 ID="ZIO_D22 I2S3_SD"
191 Type="PushPull"
192 Level="High"
193 Speed="Maximum"
194 Resistor="PullUp"
195 Mode="Input"
196 Alternate="0" />
197 <pin6
198 ID="ZIO_D26"
199 Type="PushPull"
200 Level="High"
201 Speed="Minimum"
202 Resistor="PullUp"
203 Mode="Input"
204 Alternate="0" />
205 <pin7
206 ID="LED2"
207 Type="PushPull"
208 Level="Low"
209 Speed="Maximum"
210 Resistor="Floating"
211 Mode="Output"
212 Alternate="0" />
213 <pin8
214 ID="ARD_D15 I2C1_SCL"
215 Type="PushPull"
216 Level="High"
217 Speed="Maximum"
218 Resistor="PullUp"
219 Mode="Input"
220 Alternate="0" />
221 <pin9
222 ID="ARD_D14 I2C1_SDA"
223 Type="PushPull"
224 Level="High"
225 Speed="Maximum"
226 Resistor="PullUp"
227 Mode="Input"
228 Alternate="0" />
229 <pin10
230 ID="ZIO_D36 TIM2_CH3"
231 Type="PushPull"
232 Level="High"
233 Speed="Maximum"
234 Resistor="PullUp"
235 Mode="Input"
236 Alternate="0" />
237 <pin11
238 ID="ZIO_D35 TIM2_CH4"
239 Type="PushPull"
240 Level="High"
241 Speed="Maximum"
242 Resistor="PullUp"
243 Mode="Input"
244 Alternate="0" />
245 <pin12
246 ID="ZIO_D19 I2S2_WS"
247 Type="PushPull"
248 Level="High"
249 Speed="Maximum"
250 Resistor="PullUp"
251 Mode="Input"
252 Alternate="0" />
253 <pin13
254 ID="ZIO_D18 I2S2_CK"
255 Type="PushPull"
256 Level="High"
257 Speed="Maximum"
258 Resistor="PullUp"
259 Mode="Input"
260 Alternate="0" />
261 <pin14
262 ID="LED3"
263 Type="PushPull"
264 Level="Low"
265 Speed="Maximum"
266 Resistor="Floating"
267 Mode="Output"
268 Alternate="0" />
269 <pin15
270 ID="ZIO_D17 I2S2_SD"
271 Type="PushPull"
272 Level="High"
273 Speed="Maximum"
274 Resistor="PullUp"
275 Mode="Input"
276 Alternate="0" />
277 </GPIOB>
278 <GPIOC>
279 <pin0
280 ID="ARD_A1 ADC12_IN6"
281 Type="PushPull"
282 Level="High"
283 Speed="Maximum"
284 Resistor="PullUp"
285 Mode="Input"
286 Alternate="0" />
287 <pin1
288 ID=""
289 Type="PushPull"
290 Level="High"
291 Speed="Minimum"
292 Resistor="PullUp"
293 Mode="Input"
294 Alternate="0" />
295 <pin2
296 ID="ZIO_A7 ADC12_IN8"
297 Type="PushPull"
298 Level="High"
299 Speed="Maximum"
300 Resistor="PullUp"
301 Mode="Input"
302 Alternate="0" />
303 <pin3
304 ID="ARD_A2 ADC12_IN9"
305 Type="PushPull"
306 Level="High"
307 Speed="Maximum"
308 Resistor="PullUp"
309 Mode="Input"
310 Alternate="0" />
311 <pin4
312 ID="ARD_D1 USART1_TX"
313 Type="PushPull"
314 Level="High"
315 Speed="Maximum"
316 Resistor="PullUp"
317 Mode="Input"
318 Alternate="0" />
319 <pin5
320 ID="ARD_D0 USART1_RX"
321 Type="PushPull"
322 Level="High"
323 Speed="Maximum"
324 Resistor="PullUp"
325 Mode="Input"
326 Alternate="0" />
327 <pin6
328 ID="ZIO_D16 I2S2_MCK"
329 Type="PushPull"
330 Level="High"
331 Speed="Maximum"
332 Resistor="PullUp"
333 Mode="Input"
334 Alternate="0" />
335 <pin7
336 ID="ZIO_D21 I2S3_MCK"
337 Type="PushPull"
338 Level="High"
339 Speed="Maximum"
340 Resistor="PullUp"
341 Mode="Input"
342 Alternate="0" />
343 <pin8
344 ID="ZIO_D43"
345 Type="PushPull"
346 Level="High"
347 Speed="Minimum"
348 Resistor="PullUp"
349 Mode="Input"
350 Alternate="0" />
351 <pin9
352 ID="ZIO_D44 I2S_CKIN"
353 Type="PushPull"
354 Level="High"
355 Speed="Maximum"
356 Resistor="PullUp"
357 Mode="Input"
358 Alternate="0" />
359 <pin10
360 ID="ZIO_D45"
361 Type="PushPull"
362 Level="High"
363 Speed="Minimum"
364 Resistor="PullUp"
365 Mode="Input"
366 Alternate="0" />
367 <pin11
368 ID="ZIO_D46"
369 Type="PushPull"
370 Level="High"
371 Speed="Minimum"
372 Resistor="PullUp"
373 Mode="Input"
374 Alternate="0" />
375 <pin12
376 ID="ZIO_D47"
377 Type="PushPull"
378 Level="High"
379 Speed="Minimum"
380 Resistor="PullUp"
381 Mode="Input"
382 Alternate="0" />
383 <pin13
384 ID="BUTTON"
385 Type="PushPull"
386 Level="High"
387 Speed="Maximum"
388 Resistor="Floating"
389 Mode="Input"
390 Alternate="0" />
391 <pin14
392 ID="OSC32_IN"
393 Type="PushPull"
394 Level="High"
395 Speed="Minimum"
396 Resistor="Floating"
397 Mode="Input"
398 Alternate="0" />
399 <pin15
400 ID="OSC32_OUT"
401 Type="PushPull"
402 Level="High"
403 Speed="Minimum"
404 Resistor="Floating"
405 Mode="Input"
406 Alternate="0" />
407 </GPIOC>
408 <GPIOD>
409 <pin0
410 ID="ZIO_D67 CAN1_RX"
411 Type="PushPull"
412 Level="High"
413 Speed="Maximum"
414 Resistor="PullUp"
415 Mode="Input"
416 Alternate="0" />
417 <pin1
418 ID="ZIO_D66 CAN1_TX"
419 Type="PushPull"
420 Level="High"
421 Speed="Maximum"
422 Resistor="PullUp"
423 Mode="Input"
424 Alternate="0" />
425 <pin2
426 ID="ZIO_D48"
427 Type="PushPull"
428 Level="High"
429 Speed="Minimum"
430 Resistor="PullUp"
431 Mode="Input"
432 Alternate="0" />
433 <pin3
434 ID="ZIO_D55 USART2_CTS"
435 Type="PushPull"
436 Level="High"
437 Speed="Maximum"
438 Resistor="PullUp"
439 Mode="Input"
440 Alternate="0" />
441 <pin4
442 ID="ZIO_D54 USART2_RTS"
443 Type="PushPull"
444 Level="High"
445 Speed="Maximum"
446 Resistor="PullUp"
447 Mode="Input"
448 Alternate="0" />
449 <pin5
450 ID="ZIO_D53 USART2_TX"
451 Type="PushPull"
452 Level="High"
453 Speed="Maximum"
454 Resistor="PullUp"
455 Mode="Input"
456 Alternate="0" />
457 <pin6
458 ID="ZIO_D52 USART2_RX"
459 Type="PushPull"
460 Level="High"
461 Speed="Maximum"
462 Resistor="PullUp"
463 Mode="Input"
464 Alternate="0" />
465 <pin7
466 ID="ZIO_D51 USART2_SCLK"
467 Type="PushPull"
468 Level="High"
469 Speed="Maximum"
470 Resistor="PullUp"
471 Mode="Input"
472 Alternate="0" />
473 <pin8
474 ID="USART3_RX STLK_RX"
475 Type="PushPull"
476 Level="High"
477 Speed="Maximum"
478 Resistor="Floating"
479 Mode="Alternate"
480 Alternate="7" />
481 <pin9
482 ID="USART3_TX STLK_TX"
483 Type="PushPull"
484 Level="High"
485 Speed="Maximum"
486 Resistor="Floating"
487 Mode="Alternate"
488 Alternate="7" />
489 <pin10
490 ID=""
491 Type="PushPull"
492 Level="High"
493 Speed="Minimum"
494 Resistor="PullUp"
495 Mode="Input"
496 Alternate="0" />
497 <pin11
498 ID="ARD_A3 ADC34_IN8"
499 Type="PushPull"
500 Level="High"
501 Speed="Maximum"
502 Resistor="PullUp"
503 Mode="Input"
504 Alternate="0" />
505 <pin12
506 ID="ARD_A4 ADC34_IN9"
507 Type="PushPull"
508 Level="High"
509 Speed="Maximum"
510 Resistor="PullUp"
511 Mode="Input"
512 Alternate="0" />
513 <pin13
514 ID="ARD_A5 ADC3_IN8"
515 Type="PushPull"
516 Level="High"
517 Speed="Maximum"
518 Resistor="PullUp"
519 Mode="Input"
520 Alternate="0" />
521 <pin14
522 ID="ARD_D10 SPI1_NSS"
523 Type="PushPull"
524 Level="High"
525 Speed="Maximum"
526 Resistor="PullUp"
527 Mode="Input"
528 Alternate="0" />
529 <pin15
530 ID="ARD_D9 TIM4_CH4"
531 Type="PushPull"
532 Level="High"
533 Speed="Maximum"
534 Resistor="PullUp"
535 Mode="Input"
536 Alternate="0" />
537 </GPIOD>
538 <GPIOE>
539 <pin0
540 ID="ZIO_D34 TIM4_ETR"
541 Type="PushPull"
542 Level="High"
543 Speed="Maximum"
544 Resistor="PullUp"
545 Mode="Input"
546 Alternate="0" />
547 <pin1
548 ID=""
549 Type="PushPull"
550 Level="High"
551 Speed="Minimum"
552 Resistor="PullUp"
553 Mode="Input"
554 Alternate="0" />
555 <pin2
556 ID="ZIO_D31 ZIO_D56"
557 Type="PushPull"
558 Level="High"
559 Speed="Minimum"
560 Resistor="PullUp"
561 Mode="Input"
562 Alternate="0" />
563 <pin3
564 ID="ZIO_D60"
565 Type="PushPull"
566 Level="High"
567 Speed="Minimum"
568 Resistor="PullUp"
569 Mode="Input"
570 Alternate="0" />
571 <pin4
572 ID="ZIO_D57"
573 Type="PushPull"
574 Level="High"
575 Speed="Minimum"
576 Resistor="PullUp"
577 Mode="Input"
578 Alternate="0" />
579 <pin5
580 ID="ZIO_D58"
581 Type="PushPull"
582 Level="High"
583 Speed="Minimum"
584 Resistor="PullUp"
585 Mode="Input"
586 Alternate="0" />
587 <pin6
588 ID="ZIO_D59"
589 Type="PushPull"
590 Level="High"
591 Speed="Minimum"
592 Resistor="PullUp"
593 Mode="Input"
594 Alternate="0" />
595 <pin7
596 ID="ZIO_D41 TIM1_ETR"
597 Type="PushPull"
598 Level="High"
599 Speed="Maximum"
600 Resistor="PullUp"
601 Mode="Input"
602 Alternate="0" />
603 <pin8
604 ID="ZIO_D42 TIM1_CH1N"
605 Type="PushPull"
606 Level="High"
607 Speed="Maximum"
608 Resistor="PullUp"
609 Mode="Input"
610 Alternate="0" />
611 <pin9
612 ID="ARD_D6 TIM1_CH1"
613 Type="PushPull"
614 Level="High"
615 Speed="Maximum"
616 Resistor="PullUp"
617 Mode="Input"
618 Alternate="0" />
619 <pin10
620 ID="ZIO_D40 TIM1_CH2N"
621 Type="PushPull"
622 Level="High"
623 Speed="Maximum"
624 Resistor="PullUp"
625 Mode="Input"
626 Alternate="0" />
627 <pin11
628 ID="ARD_D5 TIM1_CH2"
629 Type="PushPull"
630 Level="High"
631 Speed="Maximum"
632 Resistor="PullUp"
633 Mode="Input"
634 Alternate="0" />
635 <pin12
636 ID="ZIO_D39 TIM1_CH3N"
637 Type="PushPull"
638 Level="High"
639 Speed="Maximum"
640 Resistor="PullUp"
641 Mode="Input"
642 Alternate="0" />
643 <pin13
644 ID="ARD_D3 TIM1_CH3"
645 Type="PushPull"
646 Level="High"
647 Speed="Maximum"
648 Resistor="PullUp"
649 Mode="Input"
650 Alternate="0" />
651 <pin14
652 ID="ZIO_D38"
653 Type="PushPull"
654 Level="High"
655 Speed="Minimum"
656 Resistor="PullUp"
657 Mode="Input"
658 Alternate="0" />
659 <pin15
660 ID="ZIO_D37 TIM1_BKIN1"
661 Type="PushPull"
662 Level="High"
663 Speed="Maximum"
664 Resistor="PullUp"
665 Mode="Input"
666 Alternate="0" />
667 </GPIOE>
668 <GPIOF>
669 <pin0
670 ID=""
671 Type="PushPull"
672 Level="High"
673 Speed="Minimum"
674 Resistor="PullUp"
675 Mode="Input"
676 Alternate="0" />
677 <pin1
678 ID=""
679 Type="PushPull"
680 Level="High"
681 Speed="Minimum"
682 Resistor="PullUp"
683 Mode="Input"
684 Alternate="0" />
685 <pin2
686 ID=""
687 Type="PushPull"
688 Level="High"
689 Speed="Minimum"
690 Resistor="PullUp"
691 Mode="Input"
692 Alternate="0" />
693 <pin3
694 ID="ZIO_D30"
695 Type="PushPull"
696 Level="High"
697 Speed="Minimum"
698 Resistor="PullUp"
699 Mode="Input"
700 Alternate="0" />
701 <pin4
702 ID="ZIO_A8 ADC3_IN14"
703 Type="PushPull"
704 Level="High"
705 Speed="Maximum"
706 Resistor="PullUp"
707 Mode="Input"
708 Alternate="0" />
709 <pin5
710 ID="ZIO_D29"
711 Type="PushPull"
712 Level="High"
713 Speed="Minimum"
714 Resistor="PullUp"
715 Mode="Input"
716 Alternate="0" />
717 <pin6
718 ID=""
719 Type="PushPull"
720 Level="High"
721 Speed="Minimum"
722 Resistor="PullUp"
723 Mode="Input"
724 Alternate="0" />
725 <pin7
726 ID="ZIO_D62"
727 Type="PushPull"
728 Level="High"
729 Speed="Minimum"
730 Resistor="PullUp"
731 Mode="Input"
732 Alternate="0" />
733 <pin8
734 ID="ZIO_D61"
735 Type="PushPull"
736 Level="High"
737 Speed="Minimum"
738 Resistor="PullUp"
739 Mode="Input"
740 Alternate="0" />
741 <pin9
742 ID="ZIO_D63"
743 Type="PushPull"
744 Level="High"
745 Speed="Minimum"
746 Resistor="PullUp"
747 Mode="Input"
748 Alternate="0" />
749 <pin10
750 ID="ZIO_D28"
751 Type="PushPull"
752 Level="High"
753 Speed="Minimum"
754 Resistor="PullUp"
755 Mode="Input"
756 Alternate="0" />
757 <pin11
758 ID=""
759 Type="PushPull"
760 Level="High"
761 Speed="Minimum"
762 Resistor="PullUp"
763 Mode="Input"
764 Alternate="0" />
765 <pin12
766 ID="ARD_D8"
767 Type="PushPull"
768 Level="High"
769 Speed="Minimum"
770 Resistor="PullUp"
771 Mode="Input"
772 Alternate="0" />
773 <pin13
774 ID="ARD_D7"
775 Type="PushPull"
776 Level="High"
777 Speed="Minimum"
778 Resistor="PullUp"
779 Mode="Input"
780 Alternate="0" />
781 <pin14
782 ID="ARD_D4"
783 Type="PushPull"
784 Level="High"
785 Speed="Minimum"
786 Resistor="PullUp"
787 Mode="Input"
788 Alternate="0" />
789 <pin15
790 ID="ARD_D2"
791 Type="PushPull"
792 Level="High"
793 Speed="Minimum"
794 Resistor="PullUp"
795 Mode="Input"
796 Alternate="0" />
797 </GPIOF>
798 <GPIOG>
799 <pin0
800 ID="ZIO_D65"
801 Type="PushPull"
802 Level="High"
803 Speed="Minimum"
804 Resistor="PullUp"
805 Mode="Input"
806 Alternate="0" />
807 <pin1
808 ID="ZIO_D64"
809 Type="PushPull"
810 Level="High"
811 Speed="Minimum"
812 Resistor="PullUp"
813 Mode="Input"
814 Alternate="0" />
815 <pin2
816 ID="ZIO_D49"
817 Type="PushPull"
818 Level="High"
819 Speed="Minimum"
820 Resistor="PullUp"
821 Mode="Input"
822 Alternate="0" />
823 <pin3
824 ID="ZIO_D50"
825 Type="PushPull"
826 Level="High"
827 Speed="Minimum"
828 Resistor="PullUp"
829 Mode="Input"
830 Alternate="0" />
831 <pin4
832 ID=""
833 Type="PushPull"
834 Level="High"
835 Speed="Minimum"
836 Resistor="PullUp"
837 Mode="Input"
838 Alternate="0" />
839 <pin5
840 ID=""
841 Type="PushPull"
842 Level="High"
843 Speed="Minimum"
844 Resistor="PullUp"
845 Mode="Input"
846 Alternate="0" />
847 <pin6
848 ID="USB_GPIO_OUT"
849 Type="PushPull"
850 Level="High"
851 Speed="Maximum"
852 Resistor="Floating"
853 Mode="Output"
854 Alternate="0" />
855 <pin7
856 ID="USB_GPIO_IN"
857 Type="PushPull"
858 Level="High"
859 Speed="Maximum"
860 Resistor="PullUp"
861 Mode="Input"
862 Alternate="0" />
863 <pin8
864 ID=""
865 Type="PushPull"
866 Level="High"
867 Speed="Minimum"
868 Resistor="PullUp"
869 Mode="Input"
870 Alternate="0" />
871 <pin9
872 ID=""
873 Type="PushPull"
874 Level="High"
875 Speed="Minimum"
876 Resistor="PullUp"
877 Mode="Input"
878 Alternate="0" />
879 <pin10
880 ID=""
881 Type="PushPull"
882 Level="High"
883 Speed="Minimum"
884 Resistor="PullUp"
885 Mode="Input"
886 Alternate="0" />
887 <pin11
888 ID=""
889 Type="PushPull"
890 Level="High"
891 Speed="Minimum"
892 Resistor="PullUp"
893 Mode="Input"
894 Alternate="0" />
895 <pin12
896 ID=""
897 Type="PushPull"
898 Level="High"
899 Speed="Minimum"
900 Resistor="PullUp"
901 Mode="Input"
902 Alternate="0" />
903 <pin13
904 ID=""
905 Type="PushPull"
906 Level="High"
907 Speed="Minimum"
908 Resistor="PullUp"
909 Mode="Input"
910 Alternate="0" />
911 <pin14
912 ID=""
913 Type="PushPull"
914 Level="High"
915 Speed="Minimum"
916 Resistor="PullUp"
917 Mode="Input"
918 Alternate="0" />
919 <pin15
920 ID=""
921 Type="PushPull"
922 Level="High"
923 Speed="Minimum"
924 Resistor="PullUp"
925 Mode="Input"
926 Alternate="0" />
927 </GPIOG>
928 <GPIOH>
929 <pin0
930 ID="OSC_IN"
931 Type="PushPull"
932 Level="High"
933 Speed="Maximum"
934 Resistor="Floating"
935 Mode="Input"
936 Alternate="0" />
937 <pin1
938 ID="OSC_OUT"
939 Type="PushPull"
940 Level="High"
941 Speed="Maximum"
942 Resistor="Floating"
943 Mode="Input"
944 Alternate="0" />
945 <pin2
946 ID=""
947 Type="PushPull"
948 Level="High"
949 Speed="Minimum"
950 Resistor="PullUp"
951 Mode="Input"
952 Alternate="0" />
953 <pin3
954 ID=""
955 Type="PushPull"
956 Level="High"
957 Speed="Minimum"
958 Resistor="PullUp"
959 Mode="Input"
960 Alternate="0" />
961 <pin4
962 ID=""
963 Type="PushPull"
964 Level="High"
965 Speed="Minimum"
966 Resistor="PullUp"
967 Mode="Input"
968 Alternate="0" />
969 <pin5
970 ID=""
971 Type="PushPull"
972 Level="High"
973 Speed="Minimum"
974 Resistor="PullUp"
975 Mode="Input"
976 Alternate="0" />
977 <pin6
978 ID=""
979 Type="PushPull"
980 Level="High"
981 Speed="Minimum"
982 Resistor="PullUp"
983 Mode="Input"
984 Alternate="0" />
985 <pin7
986 ID=""
987 Type="PushPull"
988 Level="High"
989 Speed="Minimum"
990 Resistor="PullUp"
991 Mode="Input"
992 Alternate="0" />
993 <pin8
994 ID=""
995 Type="PushPull"
996 Level="High"
997 Speed="Minimum"
998 Resistor="PullUp"
999 Mode="Input"
1000 Alternate="0" />
1001 <pin9
1002 ID=""
1003 Type="PushPull"
1004 Level="High"
1005 Speed="Minimum"
1006 Resistor="PullUp"
1007 Mode="Input"
1008 Alternate="0" />
1009 <pin10
1010 ID=""
1011 Type="PushPull"
1012 Level="High"
1013 Speed="Minimum"
1014 Resistor="PullUp"
1015 Mode="Input"
1016 Alternate="0" />
1017 <pin11
1018 ID=""
1019 Type="PushPull"
1020 Level="High"
1021 Speed="Minimum"
1022 Resistor="PullUp"
1023 Mode="Input"
1024 Alternate="0" />
1025 <pin12
1026 ID=""
1027 Type="PushPull"
1028 Level="High"
1029 Speed="Minimum"
1030 Resistor="PullUp"
1031 Mode="Input"
1032 Alternate="0" />
1033 <pin13
1034 ID=""
1035 Type="PushPull"
1036 Level="High"
1037 Speed="Minimum"
1038 Resistor="PullUp"
1039 Mode="Input"
1040 Alternate="0" />
1041 <pin14
1042 ID=""
1043 Type="PushPull"
1044 Level="High"
1045 Speed="Minimum"
1046 Resistor="PullUp"
1047 Mode="Input"
1048 Alternate="0" />
1049 <pin15
1050 ID=""
1051 Type="PushPull"
1052 Level="High"
1053 Speed="Minimum"
1054 Resistor="PullUp"
1055 Mode="Input"
1056 Alternate="0" />
1057 </GPIOH>
1058 <GPIOI>
1059 <pin0
1060 ID=""
1061 Type="PushPull"
1062 Level="High"
1063 Speed="Minimum"
1064 Resistor="PullUp"
1065 Mode="Input"
1066 Alternate="0" />
1067 <pin1
1068 ID=""
1069 Type="PushPull"
1070 Level="High"
1071 Speed="Minimum"
1072 Resistor="PullUp"
1073 Mode="Input"
1074 Alternate="0" />
1075 <pin2
1076 ID=""
1077 Type="PushPull"
1078 Level="High"
1079 Speed="Minimum"
1080 Resistor="PullUp"
1081 Mode="Input"
1082 Alternate="0" />
1083 <pin3
1084 ID=""
1085 Type="PushPull"
1086 Level="High"
1087 Speed="Minimum"
1088 Resistor="PullUp"
1089 Mode="Input"
1090 Alternate="0" />
1091 <pin4
1092 ID=""
1093 Type="PushPull"
1094 Level="High"
1095 Speed="Minimum"
1096 Resistor="PullUp"
1097 Mode="Input"
1098 Alternate="0" />
1099 <pin5
1100 ID=""
1101 Type="PushPull"
1102 Level="High"
1103 Speed="Minimum"
1104 Resistor="PullUp"
1105 Mode="Input"
1106 Alternate="0" />
1107 <pin6
1108 ID=""
1109 Type="PushPull"
1110 Level="High"
1111 Speed="Minimum"
1112 Resistor="PullUp"
1113 Mode="Input"
1114 Alternate="0" />
1115 <pin7
1116 ID=""
1117 Type="PushPull"
1118 Level="High"
1119 Speed="Minimum"
1120 Resistor="PullUp"
1121 Mode="Input"
1122 Alternate="0" />
1123 <pin8
1124 ID=""
1125 Type="PushPull"
1126 Level="High"
1127 Speed="Minimum"
1128 Resistor="PullUp"
1129 Mode="Input"
1130 Alternate="0" />
1131 <pin9
1132 ID=""
1133 Type="PushPull"
1134 Level="High"
1135 Speed="Minimum"
1136 Resistor="PullUp"
1137 Mode="Input"
1138 Alternate="0" />
1139 <pin10
1140 ID=""
1141 Type="PushPull"
1142 Level="High"
1143 Speed="Minimum"
1144 Resistor="PullUp"
1145 Mode="Input"
1146 Alternate="0" />
1147 <pin11
1148 ID=""
1149 Type="PushPull"
1150 Level="High"
1151 Speed="Minimum"
1152 Resistor="PullUp"
1153 Mode="Input"
1154 Alternate="0" />
1155 <pin12
1156 ID=""
1157 Type="PushPull"
1158 Level="High"
1159 Speed="Minimum"
1160 Resistor="PullUp"
1161 Mode="Input"
1162 Alternate="0" />
1163 <pin13
1164 ID=""
1165 Type="PushPull"
1166 Level="High"
1167 Speed="Minimum"
1168 Resistor="PullUp"
1169 Mode="Input"
1170 Alternate="0" />
1171 <pin14
1172 ID=""
1173 Type="PushPull"
1174 Level="High"
1175 Speed="Minimum"
1176 Resistor="PullUp"
1177 Mode="Input"
1178 Alternate="0" />
1179 <pin15
1180 ID=""
1181 Type="PushPull"
1182 Level="High"
1183 Speed="Minimum"
1184 Resistor="PullUp"
1185 Mode="Input"
1186 Alternate="0" />
1187 </GPIOI>
1188 <GPIOJ>
1189 <pin0
1190 ID=""
1191 Type="PushPull"
1192 Level="High"
1193 Speed="Minimum"
1194 Resistor="PullUp"
1195 Mode="Input"
1196 Alternate="0" />
1197 <pin1
1198 ID=""
1199 Type="PushPull"
1200 Level="High"
1201 Speed="Minimum"
1202 Resistor="PullUp"
1203 Mode="Input"
1204 Alternate="0" />
1205 <pin2
1206 ID=""
1207 Type="PushPull"
1208 Level="High"
1209 Speed="Minimum"
1210 Resistor="PullUp"
1211 Mode="Input"
1212 Alternate="0" />
1213 <pin3
1214 ID=""
1215 Type="PushPull"
1216 Level="High"
1217 Speed="Minimum"
1218 Resistor="PullUp"
1219 Mode="Input"
1220 Alternate="0" />
1221 <pin4
1222 ID=""
1223 Type="PushPull"
1224 Level="High"
1225 Speed="Minimum"
1226 Resistor="PullUp"
1227 Mode="Input"
1228 Alternate="0" />
1229 <pin5
1230 ID=""
1231 Type="PushPull"
1232 Level="High"
1233 Speed="Minimum"
1234 Resistor="PullUp"
1235 Mode="Input"
1236 Alternate="0" />
1237 <pin6
1238 ID=""
1239 Type="PushPull"
1240 Level="High"
1241 Speed="Minimum"
1242 Resistor="PullUp"
1243 Mode="Input"
1244 Alternate="0" />
1245 <pin7
1246 ID=""
1247 Type="PushPull"
1248 Level="High"
1249 Speed="Minimum"
1250 Resistor="PullUp"
1251 Mode="Input"
1252 Alternate="0" />
1253 <pin8
1254 ID=""
1255 Type="PushPull"
1256 Level="High"
1257 Speed="Minimum"
1258 Resistor="PullUp"
1259 Mode="Input"
1260 Alternate="0" />
1261 <pin9
1262 ID=""
1263 Type="PushPull"
1264 Level="High"
1265 Speed="Minimum"
1266 Resistor="PullUp"
1267 Mode="Input"
1268 Alternate="0" />
1269 <pin10
1270 ID=""
1271 Type="PushPull"
1272 Level="High"
1273 Speed="Minimum"
1274 Resistor="PullUp"
1275 Mode="Input"
1276 Alternate="0" />
1277 <pin11
1278 ID=""
1279 Type="PushPull"
1280 Level="High"
1281 Speed="Minimum"
1282 Resistor="PullUp"
1283 Mode="Input"
1284 Alternate="0" />
1285 <pin12
1286 ID=""
1287 Type="PushPull"
1288 Level="High"
1289 Speed="Minimum"
1290 Resistor="PullUp"
1291 Mode="Input"
1292 Alternate="0" />
1293 <pin13
1294 ID=""
1295 Type="PushPull"
1296 Level="High"
1297 Speed="Minimum"
1298 Resistor="PullUp"
1299 Mode="Input"
1300 Alternate="0" />
1301 <pin14
1302 ID=""
1303 Type="PushPull"
1304 Level="High"
1305 Speed="Minimum"
1306 Resistor="PullUp"
1307 Mode="Input"
1308 Alternate="0" />
1309 <pin15
1310 ID=""
1311 Type="PushPull"
1312 Level="High"
1313 Speed="Minimum"
1314 Resistor="PullUp"
1315 Mode="Input"
1316 Alternate="0" />
1317 </GPIOJ>
1318 <GPIOK>
1319 <pin0
1320 ID=""
1321 Type="PushPull"
1322 Level="High"
1323 Speed="Minimum"
1324 Resistor="PullUp"
1325 Mode="Input"
1326 Alternate="0" />
1327 <pin1
1328 ID=""
1329 Type="PushPull"
1330 Level="High"
1331 Speed="Minimum"
1332 Resistor="PullUp"
1333 Mode="Input"
1334 Alternate="0" />
1335 <pin2
1336 ID=""
1337 Type="PushPull"
1338 Level="High"
1339 Speed="Minimum"
1340 Resistor="PullUp"
1341 Mode="Input"
1342 Alternate="0" />
1343 <pin3
1344 ID=""
1345 Type="PushPull"
1346 Level="High"
1347 Speed="Minimum"
1348 Resistor="PullUp"
1349 Mode="Input"
1350 Alternate="0" />
1351 <pin4
1352 ID=""
1353 Type="PushPull"
1354 Level="High"
1355 Speed="Minimum"
1356 Resistor="PullUp"
1357 Mode="Input"
1358 Alternate="0" />
1359 <pin5
1360 ID=""
1361 Type="PushPull"
1362 Level="High"
1363 Speed="Minimum"
1364 Resistor="PullUp"
1365 Mode="Input"
1366 Alternate="0" />
1367 <pin6
1368 ID=""
1369 Type="PushPull"
1370 Level="High"
1371 Speed="Minimum"
1372 Resistor="PullUp"
1373 Mode="Input"
1374 Alternate="0" />
1375 <pin7
1376 ID=""
1377 Type="PushPull"
1378 Level="High"
1379 Speed="Minimum"
1380 Resistor="PullUp"
1381 Mode="Input"
1382 Alternate="0" />
1383 <pin8
1384 ID=""
1385 Type="PushPull"
1386 Level="High"
1387 Speed="Minimum"
1388 Resistor="PullUp"
1389 Mode="Input"
1390 Alternate="0" />
1391 <pin9
1392 ID=""
1393 Type="PushPull"
1394 Level="High"
1395 Speed="Minimum"
1396 Resistor="PullUp"
1397 Mode="Input"
1398 Alternate="0" />
1399 <pin10
1400 ID=""
1401 Type="PushPull"
1402 Level="High"
1403 Speed="Minimum"
1404 Resistor="PullUp"
1405 Mode="Input"
1406 Alternate="0" />
1407 <pin11
1408 ID=""
1409 Type="PushPull"
1410 Level="High"
1411 Speed="Minimum"
1412 Resistor="PullUp"
1413 Mode="Input"
1414 Alternate="0" />
1415 <pin12
1416 ID=""
1417 Type="PushPull"
1418 Level="High"
1419 Speed="Minimum"
1420 Resistor="PullUp"
1421 Mode="Input"
1422 Alternate="0" />
1423 <pin13
1424 ID=""
1425 Type="PushPull"
1426 Level="High"
1427 Speed="Minimum"
1428 Resistor="PullUp"
1429 Mode="Input"
1430 Alternate="0" />
1431 <pin14
1432 ID=""
1433 Type="PushPull"
1434 Level="High"
1435 Speed="Minimum"
1436 Resistor="PullUp"
1437 Mode="Input"
1438 Alternate="0" />
1439 <pin15
1440 ID=""
1441 Type="PushPull"
1442 Level="High"
1443 Speed="Minimum"
1444 Resistor="PullUp"
1445 Mode="Input"
1446 Alternate="0" />
1447 </GPIOK>
1448 </ports>
1449</board>
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.fmpp b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.fmpp
new file mode 100644
index 000000000..6967f302d
--- /dev/null
+++ b/lib/chibios/os/hal/boards/ST_NUCLEO144_F303ZE/cfg/board.fmpp
@@ -0,0 +1,15 @@
1sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f3xx/templates
2outputRoot: ..
3dataRoot: .
4
5freemarkerLinks: {
6 lib: ../../../../../tools/ftl/libs
7}
8
9data : {
10 doc1:xml (
11 board.chcfg
12 {
13 }
14 )
15}