Skip to content

Commit 9d4bb6b

Browse files
committed
DISCO_L475VG_IOT01A: enable PinMap_GPIO[]
1 parent 7e62759 commit 9d4bb6b

File tree

3 files changed

+101
-43
lines changed

3 files changed

+101
-43
lines changed

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

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

57132
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_ADC[] = {

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,

0 commit comments

Comments
 (0)