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