Skip to content

Commit 303a4e5

Browse files
committed
variants(wl3): add all generated STM32WL3x generic variant files
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 8c71901 commit 303a4e5

24 files changed

+2057
-0
lines changed
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
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 STM32WL30K8Vx.xml, STM32WL30KBVx.xml
15+
* CubeMX DB release 6.0.150
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_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_VINP2
37+
{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_VINP1
38+
{NC, NP, 0}
39+
};
40+
#endif
41+
42+
//*** No DAC ***
43+
44+
//*** No I2C ***
45+
46+
//*** No I3C ***
47+
48+
//*** TIM ***
49+
50+
#ifdef HAL_TIM_MODULE_ENABLED
51+
WEAK const PinMap PinMap_TIM[] = {
52+
{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 3, 0)}, // TIM2_CH3
53+
{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 4, 0)}, // TIM2_CH4
54+
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 1, 0)}, // TIM2_CH1
55+
{PA_2_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
56+
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 2, 0)}, // TIM2_CH2
57+
{PA_3_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
58+
{PA_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 3, 0)}, // TIM2_CH3
59+
{PA_9, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 4, 0)}, // TIM2_CH4
60+
{PB_0, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
61+
{PB_1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
62+
{PB_6, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 3, 0)}, // TIM2_CH3
63+
{PB_12, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 3, 0)}, // TIM2_CH3
64+
{PB_13, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM2, 4, 0)}, // TIM2_CH4
65+
{NC, NP, 0}
66+
};
67+
#endif
68+
69+
//*** UART ***
70+
71+
#ifdef HAL_UART_MODULE_ENABLED
72+
WEAK const PinMap PinMap_UART_TX[] = {
73+
{PA_1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
74+
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
75+
{PB_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
76+
{PB_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
77+
{NC, NP, 0}
78+
};
79+
#endif
80+
81+
#ifdef HAL_UART_MODULE_ENABLED
82+
WEAK const PinMap PinMap_UART_RX[] = {
83+
{PA_8, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
84+
{PB_0, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
85+
{PB_7, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
86+
{PB_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
87+
{NC, NP, 0}
88+
};
89+
#endif
90+
91+
#ifdef HAL_UART_MODULE_ENABLED
92+
WEAK const PinMap PinMap_UART_RTS[] = {
93+
{PA_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
94+
{PB_0, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
95+
{PB_2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
96+
{PB_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
97+
{NC, NP, 0}
98+
};
99+
#endif
100+
101+
#ifdef HAL_UART_MODULE_ENABLED
102+
WEAK const PinMap PinMap_UART_CTS[] = {
103+
{PA_0, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
104+
{PA_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
105+
{PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
106+
{NC, NP, 0}
107+
};
108+
#endif
109+
110+
//*** SPI ***
111+
112+
#ifdef HAL_SPI_MODULE_ENABLED
113+
WEAK const PinMap PinMap_SPI_MOSI[] = {
114+
{PA_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
115+
{PB_7, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
116+
{NC, NP, 0}
117+
};
118+
#endif
119+
120+
#ifdef HAL_SPI_MODULE_ENABLED
121+
WEAK const PinMap PinMap_SPI_MISO[] = {
122+
{PA_8, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
123+
{NC, NP, 0}
124+
};
125+
#endif
126+
127+
#ifdef HAL_SPI_MODULE_ENABLED
128+
WEAK const PinMap PinMap_SPI_SCLK[] = {
129+
{PA_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
130+
{PB_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
131+
{NC, NP, 0}
132+
};
133+
#endif
134+
135+
#ifdef HAL_SPI_MODULE_ENABLED
136+
WEAK const PinMap PinMap_SPI_SSEL[] = {
137+
{PA_9, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI3)},
138+
{NC, NP, 0}
139+
};
140+
#endif
141+
142+
//*** No CAN ***
143+
144+
//*** No ETHERNET ***
145+
146+
//*** No QUADSPI ***
147+
148+
//*** No USB ***
149+
150+
//*** No SD ***
151+
152+
#endif /* !CUSTOM_PERIPHERAL_PINS */
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* Alternate pin name */
2+
PA_2_ALT1 = PA_2 | ALT1,
3+
PA_3_ALT1 = PA_3 | ALT1,
4+
5+
/* SYS_WKUP */
6+
#ifdef PWR_WAKEUP_PIN1
7+
SYS_WKUP1 = PB_0, /* SYS_WKUP0 */
8+
#endif
9+
#ifdef PWR_WAKEUP_PIN2
10+
SYS_WKUP2 = PB_1, /* SYS_WKUP1 */
11+
#endif
12+
#ifdef PWR_WAKEUP_PIN3
13+
SYS_WKUP3 = PB_2, /* SYS_WKUP2 */
14+
#endif
15+
#ifdef PWR_WAKEUP_PIN4
16+
SYS_WKUP4 = NC,
17+
#endif
18+
#ifdef PWR_WAKEUP_PIN5
19+
SYS_WKUP5 = NC,
20+
#endif
21+
#ifdef PWR_WAKEUP_PIN6
22+
SYS_WKUP6 = NC,
23+
#endif
24+
#ifdef PWR_WAKEUP_PIN7
25+
SYS_WKUP7 = PB_6, /* SYS_WKUP6 */
26+
#endif
27+
#ifdef PWR_WAKEUP_PIN8
28+
SYS_WKUP8 = PB_7, /* SYS_WKUP7 */
29+
#endif
30+
#ifdef PWR_WAKEUP_PIN9
31+
SYS_WKUP9 = PA_8, /* SYS_WKUP8 */
32+
#endif
33+
#ifdef PWR_WAKEUP_PIN10
34+
SYS_WKUP10 = PA_9, /* SYS_WKUP9 */
35+
#endif
36+
#ifdef PWR_WAKEUP_PIN11
37+
SYS_WKUP11 = PA_10, /* SYS_WKUP10 */
38+
#endif
39+
#ifdef PWR_WAKEUP_PIN12
40+
SYS_WKUP12 = PA_11, /* SYS_WKUP11 */
41+
#endif
42+
#ifdef PWR_WAKEUP_PIN13
43+
SYS_WKUP13 = PA_0, /* SYS_WKUP12 */
44+
#endif
45+
#ifdef PWR_WAKEUP_PIN14
46+
SYS_WKUP14 = PA_1, /* SYS_WKUP13 */
47+
#endif
48+
#ifdef PWR_WAKEUP_PIN15
49+
SYS_WKUP15 = PA_2, /* SYS_WKUP14 */
50+
#endif
51+
#ifdef PWR_WAKEUP_PIN16
52+
SYS_WKUP16 = PA_3, /* SYS_WKUP15 */
53+
#endif
54+
55+
/* No USB */
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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 WL30K8Vx
7+
GenWL3.menu.pnum.GENERIC_WL30K8VX=Generic WL30K8Vx
8+
GenWL3.menu.pnum.GENERIC_WL30K8VX.upload.maximum_size=65536
9+
GenWL3.menu.pnum.GENERIC_WL30K8VX.upload.maximum_data_size=8192
10+
GenWL3.menu.pnum.GENERIC_WL30K8VX.build.board=GENERIC_WL30K8VX
11+
GenWL3.menu.pnum.GENERIC_WL30K8VX.build.product_line=STM32WL3xx
12+
GenWL3.menu.pnum.GENERIC_WL30K8VX.build.variant=STM32WL3x/WL30K(8-B)V
13+
GenWL3.menu.pnum.GENERIC_WL30K8VX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL30.svd
14+
15+
# Generic WL30KBVx
16+
GenWL3.menu.pnum.GENERIC_WL30KBVX=Generic WL30KBVx
17+
GenWL3.menu.pnum.GENERIC_WL30KBVX.upload.maximum_size=131072
18+
GenWL3.menu.pnum.GENERIC_WL30KBVX.upload.maximum_data_size=16384
19+
GenWL3.menu.pnum.GENERIC_WL30KBVX.build.board=GENERIC_WL30KBVX
20+
GenWL3.menu.pnum.GENERIC_WL30KBVX.build.product_line=STM32WL3xx
21+
GenWL3.menu.pnum.GENERIC_WL30KBVX.build.variant=STM32WL3x/WL30K(8-B)V
22+
GenWL3.menu.pnum.GENERIC_WL30KBVX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL30.svd
23+
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_WL30K8VX) || defined(ARDUINO_GENERIC_WL30KBVX)
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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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_WL30K8VX) || defined(ARDUINO_GENERIC_WL30KBVX)
14+
#include "pins_arduino.h"
15+
16+
// Digital PinName array
17+
const PinName digitalPin[] = {
18+
PA_0, // D0
19+
PA_1, // D1
20+
PA_2, // D2
21+
PA_3, // D3/A0
22+
PA_8, // D4
23+
PA_9, // D5
24+
PA_10, // D6
25+
PA_11, // D7
26+
PB_0, // D8
27+
PB_1, // D9/A1
28+
PB_2, // D10
29+
PB_6, // D11
30+
PB_7, // D12
31+
PB_12, // D13
32+
PB_13, // D14
33+
PB_14, // D15
34+
PB_15 // D16
35+
};
36+
37+
// Analog (Ax) pin number array
38+
const uint32_t analogInputPin[] = {
39+
3, // A0, PA3
40+
9 // A1, PB1
41+
};
42+
43+
#endif /* ARDUINO_GENERIC_* */

0 commit comments

Comments
 (0)