Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 070d0b1

Browse files
committedMay 25, 2023
variant(H5): add STM32H573I-DK support
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 42458e0 commit 070d0b1

File tree

5 files changed

+1391
-0
lines changed

5 files changed

+1391
-0
lines changed
 

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
166166
| :green_heart: | STM32F746NG | [STM32F746G-DISCOVERY](http://www.st.com/en/evaluation-tools/32f746gdiscovery.html) | *0.1.0* | |
167167
| :green_heart: | STM32G031J6 | [STM32G0316-DISCO](https://www.st.com/en/evaluation-tools/stm32g0316-disco.html) | *1.9.0* | |
168168
| :green_heart: | STM32G431CB | [B-G431B-ESC1](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html) | *2.0.0* | |
169+
| :yellow_heart: | STM32H573IIKxQ | [STM32H573I-DK](https://www.st.com/en/evaluation-tools/stm32h573i-dk.html) | **2.6.0** | |
169170
| :green_heart: | STM32L4S5VI | [B-L4S5I-IOT01A](https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html) | *2.0.0* | |
170171
| :green_heart: | STM32U585AIIxQ | [B-U585I-IOT02A](https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html) | *2.1.0* | |
171172
| :green_heart: | STM32WB5MMG | [STM32WB5MM-DK](https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html) | *2.1.0* | |

‎boards.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,21 @@ Disco.menu.pnum.DISCO_G0316.build.variant=STM32G0xx/G031J(4-6)M_G041J6M
10491049
Disco.menu.pnum.DISCO_G0316.build.cmsis_lib_gcc=arm_cortexM0l_math
10501050
Disco.menu.pnum.DISCO_G0316.build.st_extra_flags=-D{build.product_line} {build.xSerial} -D__CORTEX_SC=0
10511051

1052+
# STM32H573I-DK
1053+
Disco.menu.pnum.STM32H573I_DK=STM32H573I-DK
1054+
Disco.menu.pnum.STM32H573I_DK.node=DIS_H573II
1055+
Disco.menu.pnum.STM32H573I_DK.upload.maximum_size=2097152
1056+
Disco.menu.pnum.STM32H573I_DK.upload.maximum_data_size=655360
1057+
Disco.menu.pnum.STM32H573I_DK.build.mcu=cortex-m33
1058+
Disco.menu.pnum.STM32H573I_DK.build.fpu=-mfpu=fpv4-sp-d16
1059+
Disco.menu.pnum.STM32H573I_DK.build.float-abi=-mfloat-abi=hard
1060+
Disco.menu.pnum.STM32H573I_DK.build.board=STM32H573I_DK
1061+
Disco.menu.pnum.STM32H573I_DK.build.series=STM32H5xx
1062+
Disco.menu.pnum.STM32H573I_DK.build.product_line=STM32H573xx
1063+
Disco.menu.pnum.STM32H573I_DK.build.variant=STM32H5xx/H563IIKxQ_H573IIKxQ
1064+
Disco.menu.pnum.STM32H573I_DK.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
1065+
Disco.menu.pnum.STM32H573I_DK.build.cmsis_lib_gcc=arm_ARMv8MMLlfsp_math
1066+
10521067
# STM32WB5MM-DK board
10531068
Disco.menu.pnum.STM32WB5MM_DK=STM32WB5MM-DK
10541069
Disco.menu.pnum.STM32WB5MM_DK.node="DIS_WB5MMG"

‎variants/STM32H5xx/H563IIKxQ_H573IIKxQ/PeripheralPins_STM32H573I_DK.c

Lines changed: 758 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2023, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
#if defined(ARDUINO_STM32H573I_DK)
14+
#include "pins_arduino.h"
15+
16+
// Digital PinName array
17+
const PinName digitalPin[] = {
18+
// CN15 Arduino connector
19+
PB_11, // D0
20+
PB_10, // D1
21+
PG_15, // D2
22+
PB_5, // D3
23+
PG_4, // D4
24+
PH_11, // D5
25+
PH_10, // D6
26+
PG_5, // D7
27+
// CN13 Arduino connector
28+
PG_8, // D8
29+
PA_8, // D9
30+
PA_3, // D10/A6
31+
PB_15, // D11
32+
PI_2, // D12
33+
PI_1, // D13
34+
PB_7, // D14
35+
PB_6, // D15
36+
// CN16 Arduino connector
37+
PB_0, // D16/A0
38+
PA_4, // D17/A1
39+
PA_0, // D18/A2
40+
PA_5, // D19/A3
41+
PA_6, // D20/A4
42+
PF_12, // D21/A5
43+
// User button,
44+
PC_13, // D22
45+
// User LED,
46+
PI_8, // D23
47+
PI_9, // D24
48+
PF_1, // D25
49+
PF_4, // D26
50+
// OSPI,
51+
PG_6, // D27
52+
PF_10, // D28
53+
PB_2, // D29
54+
PB_1, // D30
55+
PD_12, // D31
56+
PC_2, // D32
57+
PD_13, // D33
58+
PH_2, // D34
59+
PH_3, // D35
60+
PG_9, // D36
61+
PC_0, // D37
62+
// microSD,
63+
PC_8, // D38
64+
PC_9, // D39
65+
PC_10, // D40
66+
PC_11, // D41
67+
PC_12, // D42
68+
PD_2, // D43
69+
PH_14, // D44
70+
// Audio,
71+
PI_4, // D45
72+
PI_5, // D46
73+
PI_7, // D47
74+
PI_6, // D48
75+
PG_10, // D49
76+
PI_11, // D50
77+
// I2C4,
78+
PB_8, // D51
79+
PB_9, // D52
80+
// Microphone,
81+
PD_6, // D53
82+
PD_11, // D54
83+
PE_0, // D55
84+
PE_1, // D56
85+
PC_3, // D57
86+
PE_4, // D58
87+
// RMII,
88+
PG_11, // D59
89+
PG_13, // D60
90+
PG_12, // D61
91+
PC_4, // D62
92+
PC_5, // D63
93+
PI_10, // D64
94+
PA_7, // D65
95+
PC_1, // D66
96+
PA_2, // D67
97+
PA_1, // D68
98+
// TFT LCD,
99+
PD_14, // D69
100+
PD_15, // D70
101+
PD_0, // D71
102+
PD_1, // D72
103+
PE_7, // D73
104+
PE_8, // D74
105+
PE_9, // D75
106+
PE_10, // D76
107+
PE_11, // D77
108+
PE_12, // D78
109+
PE_13, // D79
110+
PE_14, // D80
111+
PE_15, // D81
112+
PD_8, // D82
113+
PD_9, // D83
114+
PD_10, // D84
115+
PD_3, // D85
116+
PD_4, // D86
117+
PD_5, // D87
118+
PC_7, // D88
119+
PF_0, // D89
120+
PH_13, // D90
121+
// Backlight driver,
122+
PI_3, // D91
123+
// Touch panel connector,
124+
PG_3, // D92
125+
PG_7, // D93
126+
// LCD PWR enable,
127+
PC_6, // D94
128+
// PMOD,
129+
PF_6, // D95
130+
PF_9, // D96
131+
PF_7, // D97
132+
PF_8, // D98
133+
PH_8, // D99
134+
PH_7, // D100
135+
PH_9, // D101
136+
PH_6, // D102
137+
PF_11, // D103/A7
138+
PH_12, // D104
139+
PF_3, // D105
140+
PB_12, // D106
141+
PH_4, // D107
142+
PH_5, // D108
143+
// VCP,
144+
PA_9, // D109
145+
PA_10, // D110
146+
// USB,
147+
PA_11, // D111
148+
PA_12, // D112
149+
PG_0, // D113
150+
PF_13, // D114/A8
151+
PB_13, // D115
152+
PB_14, // D116
153+
PG_1, // D117
154+
PF_14, // D118/A9
155+
// JTAG,
156+
PA_13, // D119
157+
PA_14, // D120
158+
PA_15, // D121
159+
PB_3, // D122
160+
PB_4, // D123
161+
PE_2, // D124
162+
PE_3, // D125
163+
PG_14, // D126
164+
PE_5, // D127
165+
PE_6, // D128
166+
// Clock,
167+
PH_0, // D129
168+
PC_14, // D130
169+
PC_15 // D131
170+
};
171+
172+
// Analog (Ax) pin number array
173+
const uint32_t analogInputPin[] = {
174+
16, // A0, PB0
175+
17, // A1, PA4
176+
18, // A2, PA0
177+
19, // A3, PA5
178+
20, // A4, PA6
179+
21, // A5, PF12
180+
10, // A6, PA3
181+
103, // A7, PF11
182+
114, // A8, PF13
183+
118 // A9, PF14
184+
};
185+
186+
// ----------------------------------------------------------------------------
187+
#ifdef __cplusplus
188+
extern "C" {
189+
#endif
190+
191+
/**
192+
* @brief System Clock Configuration
193+
* @param None
194+
* @retval None
195+
*/
196+
WEAK void SystemClock_Config(void)
197+
{
198+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
199+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
200+
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
201+
202+
/** Configure the main internal regulator output voltage
203+
*/
204+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
205+
206+
while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
207+
208+
/** Initializes the RCC Oscillators according to the specified parameters
209+
* in the RCC_OscInitTypeDef structure.
210+
*/
211+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSI
212+
| RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_CSI;
213+
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS_DIGITAL;
214+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
215+
RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
216+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
217+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
218+
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
219+
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
220+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
221+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_HSE;
222+
RCC_OscInitStruct.PLL.PLLM = 5;
223+
RCC_OscInitStruct.PLL.PLLN = 100;
224+
RCC_OscInitStruct.PLL.PLLP = 2;
225+
RCC_OscInitStruct.PLL.PLLQ = 2;
226+
RCC_OscInitStruct.PLL.PLLR = 2;
227+
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1_VCIRANGE_2;
228+
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1_VCORANGE_WIDE;
229+
RCC_OscInitStruct.PLL.PLLFRACN = 0;
230+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
231+
Error_Handler();
232+
}
233+
234+
/** Initializes the CPU, AHB and APB buses clocks
235+
*/
236+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
237+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2
238+
| RCC_CLOCKTYPE_PCLK3;
239+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
240+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
241+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
242+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
243+
RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1;
244+
245+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
246+
Error_Handler();
247+
}
248+
/** Initializes the peripherals clock
249+
*/
250+
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_SAI1
251+
| RCC_PERIPHCLK_SAI2 | RCC_PERIPHCLK_SDMMC1
252+
| RCC_PERIPHCLK_USB;
253+
PeriphClkInitStruct.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_CSI;
254+
PeriphClkInitStruct.PLL2.PLL2Source = RCC_PLL2_SOURCE_CSI;
255+
PeriphClkInitStruct.PLL2.PLL2M = 1;
256+
PeriphClkInitStruct.PLL2.PLL2N = 32;
257+
PeriphClkInitStruct.PLL2.PLL2P = 1;
258+
PeriphClkInitStruct.PLL2.PLL2Q = 2;
259+
PeriphClkInitStruct.PLL2.PLL2R = 2;
260+
PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2_VCIRANGE_2;
261+
PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2_VCORANGE_WIDE;
262+
PeriphClkInitStruct.PLL2.PLL2FRACN = 0;
263+
PeriphClkInitStruct.PLL2.PLL2ClockOut = RCC_PLL2_DIVP;
264+
PeriphClkInitStruct.Sai1ClockSelection = RCC_SAI1CLKSOURCE_PLL2P;
265+
PeriphClkInitStruct.Sai2ClockSelection = RCC_SAI2CLKSOURCE_PLL2P;
266+
PeriphClkInitStruct.Sdmmc1ClockSelection = RCC_SDMMC1CLKSOURCE_PLL1Q;
267+
PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
268+
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
269+
Error_Handler();
270+
}
271+
}
272+
273+
#ifdef __cplusplus
274+
}
275+
#endif
276+
#endif /* ARDUINO_STM32H573I_DK */
Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2023, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
#pragma once
14+
15+
/*----------------------------------------------------------------------------
16+
* STM32 pins number
17+
*----------------------------------------------------------------------------*/
18+
// CN15 Arduino connector
19+
#define PB11 0
20+
#define PB10 1
21+
#define PG15 2
22+
#define PB5 3
23+
#define PG4 4
24+
#define PH11 5
25+
#define PH10 6
26+
#define PG5 7
27+
// CN13 Arduino connector
28+
#define PG8 8
29+
#define PA8 9
30+
#define PA3 PIN_A6
31+
#define PB15 11
32+
#define PI2 12
33+
#define PI1 13
34+
#define PB7 14 // STMOD#10
35+
#define PB6 15 // STMOD#7
36+
// CN16 Arduino connector
37+
#define PB0 PIN_A0
38+
#define PA4 PIN_A1
39+
#define PA0 PIN_A2
40+
#define PA5 PIN_A3
41+
#define PA6 PIN_A4
42+
#define PF12 PIN_A5
43+
// User button
44+
#define PC13 22 // USER_BTN
45+
// User LED
46+
#define PI8 23 // LD1 Green
47+
#define PI9 24 // LD2 Orange
48+
#define PF1 25 // LD3 Red
49+
#define PF4 26 // LD4 Blue
50+
// OSPI
51+
#define PG6 27 // OSPI_NCS
52+
#define PF10 28 // OSPI_CLK
53+
#define PB2 29 // OSPI_DQS
54+
#define PB1 30 // OSPI_IO0
55+
#define PD12 31 // OSPI_IO1
56+
#define PC2 32 // OSPI_IO2
57+
#define PD13 33 // OSPI_IO3
58+
#define PH2 34 // OSPI_IO4
59+
#define PH3 35 // OSPI_IO5
60+
#define PG9 36 // OSPI_IO6
61+
#define PC0 37 // OSPI_IO7
62+
// microSD
63+
#define PC8 38 // SDMMC_D0
64+
#define PC9 39 // SDMMC_D1
65+
#define PC10 40 // SDMMC_D2
66+
#define PC11 41 // SDMMC_D3
67+
#define PC12 42 // SDMMC_CK
68+
#define PD2 43 // SDMMC_CMD
69+
#define PH14 44 // SDMMC_Detect
70+
// Audio
71+
#define PI4 45 // SAI2_MCLK_A
72+
#define PI5 46 // SAI2_SCK_A
73+
#define PI7 47 // SAI2_FS_A
74+
#define PI6 48 // SAI2_SD_A
75+
#define PG10 49 // SAI2_SD_B
76+
#define PI11 50 // AUDIO_NRST
77+
// I2C4
78+
#define PB8 51 // I2C4_SCL
79+
#define PB9 52 // I2C4_SDA
80+
// Microphone
81+
#define PD6 53 // PDM_SAI1_CK1
82+
#define PD11 54 // PDM_SAI1_SD1
83+
#define PE0 55 // DETECTn
84+
#define PE1 56 // MEMS_LED
85+
#define PC3 57 // PDM_SAI1_SD3
86+
#define PE4 58 // PDM_SAI1_SD2
87+
// RMII
88+
#define PG11 59 // RMII_TX_EN
89+
#define PG13 60 // RMII_TXD0
90+
#define PG12 61 // RMII_TXD1
91+
#define PC4 62 // RMII_RXD0
92+
#define PC5 63 // RMII_RXD1
93+
#define PI10 64 // RMII_RX_ER
94+
#define PA7 65 // RMII_CRS_DV
95+
#define PC1 66 // RMII_MDC
96+
#define PA2 67 // RMII_MDIO
97+
#define PA1 68 // RMII_REF_CLK
98+
// TFT LCD
99+
#define PD14 69 // LCD_D0
100+
#define PD15 70 // LCD_D1
101+
#define PD0 71 // LCD_D2
102+
#define PD1 72 // LCD_D3
103+
#define PE7 73 // LCD_D4
104+
#define PE8 74 // LCD_D5
105+
#define PE9 75 // LCD_D6
106+
#define PE10 76 // LCD_D7
107+
#define PE11 77 // LCD_D8
108+
#define PE12 78 // LCD_D9
109+
#define PE13 79 // LCD_D10
110+
#define PE14 80 // LCD_D11
111+
#define PE15 81 // LCD_D12
112+
#define PD8 82 // LCD_D13
113+
#define PD9 83 // LCD_D14
114+
#define PD10 84 // LCD_D15
115+
#define PD3 85 // LCD_TE
116+
#define PD4 86 // LCD_NOE
117+
#define PD5 87 // LCD_NWE
118+
#define PC7 88 // LCD_NE1_CS
119+
#define PF0 89 // LCD_A0_RS
120+
#define PH13 90 // LCD_RST
121+
// Backlight driver
122+
#define PI3 91 // LCD_BL_CTRL
123+
// Touch panel connector
124+
#define PG3 92 // LCD_CTP_RST
125+
#define PG7 93 // LCD_CTP_INT
126+
// LCD PWR enable
127+
#define PC6 94 // LCD_PWR_ON
128+
// PMOD
129+
#define PF6 95 // STMOD#1
130+
#define PF9 96 // STMOD#2
131+
#define PF7 97 // STMOD#3
132+
#define PF8 98 // STMOD#4
133+
#define PH8 99 // STMOD#8
134+
#define PH7 100 // STMOD#9
135+
#define PH9 101 // STMOD#11
136+
#define PH6 102 // STMOD#12
137+
#define PF11 PIN_A7 // STMOD#13
138+
#define PH12 104 // STMOD#14
139+
#define PF3 105 // STMOD#17
140+
#define PB12 106 // STMOD#18
141+
#define PH4 107 // STMOD#19
142+
#define PH5 108 // STMOD#20
143+
// VCP
144+
#define PA9 109 // VCP_TX
145+
#define PA10 110 // VCP_RX
146+
// USB
147+
#define PA11 111 // USB_FS_N
148+
#define PA12 112 // USB_FS_P
149+
#define PG0 113 // UCPD_PWR
150+
#define PF13 PIN_A8 // IBUS_SENSE
151+
#define PB13 115 // UCPD_CC1
152+
#define PB14 116 // UCPD_CC2
153+
#define PG1 117 // UCPD_FLT
154+
#define PF14 PIN_A9 // VBUS_SENSE
155+
// JTAG
156+
#define PA13 119 // JTMS
157+
#define PA14 120 // JTCK
158+
#define PA15 121 // JTDI
159+
#define PB3 122 // JTDO
160+
#define PB4 123 // NJTRST
161+
#define PE2 124 // TRACECLK
162+
#define PE3 125 // TRACED0
163+
#define PG14 126 // TRACED1
164+
#define PE5 127 // TRACED2
165+
#define PE6 128 // TRACED3
166+
// Clock
167+
#define PH0 129 // OCS_25M
168+
#define PC14 130 // OSC32_IN
169+
#define PC15 131 // OSC32_OUT
170+
// Not connected
171+
// PD7
172+
// PF2
173+
// PF5
174+
// PF15
175+
// PG2
176+
// PH1
177+
// PH15
178+
179+
// Alternate pins number
180+
#define PA0_ALT1 (PA0 | ALT1)
181+
#define PA1_ALT1 (PA1 | ALT1)
182+
#define PA1_ALT2 (PA1 | ALT2)
183+
#define PA2_ALT1 (PA2 | ALT1)
184+
#define PA2_ALT2 (PA2 | ALT2)
185+
#define PA3_ALT1 (PA3 | ALT1)
186+
#define PA3_ALT2 (PA3 | ALT2)
187+
#define PA4_ALT1 (PA4 | ALT1)
188+
#define PA4_ALT2 (PA4 | ALT2)
189+
#define PA5_ALT1 (PA5 | ALT1)
190+
#define PA6_ALT1 (PA6 | ALT1)
191+
#define PA7_ALT1 (PA7 | ALT1)
192+
#define PA7_ALT2 (PA7 | ALT2)
193+
#define PA7_ALT3 (PA7 | ALT3)
194+
#define PA9_ALT1 (PA9 | ALT1)
195+
#define PA10_ALT1 (PA10 | ALT1)
196+
#define PA11_ALT1 (PA11 | ALT1)
197+
#define PA12_ALT1 (PA12 | ALT1)
198+
#define PA15_ALT1 (PA15 | ALT1)
199+
#define PA15_ALT2 (PA15 | ALT2)
200+
#define PB0_ALT1 (PB0 | ALT1)
201+
#define PB0_ALT2 (PB0 | ALT2)
202+
#define PB1_ALT1 (PB1 | ALT1)
203+
#define PB1_ALT2 (PB1 | ALT2)
204+
#define PB3_ALT1 (PB3 | ALT1)
205+
#define PB3_ALT2 (PB3 | ALT2)
206+
#define PB4_ALT1 (PB4 | ALT1)
207+
#define PB4_ALT2 (PB4 | ALT2)
208+
#define PB5_ALT1 (PB5 | ALT1)
209+
#define PB5_ALT2 (PB5 | ALT2)
210+
#define PB6_ALT1 (PB6 | ALT1)
211+
#define PB6_ALT2 (PB6 | ALT2)
212+
#define PB7_ALT1 (PB7 | ALT1)
213+
#define PB8_ALT1 (PB8 | ALT1)
214+
#define PB8_ALT2 (PB8 | ALT2)
215+
#define PB9_ALT1 (PB9 | ALT1)
216+
#define PB9_ALT2 (PB9 | ALT2)
217+
#define PB9_ALT3 (PB9 | ALT3)
218+
#define PB14_ALT1 (PB14 | ALT1)
219+
#define PB14_ALT2 (PB14 | ALT2)
220+
#define PB15_ALT1 (PB15 | ALT1)
221+
#define PB15_ALT2 (PB15 | ALT2)
222+
#define PC0_ALT1 (PC0 | ALT1)
223+
#define PC1_ALT1 (PC1 | ALT1)
224+
#define PC2_ALT1 (PC2 | ALT1)
225+
#define PC3_ALT1 (PC3 | ALT1)
226+
#define PC4_ALT1 (PC4 | ALT1)
227+
#define PC5_ALT1 (PC5 | ALT1)
228+
#define PC6_ALT1 (PC6 | ALT1)
229+
#define PC6_ALT2 (PC6 | ALT2)
230+
#define PC7_ALT1 (PC7 | ALT1)
231+
#define PC7_ALT2 (PC7 | ALT2)
232+
#define PC8_ALT1 (PC8 | ALT1)
233+
#define PC9_ALT1 (PC9 | ALT1)
234+
#define PC10_ALT1 (PC10 | ALT1)
235+
#define PC11_ALT1 (PC11 | ALT1)
236+
#define PF8_ALT1 (PF8 | ALT1)
237+
#define PF9_ALT1 (PF9 | ALT1)
238+
#define PG13_ALT1 (PG13 | ALT1)
239+
#define PH6_ALT1 (PH6 | ALT1)
240+
#define PH6_ALT2 (PH6 | ALT2)
241+
#define PH7_ALT1 (PH7 | ALT1)
242+
#define PH8_ALT1 (PH8 | ALT1)
243+
#define PH9_ALT1 (PH9 | ALT1)
244+
#define PH9_ALT2 (PH9 | ALT2)
245+
#define PH10_ALT1 (PH10 | ALT1)
246+
#define PH10_ALT2 (PH10 | ALT2)
247+
#define PH11_ALT1 (PH11 | ALT1)
248+
#define PH11_ALT2 (PH11 | ALT2)
249+
#define PH12_ALT1 (PH12 | ALT1)
250+
#define PH13_ALT1 (PH13 | ALT1)
251+
252+
#define NUM_DIGITAL_PINS 132
253+
#define NUM_ANALOG_INPUTS 10
254+
255+
// On-board LED pin number
256+
#define LED1 PI9
257+
#define LED_GREEN LED1
258+
#define LED2 PI8
259+
#define LED_ORANGE LED2
260+
#define LED3 PF1
261+
#define LED_RED LED3
262+
#define LED4 PF4
263+
#define LED_BLUE LED3
264+
#ifndef LED_BUILTIN
265+
#define LED_BUILTIN LED_GREEN
266+
#endif
267+
268+
// On-board user button
269+
#ifndef USER_BTN
270+
#define USER_BTN PC13
271+
#endif
272+
273+
// Timer Definitions
274+
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
275+
#ifndef TIMER_TONE
276+
#define TIMER_TONE TIM6
277+
#endif
278+
#ifndef TIMER_SERVO
279+
#define TIMER_SERVO TIM7
280+
#endif
281+
282+
// UART Definitions
283+
#ifndef SERIAL_UART_INSTANCE
284+
#define SERIAL_UART_INSTANCE 101
285+
#endif
286+
287+
// Default pin used for generic 'Serial' instance
288+
// Mandatory for Firmata
289+
#ifndef PIN_SERIAL_RX
290+
#define PIN_SERIAL_RX PA10
291+
#endif
292+
#ifndef PIN_SERIAL_TX
293+
#define PIN_SERIAL_TX PA9
294+
#endif
295+
296+
// SD detect signal
297+
#ifndef SD_DETECT_PIN
298+
#define SD_DETECT_PIN PH14
299+
#endif
300+
301+
// Extra HAL modules
302+
#if !defined(HAL_DAC_MODULE_DISABLED)
303+
#define HAL_DAC_MODULE_ENABLED
304+
#endif
305+
#if !defined(HAL_ETH_MODULE_DISABLED)
306+
#define HAL_ETH_MODULE_ENABLED
307+
#endif
308+
#if !defined(HAL_OSPI_MODULE_DISABLED)
309+
#define HAL_OSPI_MODULE_ENABLED
310+
#endif
311+
#if !defined(HAL_SD_MODULE_DISABLED)
312+
#define HAL_SD_MODULE_ENABLED
313+
#endif
314+
315+
/*----------------------------------------------------------------------------
316+
* Arduino objects - C++ only
317+
*----------------------------------------------------------------------------*/
318+
319+
#ifdef __cplusplus
320+
// These serial port names are intended to allow libraries and architecture-neutral
321+
// sketches to automatically default to the correct port name for a particular type
322+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
323+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
324+
//
325+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
326+
//
327+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
328+
//
329+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
330+
//
331+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
332+
//
333+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
334+
// pins are NOT connected to anything by default.
335+
#ifndef SERIAL_PORT_MONITOR
336+
#define SERIAL_PORT_MONITOR Serial
337+
#endif
338+
#ifndef SERIAL_PORT_HARDWARE
339+
#define SERIAL_PORT_HARDWARE Serial
340+
#endif
341+
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.