Skip to content

Commit 776f02c

Browse files
committed
variants(WBA): add all generated STM32WBAxx generic variant files
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 6f9e43c commit 776f02c

30 files changed

+2653
-0
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2020, 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+
/*
14+
* Automatically generated from STM32WBA50KEUx.xml, STM32WBA50KGUx.xml
15+
* CubeMX DB release 6.0.100
16+
*/
17+
#if !defined(CUSTOM_PERIPHERAL_PINS)
18+
#include "Arduino.h"
19+
#include "PeripheralPins.h"
20+
21+
/* =====
22+
* Notes:
23+
* - The pins mentioned Px_y_ALTz are alternative possibilities which use other
24+
* HW peripheral instances. You can use them the same way as any other "normal"
25+
* pin (i.e. analogWrite(PA7_ALT1, 128);).
26+
*
27+
* - Commented lines are alternative possibilities which are not used per default.
28+
* If you change them, you will have to know what you do
29+
* =====
30+
*/
31+
32+
//*** ADC ***
33+
34+
#ifdef HAL_ADC_MODULE_ENABLED
35+
WEAK const PinMap PinMap_ADC[] = {
36+
{PA_0, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC4_IN9
37+
{PA_1, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC4_IN8
38+
{PA_2, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC4_IN7
39+
{PA_5, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC4_IN4
40+
{PA_6, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC4_IN3
41+
{PA_7, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC4_IN2
42+
{PA_8, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC4_IN1
43+
{PB_9, ADC4, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC4_IN10
44+
{NC, NP, 0}
45+
};
46+
#endif
47+
48+
//*** No DAC ***
49+
50+
//*** I2C ***
51+
52+
#ifdef HAL_I2C_MODULE_ENABLED
53+
WEAK const PinMap PinMap_I2C_SDA[] = {
54+
{PA_7, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
55+
{NC, NP, 0}
56+
};
57+
#endif
58+
59+
#ifdef HAL_I2C_MODULE_ENABLED
60+
WEAK const PinMap PinMap_I2C_SCL[] = {
61+
{PA_6, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
62+
{NC, NP, 0}
63+
};
64+
#endif
65+
66+
//*** No I3C ***
67+
68+
//*** TIM ***
69+
70+
#ifdef HAL_TIM_MODULE_ENABLED
71+
WEAK const PinMap PinMap_TIM[] = {
72+
{PA_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
73+
{PA_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
74+
{PA_2, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
75+
{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
76+
{PA_6, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
77+
{PA_7, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
78+
{PA_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
79+
{PA_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
80+
{PB_3, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
81+
{PB_4, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
82+
{PB_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
83+
{PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N
84+
{PB_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
85+
{PB_9_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
86+
{PB_12, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
87+
{NC, NP, 0}
88+
};
89+
#endif
90+
91+
//*** UART ***
92+
93+
#ifdef HAL_UART_MODULE_ENABLED
94+
WEAK const PinMap PinMap_UART_TX[] = {
95+
{PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
96+
{PB_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
97+
{NC, NP, 0}
98+
};
99+
#endif
100+
101+
#ifdef HAL_UART_MODULE_ENABLED
102+
WEAK const PinMap PinMap_UART_RX[] = {
103+
{PA_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
104+
{PA_8, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
105+
{NC, NP, 0}
106+
};
107+
#endif
108+
109+
#ifdef HAL_UART_MODULE_ENABLED
110+
WEAK const PinMap PinMap_UART_RTS[] = {
111+
{PA_2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
112+
{PA_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
113+
{PB_9, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
114+
{NC, NP, 0}
115+
};
116+
#endif
117+
118+
#ifdef HAL_UART_MODULE_ENABLED
119+
WEAK const PinMap PinMap_UART_CTS[] = {
120+
{PA_0, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
121+
{PA_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
122+
{PB_15, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
123+
{NC, NP, 0}
124+
};
125+
#endif
126+
127+
//*** SPI ***
128+
129+
#ifdef HAL_SPI_MODULE_ENABLED
130+
WEAK const PinMap PinMap_SPI_MOSI[] = {
131+
{PB_8, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
132+
{NC, NP, 0}
133+
};
134+
#endif
135+
136+
#ifdef HAL_SPI_MODULE_ENABLED
137+
WEAK const PinMap PinMap_SPI_MISO[] = {
138+
{PB_9, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
139+
{NC, NP, 0}
140+
};
141+
#endif
142+
143+
#ifdef HAL_SPI_MODULE_ENABLED
144+
WEAK const PinMap PinMap_SPI_SCLK[] = {
145+
{PA_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
146+
{NC, NP, 0}
147+
};
148+
#endif
149+
150+
#ifdef HAL_SPI_MODULE_ENABLED
151+
WEAK const PinMap PinMap_SPI_SSEL[] = {
152+
{PA_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
153+
{NC, NP, 0}
154+
};
155+
#endif
156+
157+
//*** No CAN ***
158+
159+
//*** No ETHERNET ***
160+
161+
//*** No QUADSPI ***
162+
163+
//*** No USB ***
164+
165+
//*** No SD ***
166+
167+
#endif /* !CUSTOM_PERIPHERAL_PINS */
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* Alternate pin name */
2+
PB_8_ALT1 = PB_8 | ALT1,
3+
PB_9_ALT1 = PB_9 | ALT1,
4+
5+
/* SYS_WKUP */
6+
#ifdef PWR_WAKEUP_PIN1
7+
SYS_WKUP1 = PA_0,
8+
#endif
9+
#ifdef PWR_WAKEUP_PIN2
10+
SYS_WKUP2 = NC,
11+
#endif
12+
#ifdef PWR_WAKEUP_PIN3
13+
SYS_WKUP3 = PA_1,
14+
#endif
15+
#ifdef PWR_WAKEUP_PIN4
16+
SYS_WKUP4 = PA_2,
17+
#endif
18+
#ifdef PWR_WAKEUP_PIN5
19+
SYS_WKUP5 = NC,
20+
#endif
21+
#ifdef PWR_WAKEUP_PIN6
22+
SYS_WKUP6 = PA_5,
23+
#endif
24+
#ifdef PWR_WAKEUP_PIN6
25+
SYS_WKUP6_1 = PA_12,
26+
#endif
27+
#ifdef PWR_WAKEUP_PIN7
28+
SYS_WKUP7 = PA_6,
29+
#endif
30+
#ifdef PWR_WAKEUP_PIN8
31+
SYS_WKUP8 = PA_7,
32+
#endif
33+
#ifdef PWR_WAKEUP_PIN8
34+
SYS_WKUP8_1 = PB_9,
35+
#endif
36+
37+
/* No USB */
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file help to add generic board entry.
2+
# upload.maximum_size and product_line have to be verified
3+
# and changed if needed.
4+
# See: https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29
5+
6+
# Generic WBA50KEUx
7+
GenWBA.menu.pnum.GENERIC_WBA50KEUX=Generic WBA50KEUx
8+
GenWBA.menu.pnum.GENERIC_WBA50KEUX.upload.maximum_size=524288
9+
GenWBA.menu.pnum.GENERIC_WBA50KEUX.upload.maximum_data_size=65536
10+
GenWBA.menu.pnum.GENERIC_WBA50KEUX.build.board=GENERIC_WBA50KEUX
11+
GenWBA.menu.pnum.GENERIC_WBA50KEUX.build.product_line=STM32WBA50xx
12+
GenWBA.menu.pnum.GENERIC_WBA50KEUX.build.variant=STM32WBAxx/WBA50K(E-G)U
13+
14+
# Generic WBA50KGUx
15+
GenWBA.menu.pnum.GENERIC_WBA50KGUX=Generic WBA50KGUx
16+
GenWBA.menu.pnum.GENERIC_WBA50KGUX.upload.maximum_size=1048576
17+
GenWBA.menu.pnum.GENERIC_WBA50KGUX.upload.maximum_data_size=65536
18+
GenWBA.menu.pnum.GENERIC_WBA50KGUX.build.board=GENERIC_WBA50KGUX
19+
GenWBA.menu.pnum.GENERIC_WBA50KGUX.build.product_line=STM32WBA50xx
20+
GenWBA.menu.pnum.GENERIC_WBA50KGUX.build.variant=STM32WBAxx/WBA50K(E-G)U
21+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2020, 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_GENERIC_WBA50KEUX) || defined(ARDUINO_GENERIC_WBA50KGUX)
14+
#include "pins_arduino.h"
15+
16+
/**
17+
* @brief System Clock Configuration
18+
* @param None
19+
* @retval None
20+
*/
21+
WEAK void SystemClock_Config(void)
22+
{
23+
/* SystemClock_Config can be generated by STM32CubeMX */
24+
#warning "SystemClock_Config() is empty. Default clock at reset is used."
25+
}
26+
27+
#endif /* ARDUINO_GENERIC_* */
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2020, 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_GENERIC_WBA50KEUX) || defined(ARDUINO_GENERIC_WBA50KGUX)
14+
#include "pins_arduino.h"
15+
16+
// Digital PinName array
17+
const PinName digitalPin[] = {
18+
PA_0, // D0/A0
19+
PA_1, // D1/A1
20+
PA_2, // D2/A2
21+
PA_5, // D3/A3
22+
PA_6, // D4/A4
23+
PA_7, // D5/A5
24+
PA_8, // D6/A6
25+
PA_12, // D7
26+
PA_13, // D8
27+
PA_14, // D9
28+
PA_15, // D10
29+
PB_3, // D11
30+
PB_4, // D12
31+
PB_8, // D13
32+
PB_9, // D14/A7
33+
PB_12, // D15
34+
PB_15, // D16
35+
PC_14, // D17
36+
PC_15, // D18
37+
PH_3 // D19
38+
};
39+
40+
// Analog (Ax) pin number array
41+
const uint32_t analogInputPin[] = {
42+
0, // A0, PA0
43+
1, // A1, PA1
44+
2, // A2, PA2
45+
3, // A3, PA5
46+
4, // A4, PA6
47+
5, // A5, PA7
48+
6, // A6, PA8
49+
14 // A7, PB9
50+
};
51+
52+
#endif /* ARDUINO_GENERIC_* */

0 commit comments

Comments
 (0)