Skip to content

Commit 03dd8d3

Browse files
committed
STM32L4 USB pins addition
1 parent 2c03f3a commit 03dd8d3

File tree

29 files changed

+193
-26
lines changed

29 files changed

+193
-26
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ typedef enum {
7676
QSPI_1 = (int)QSPI_R_BASE,
7777
} QSPIName;
7878

79+
typedef enum {
80+
USB_FS = (int)USB_BASE,
81+
} USBName;
82+
7983
#ifdef __cplusplus
8084
}
8185
#endif

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/PeripheralPins.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,12 @@ MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = {
236236
// {PA_2, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_NCS // Connected to STDIO_UART_TX
237237
{NC, NC, 0}
238238
};
239+
240+
//*** USBDEVICE ***
241+
242+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
243+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB_FS)}, // USB_DM
244+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB_FS)}, // USB_DP
245+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_USB_FS)}, // USB_NOE
246+
{NC, NC, 0}
247+
};

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TARGET_NUCLEO_L433RC_P/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ typedef enum {
8181
QSPI_1 = (int)QSPI_R_BASE,
8282
} QSPIName;
8383

84+
typedef enum {
85+
USB_FS = (int)USB_BASE,
86+
} USBName;
87+
8488
#ifdef __cplusplus
8589
}
8690
#endif

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TARGET_NUCLEO_L433RC_P/PeripheralPins.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,13 @@ MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = {
293293
{PB_11, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_NCS
294294
{NC, NC, 0}
295295
};
296+
297+
//*** USBDEVICE ***
298+
299+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
300+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB_FS)}, // USB_DM
301+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB_FS)}, // USB_DP
302+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_USB_FS)}, // USB_NOE
303+
// {PC_9, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_USB_FS)}, // USB_NOE
304+
{NC, NC, 0}
305+
};

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TARGET_NUCLEO_L433RC_P/PinNames.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ typedef enum {
216216
/**** USB pins ****/
217217
USB_DM = PA_11,
218218
USB_DP = PA_12,
219-
USB_NOE = PC_9,
220-
USB_NOE_ALT0 = PA_13,
219+
USB_NOE = PA_13,
220+
USB_NOE_ALT0 = PC_9,
221221

222222
/**** OSCILLATOR pins ****/
223223
RCC_OSC32_IN = PC_14,

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ typedef enum {
8888
QSPI_1 = (int)QSPI_R_BASE,
8989
} QSPIName;
9090

91+
typedef enum {
92+
USB_FS = (int)USB_OTG_FS_PERIPH_BASE,
93+
} USBName;
94+
9195
#ifdef __cplusplus
9296
}
9397
#endif

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,16 @@ MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = {
378378
{PE_11, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_NCS // Connected to QUADSPI_NCS [MX25R6435F_SCLK]
379379
{NC, NC, 0}
380380
};
381+
382+
//*** USBDEVICE ***
383+
384+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
385+
// {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
386+
{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]
387+
{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
388+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM // Connected to USB_OTG_FS_DM
389+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP // Connected to USB_OTG_FS_DP
390+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE
391+
// {PC_9, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE // Connected to LED3_WIFI_ LED4_BLE
392+
{NC, NC, 0}
393+
};

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,12 @@ typedef enum {
241241
SPI_CS = D10,
242242
PWM_OUT = D9,
243243

244-
/**** USB pins ****/
244+
/**** USB FS pins ****/
245245
USB_OTG_FS_DM = PA_11,
246246
USB_OTG_FS_DP = PA_12,
247247
USB_OTG_FS_ID = PA_10,
248-
USB_OTG_FS_NOE = PC_9,
249-
USB_OTG_FS_NOE_ALT0 = PA_13,
248+
USB_OTG_FS_NOE = PA_13,
249+
USB_OTG_FS_NOE_ALT0 = PC_9,
250250
USB_OTG_FS_SOF = PA_8,
251251
USB_OTG_FS_VBUS = PA_9,
252252

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_DISCO_L476VG/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ typedef enum {
8888
QSPI_1 = (int)QSPI_R_BASE,
8989
} QSPIName;
9090

91+
typedef enum {
92+
USB_FS = (int)USB_OTG_FS_PERIPH_BASE,
93+
} USBName;
94+
9195
#ifdef __cplusplus
9296
}
9397
#endif

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_DISCO_L476VG/PeripheralPins.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,16 @@ MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = {
378378
{PE_11, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_NCS // Connected to QSPI_CS [N25Q128A13EF840E_S\#]
379379
{NC, NC, 0}
380380
};
381+
382+
//*** USBDEVICE ***
383+
384+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
385+
// {PA_8, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF // Connected to COM0 [GH08172T_COM0]
386+
{PA_9, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS // Connected to COM1 [GH08172T_COM1]
387+
{PA_10, USB_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID // Connected to COM2 [GH08172T_COM2]
388+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM // Connected to OTG_FS_DM [EMIF02-USB03F2_D-out]
389+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP // Connected to OTG_FS_DP [EMIF02-USB03F2_D+out]
390+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE
391+
// {PC_9, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE // Connected to OTG_FS_PowerSwitchOn [STMPS2141STR_EN]
392+
{NC, NC, 0}
393+
};

0 commit comments

Comments
 (0)