Skip to content

Commit f2d73e1

Browse files
authored
Merge pull request #14451 from jeromecoutant/PR_GPIO_TABLE
STM32 : enable PinMap_GPIO table
2 parents eaea262 + d219378 commit f2d73e1

File tree

7 files changed

+219
-78
lines changed

7 files changed

+219
-78
lines changed

targets/TARGET_STM/PeripheralPins.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
#include "pinmap.h"
3535
#include "PeripheralNames.h"
3636

37+
//*** GPIO ***
38+
#if GPIO_PINMAP_READY
39+
/* If this macro is defined, then PinMap_GPIO is present in PeripheralPins.c */
40+
extern const PinMap PinMap_GPIO[];
41+
#endif
42+
3743
//*** ADC ***
3844
#if DEVICE_ANALOGIN
3945
extern const PinMap PinMap_ADC[];

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/PeripheralPinMaps.h

Lines changed: 99 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
/* mbed Microcontroller Library
2-
*******************************************************************************
3-
* Copyright (c) 2018, STMicroelectronics
2+
* SPDX-License-Identifier: BSD-3-Clause
3+
******************************************************************************
4+
*
5+
* Copyright (c) 2016-2021 STMicroelectronics.
46
* All rights reserved.
57
*
6-
* Redistribution and use in source and binary forms, with or without
7-
* modification, are permitted provided that the following conditions are met:
8+
* This software component is licensed by ST under BSD 3-Clause license,
9+
* the "License"; You may not use this file except in compliance with the
10+
* License. You may obtain a copy of the License at:
11+
* opensource.org/licenses/BSD-3-Clause
812
*
9-
* 1. Redistributions of source code must retain the above copyright notice,
10-
* this list of conditions and the following disclaimer.
11-
* 2. Redistributions in binary form must reproduce the above copyright notice,
12-
* this list of conditions and the following disclaimer in the documentation
13-
* and/or other materials provided with the distribution.
14-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
15-
* may be used to endorse or promote products derived from this software
16-
* without specific prior written permission.
13+
******************************************************************************
1714
*
18-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28-
*******************************************************************************
15+
* Automatically generated from STM32CubeMX/db/mcu/STM32L475V(C-E-G)Tx.xml
2916
*/
3017

3118
//==============================================================================
@@ -52,6 +39,94 @@
5239
#include "PinNamesTypes.h"
5340
#include <mstd_cstddef>
5441

42+
//*** GPIO ***
43+
44+
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_GPIO[] = {
45+
{PA_0, 0, GPIO_NOPULL}, // Connected to ARD_D1 [UART4_TX]
46+
{PA_1, 0, GPIO_NOPULL}, // Connected to ARD_D0 [UART4_RX]
47+
{PA_2, 0, GPIO_NOPULL}, // Connected to ARD_D10 [SPI_SSN]
48+
{PA_3, 0, GPIO_NOPULL}, // Connected to ARD_D4
49+
{PA_4, 0, GPIO_NOPULL}, // Connected to ARD_D7
50+
{PA_5, 0, GPIO_NOPULL}, // Connected to ARD_D13 [SPI1_SCK]
51+
{PA_6, 0, GPIO_NOPULL}, // Connected to ARD_D12 [SPI1_MISO]
52+
{PA_7, 0, GPIO_NOPULL}, // Connected to ARD_D11 [SPI1_MOSI]
53+
{PA_8, 0, GPIO_NOPULL}, // Connected to SPBTLE_RF_RST
54+
{PA_9, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_VBUS [STMPS2141STR_OUT]
55+
{PA_10, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_ID
56+
{PA_11, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_DM
57+
{PA_12, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_DP
58+
{PA_13, 0, GPIO_NOPULL}, // PA13 (JTMS-SWDIO)
59+
{PA_14, 0, GPIO_NOPULL}, // PA14 (JTCK-SWCLK)
60+
{PA_15, 0, GPIO_NOPULL},
61+
{PB_0, 0, GPIO_NOPULL}, // Connected to ARD_D3 [INT_EXT10]
62+
{PB_1, 0, GPIO_NOPULL}, // Connected to ARD_D6 [ADC1_IN6]
63+
{PB_2, 0, GPIO_NOPULL}, // Connected to ARD_D8
64+
{PB_3, 0, GPIO_NOPULL}, // PB3 (JTDO-TRACESWO)
65+
{PB_4, 0, GPIO_NOPULL},
66+
{PB_5, 0, GPIO_NOPULL}, // Connected to SPSGRF_915_SPI3_CSN [SPSGRF_SPI_CS]
67+
// {PB_6, 0, GPIO_NOPULL}, // Connected to STDIO_UART_TX
68+
// {PB_7, 0, GPIO_NOPULL}, // Connected to STDIO_UART_RX
69+
{PB_8, 0, GPIO_PULLUP}, // Connected to ARD_D15 [I2C1_SCL] // HW pull-up
70+
{PB_9, 0, GPIO_PULLUP}, // Connected to ARD_D14 [I2C1_SDA] // HW pull-up
71+
{PB_10, 0, GPIO_PULLUP}, // Connected to INTERNAL_I2C2_SCL [VL53L0X_SCL] // HW pull-up
72+
{PB_11, 0, GPIO_PULLUP}, // Connected to INTERNAL_I2C2_SDA [VL53L0X_SDA] // HW pull-up
73+
{PB_12, 0, GPIO_NOPULL}, // Connected to ISM43362_BOOT0 [ISM43362_BOOT]
74+
{PB_13, 0, GPIO_NOPULL}, // Connected to ISM43362_WAKEUP [ISM43362_WKUP]
75+
{PB_14, 0, GPIO_NOPULL}, // Connected to LED2 [LED_GREEN]
76+
{PB_15, 0, GPIO_NOPULL}, // Connected to SPSGRF_915_SDN [SPSGRF_SDN]
77+
{PC_0, 0, GPIO_NOPULL}, // Connected to ARD_A5 [ADC]
78+
{PC_1, 0, GPIO_NOPULL}, // Connected to ARD_A4 [ADC]
79+
{PC_2, 0, GPIO_NOPULL}, // Connected to ARD_A3 [ADC]
80+
{PC_3, 0, GPIO_NOPULL}, // Connected to ARD_A2 [ADC]
81+
{PC_4, 0, GPIO_NOPULL}, // Connected to ARD_A1 [ADC]
82+
{PC_5, 0, GPIO_NOPULL}, // Connected to ARD_A0 [ADC]
83+
{PC_6, 0, GPIO_NOPULL}, // Connected to VL53L0X_XSHUT [Read_XSHUT]
84+
{PC_7, 0, GPIO_NOPULL}, // Connected to VL53L0X_GPIO1_EXTI7 [VL53L0X_GPIO1]
85+
{PC_8, 0, GPIO_NOPULL}, // Connected to LSM3MDL_DRDY_EXTI8 [LIS3MDL_DRDY]
86+
{PC_9, 0, GPIO_NOPULL}, // Connected to LED3_WIFI_ LED4_BLE
87+
{PC_10, 0, GPIO_NOPULL}, // Connected to INTERNAL_SPI3_SCK [BT module_SPI_SCLK] [ISM43362_SCK]
88+
{PC_11, 0, GPIO_NOPULL}, // Connected to INTERNAL_SPI3_MISO [BT module_SPI_MISO] [ISM43362_MISO]
89+
{PC_12, 0, GPIO_NOPULL}, // Connected to INTERNAL_SPI3_MOSI [BT module_SPI_MOSI] [ISM43362_MOSI]
90+
{PC_13, 0, GPIO_NOPULL}, // Connected to BUTTON_EXTI13 [B2]
91+
// {PC_14, 0, GPIO_NOPULL}, // PC14-OSC32_IN (PC14)
92+
// {PC_15, 0, GPIO_NOPULL}, // PC15-OSC32_OUT (PC15)
93+
{PD_0, 0, GPIO_NOPULL}, // Connected to PMOD_RESET
94+
{PD_1, 0, GPIO_NOPULL}, // Connected to PMOD_SPI2_SCK
95+
{PD_2, 0, GPIO_NOPULL}, // Connected to PMOD_IRQ_EXTI12
96+
{PD_3, 0, GPIO_NOPULL}, // Connected to PMOD_UART2_CTS
97+
{PD_4, 0, GPIO_NOPULL}, // Connected to PMOD_UART2_RTS
98+
{PD_5, 0, GPIO_NOPULL}, // Connected to PMOD_UART2_TX
99+
{PD_6, 0, GPIO_NOPULL}, // Connected to PMOD_UART2_RX
100+
{PD_7, 0, GPIO_NOPULL}, // Connected to STSAFE_A100_RESET [STSAFE-A100_RESET]
101+
{PD_8, 0, GPIO_NOPULL}, // Connected to INTERNAL_UART3_TX [ISM43362_RX]
102+
{PD_9, 0, GPIO_NOPULL}, // Connected to INTERNAL_UART3_RX [ISM43362_TX]
103+
{PD_10, 0, GPIO_NOPULL}, // Connected to LPS22HB_INT_DRDY_EXTI0 [LPS22HB_INT_DRDY]
104+
{PD_11, 0, GPIO_NOPULL}, // Connected to LSM6DSL_INT1_EXTI11 [LSM6DSL_INT1]
105+
{PD_12, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_PWR_EN [STMPS2141STR_EN]
106+
{PD_13, 0, GPIO_NOPULL}, // Connected to SPBTLE_RF_SPI3_CSN [BT module_SPI_CS]
107+
{PD_14, 0, GPIO_NOPULL}, // Connected to ARD_D2 [INT0_EXTI14]
108+
{PD_15, 0, GPIO_NOPULL}, // Connected to HTS221_DRDY_EXTI15 [HTS221_DRDY]
109+
{PE_0, 0, GPIO_NOPULL}, // Connected to ISM43362_SPI3_CSN [ISM43362_SSN]
110+
{PE_1, 0, GPIO_NOPULL}, // Connected to ISM43362_DRDY_EXTI1 [ISM43362_DATARDY]
111+
{PE_2, 0, GPIO_NOPULL}, // Connected to M24SR64_Y_RF_DISABLE [M24SR64_RFDIS]
112+
{PE_3, 0, GPIO_NOPULL}, // Connected to USB_OTG_FS_OVRCR_EXTI3 [STMPS2141STR_FAULT]
113+
{PE_4, 0, GPIO_NOPULL}, // Connected to M24SR64_Y_GPO [M24SR64_GPO]
114+
{PE_5, 0, GPIO_NOPULL}, // Connected to SPSGRF_915_GPIO3_EXTI5 [SPSGRF_GPIO_3]
115+
{PE_6, 0, GPIO_NOPULL}, // Connected to SPBTLE_RF_IRQ_EXTI6 [BT module_SPI_IRQ]
116+
{PE_7, 0, GPIO_NOPULL}, // Connected to DFSDM1_DATIN2 [MP34DT01_DOUT]
117+
{PE_8, 0, GPIO_NOPULL}, // Connected to ISM43362_RST [ISM43362_RSTN]
118+
{PE_9, 0, GPIO_NOPULL}, // Connected to DFSDM1_CKOUT [MP34DT01_CLK]
119+
{PE_10, 0, GPIO_NOPULL}, // Connected to QUADSPI_CLK [MX25R6435F_SCLK]
120+
{PE_11, 0, GPIO_NOPULL}, // Connected to QUADSPI_NCS [MX25R6435F_SCLK]
121+
{PE_12, 0, GPIO_NOPULL}, // Connected to OQUADSPI_BK1_IO0 [MX25R6435F_IO0]
122+
{PE_13, 0, GPIO_NOPULL}, // Connected to QUADSPI_BK1_IO1 [MX25R6435F_IO1]
123+
{PE_14, 0, GPIO_NOPULL}, // Connected to QUAD_SPI_BK1_IO2 [MX25R6435F_IO2]
124+
{PE_15, 0, GPIO_NOPULL}, // Connected to QUAD_SPI_BK1_IO3 [MX25R6435F_IO3]
125+
// {PH_0, 0, GPIO_NOPULL}, // PH0-OSC_IN (PH0)
126+
// {PH_1, 0, GPIO_NOPULL}, // PH1-OSC_OUT (PH1)
127+
{NC, NC, 0}
128+
};
129+
55130
//*** ADC ***
56131

57132
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_ADC[] = {
@@ -383,7 +458,7 @@ MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_QSPI_SSEL[] = {
383458

384459
//*** USBDEVICE ***
385460

386-
MSTD_CONSTEXPR_OBJ_11 const PinMap PinMap_USB_FS[] = {
461+
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_USB_FS[] = {
387462
// {PA_8, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF // Connected to SPBTLE_RF_RST
388463
{PA_9, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS // Connected to USB_OTG_FS_VBUS [STMPS2141STR_OUT]
389464
{PA_10, USB_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID // Connected to USB_OTG_FS_ID

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/PeripheralPins.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,3 @@
3131
#include "PeripheralPins.h"
3232
#include "mbed_toolchain.h"
3333
#include "PeripheralPinMaps.h"
34-
35-
// List of GPIOs with limited functionality
36-
const PinList *pinmap_gpio_restricted_pins()
37-
{
38-
static const PinName pins[] = {
39-
PB_8, // fixed pull-up (for I2C)
40-
PB_9, // fixed pull-up (for I2C)
41-
PB_10, // fixed pull-up (for I2C)
42-
PB_11, // fixed pull-up (for I2C)
43-
RCC_OSC32_IN, // OSC32_IN
44-
RCC_OSC32_OUT, // OSC32_OUT
45-
RCC_OSC_IN, // OSC_IN
46-
RCC_OSC_OUT // OSC_OUT
47-
};
48-
static const PinList pin_list = {
49-
sizeof(pins) / sizeof(pins[0]),
50-
pins
51-
};
52-
return &pin_list;
53-
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ extern "C" {
3030
/* If this macro is defined, then constexpr utility functions for pin-map seach can be used. */
3131
#define STATIC_PINMAP_READY 1
3232

33+
/* If this macro is defined, then PinMap_GPIO is present in PeripheralPins.c */
34+
#define GPIO_PINMAP_READY 1
35+
3336
typedef enum {
3437
ALT0 = 0x100,
3538
ALT1 = 0x200,

targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/TARGET_NUCLEO_WB55RG/PeripheralPins.c

Lines changed: 74 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,18 @@
11
/* mbed Microcontroller Library
2-
*******************************************************************************
3-
* Copyright (c) 2019, STMicroelectronics
4-
* SPDX-License-Identifier: Apache-2.0
5-
* All rights reserved.
2+
* SPDX-License-Identifier: BSD-3-Clause
3+
******************************************************************************
64
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions are met:
5+
* Copyright (c) 2016-2021 STMicroelectronics.
6+
* All rights reserved.
97
*
10-
* 1. Redistributions of source code must retain the above copyright notice,
11-
* this list of conditions and the following disclaimer.
12-
* 2. Redistributions in binary form must reproduce the above copyright notice,
13-
* this list of conditions and the following disclaimer in the documentation
14-
* and/or other materials provided with the distribution.
15-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
16-
* may be used to endorse or promote products derived from this software
17-
* without specific prior written permission.
8+
* This software component is licensed by ST under BSD 3-Clause license,
9+
* the "License"; You may not use this file except in compliance with the
10+
* License. You may obtain a copy of the License at:
11+
* opensource.org/licenses/BSD-3-Clause
1812
*
19-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*******************************************************************************
13+
******************************************************************************
3014
*
31-
* Automatically generated from STM32WB55RGVx.xml
15+
* Automatically generated from STM32CubeMX/db/mcu/STM32WB55RGVx.xml
3216
*/
3317

3418
#include "PeripheralPins.h"
@@ -53,6 +37,61 @@
5337
//==============================================================================
5438

5539

40+
//*** GPIO ***
41+
42+
MBED_WEAK const PinMap PinMap_GPIO[] = {
43+
{PA_0, 0, GPIO_NOPULL},
44+
{PA_1, 0, GPIO_NOPULL},
45+
{PA_2, 0, GPIO_NOPULL},
46+
{PA_3, 0, GPIO_NOPULL},
47+
{PA_4, 0, GPIO_NOPULL},
48+
{PA_5, 0, GPIO_NOPULL},
49+
{PA_6, 0, GPIO_NOPULL},
50+
{PA_7, 0, GPIO_NOPULL},
51+
{PA_8, 0, GPIO_NOPULL},
52+
{PA_9, 0, GPIO_NOPULL},
53+
{PA_10, 0, GPIO_NOPULL},
54+
{PA_11, 0, GPIO_NOPULL}, // Connected to USB_DM
55+
{PA_12, 0, GPIO_NOPULL}, // Connected to USB_DP
56+
{PA_13, 0, GPIO_NOPULL}, // Connected to JTMS
57+
{PA_14, 0, GPIO_NOPULL}, // Connected to JTCK
58+
{PA_15, 0, GPIO_NOPULL},
59+
{PB_0, 0, GPIO_NOPULL}, // Connected to LD2 [Green Led]
60+
{PB_1, 0, GPIO_NOPULL}, // Connected to LD3 [Red Led]
61+
{PB_2, 0, GPIO_NOPULL},
62+
{PB_3, 0, GPIO_NOPULL}, // Connected to JTDO
63+
{PB_4, 0, GPIO_NOPULL},
64+
{PB_5, 0, GPIO_NOPULL}, // Connected to LD1 [Blue Led]
65+
// {PB_6, 0, GPIO_NOPULL}, // Connected to STDIO_UART_TX
66+
// {PB_7, 0, GPIO_NOPULL}, // Connected to STDIO_UART_RX
67+
{PB_8, 0, GPIO_NOPULL},
68+
{PB_9, 0, GPIO_NOPULL},
69+
{PB_10, 0, GPIO_NOPULL},
70+
{PB_11, 0, GPIO_NOPULL},
71+
{PB_12, 0, GPIO_NOPULL},
72+
{PB_13, 0, GPIO_NOPULL},
73+
{PB_14, 0, GPIO_NOPULL},
74+
{PB_15, 0, GPIO_NOPULL},
75+
{PC_0, 0, GPIO_NOPULL},
76+
{PC_1, 0, GPIO_NOPULL},
77+
{PC_2, 0, GPIO_NOPULL},
78+
{PC_3, 0, GPIO_NOPULL},
79+
{PC_4, 0, GPIO_NOPULL}, // Connected to B1 [Push Button]
80+
{PC_5, 0, GPIO_NOPULL},
81+
{PC_6, 0, GPIO_NOPULL},
82+
{PC_10, 0, GPIO_NOPULL},
83+
{PC_11, 0, GPIO_NOPULL},
84+
{PC_12, 0, GPIO_NOPULL},
85+
{PC_13, 0, GPIO_NOPULL}, // Connected to SYS_WKUP2
86+
// {PC_14, 0, GPIO_NOPULL}, // Connected to RCC_OSC32_IN // PC14-OSC32_IN
87+
// {PC_15, 0, GPIO_NOPULL}, // Connected to RCC_OSC32_OUT // PC15-OSC32_OUT
88+
{PD_0, 0, GPIO_NOPULL}, // Connected to B2 [Push Button]
89+
{PD_1, 0, GPIO_NOPULL}, // Connected to B3 [Push Button]
90+
{PE_4, 0, GPIO_NOPULL},
91+
{PH_3, 0, GPIO_NOPULL}, // PH3-BOOT0
92+
{NC, NC, 0}
93+
};
94+
5695
//*** ADC ***
5796

5897
MBED_WEAK const PinMap PinMap_ADC[] = {
@@ -109,6 +148,7 @@ MBED_WEAK const PinMap PinMap_I2C_SCL[] = {
109148
//*** PWM ***
110149

111150
// TIM16 cannot be used because already used by the us_ticker
151+
// (update us_ticker_data.h file if another timer is chosen)
112152
MBED_WEAK const PinMap PinMap_PWM[] = {
113153
{PA_0, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
114154
{PA_1, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
@@ -142,36 +182,36 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
142182

143183
MBED_WEAK const PinMap PinMap_UART_TX[] = {
144184
{PA_2, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
145-
{PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
185+
{PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
146186
{PB_5, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // Connected to LD1 [Blue Led]
147-
{PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_TX
187+
{PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_TX
148188
{PB_11, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
149189
{PC_1, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
150190
{NC, NC, 0}
151191
};
152192

153193
MBED_WEAK const PinMap PinMap_UART_RX[] = {
154194
{PA_3, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
155-
{PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
195+
{PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
156196
{PA_12, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // Connected to USB_DP
157-
{PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_RX
197+
{PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_RX
158198
{PB_10, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
159199
{PC_0, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
160200
{NC, NC, 0}
161201
};
162202

163203
MBED_WEAK const PinMap PinMap_UART_RTS[] = {
164-
{PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to USB_DP
204+
{PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to USB_DP
165205
{PB_1, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // Connected to LD3 [Red Led]
166-
{PB_3, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to JTDO
206+
{PB_3, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to JTDO
167207
{PB_12, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
168208
{NC, NC, 0}
169209
};
170210

171211
MBED_WEAK const PinMap PinMap_UART_CTS[] = {
172212
{PA_6, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
173-
{PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to USB_DM
174-
{PB_4, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
213+
{PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to USB_DM
214+
{PB_4, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
175215
{PB_13, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
176216
{NC, NC, 0}
177217
};

targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/TARGET_NUCLEO_WB55RG/PinNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include "cmsis.h"
2424
#include "PinNamesTypes.h"
2525

26+
/* If this macro is defined, then PinMap_GPIO is present in PeripheralPins.c */
27+
#define GPIO_PINMAP_READY 1
28+
2629
#ifdef __cplusplus
2730
extern "C" {
2831
#endif
@@ -32,6 +35,7 @@ typedef enum {
3235
} ALTx;
3336

3437
typedef enum {
38+
3539
PA_0 = 0x00,
3640
PA_1 = 0x01,
3741
PA_2 = 0x02,

0 commit comments

Comments
 (0)