Skip to content

Commit 6986daa

Browse files
committed
STM32F3 USB pins addition
1 parent 9b3cdd0 commit 6986daa

File tree

8 files changed

+48
-0
lines changed

8 files changed

+48
-0
lines changed

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/TARGET_NUCLEO_F302R8/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ typedef enum {
7474
CAN_1 = (int)CAN_BASE
7575
} CANName;
7676

77+
typedef enum {
78+
USB_FS = (int)USB_BASE,
79+
} USBName;
80+
7781
#ifdef __cplusplus
7882
}
7983
#endif

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/TARGET_NUCLEO_F302R8/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,11 @@ MBED_WEAK const PinMap PinMap_CAN_TD[] = {
250250
{PB_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)},
251251
{NC, NC, 0}
252252
};
253+
254+
//*** USBDEVICE ***
255+
256+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
257+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
258+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
259+
{NC, NC, 0}
260+
};

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/TARGET_DISCO_F303VC/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ typedef enum {
8282
CAN_1 = (int)CAN_BASE
8383
} CANName;
8484

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

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/TARGET_DISCO_F303VC/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,3 +372,11 @@ MBED_WEAK const PinMap PinMap_CAN_TD[] = {
372372
{PD_1, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_CAN)},
373373
{NC, NC, 0}
374374
};
375+
376+
//*** USBDEVICE ***
377+
378+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
379+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF14_USB)}, // USB_DM // Connected to DM
380+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF14_USB)}, // USB_DP // Connected to DP
381+
{NC, NC, 0}
382+
};

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303RE/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ typedef enum {
8585
CAN_1 = (int)CAN_BASE
8686
} CANName;
8787

88+
typedef enum {
89+
USB_FS = (int)USB_BASE,
90+
} USBName;
91+
8892
#ifdef __cplusplus
8993
}
9094
#endif

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303RE/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,11 @@ MBED_WEAK const PinMap PinMap_CAN_TD[] = {
319319
{PB_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)},
320320
{NC, NC, 0}
321321
};
322+
323+
//*** USBDEVICE ***
324+
325+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
326+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
327+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
328+
{NC, NC, 0}
329+
};

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303ZE/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ typedef enum {
8585
CAN_1 = (int)CAN_BASE
8686
} CANName;
8787

88+
typedef enum {
89+
USB_FS = (int)USB_BASE,
90+
} USBName;
91+
8892
#ifdef __cplusplus
8993
}
9094
#endif

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303ZE/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,3 +415,11 @@ MBED_WEAK const PinMap PinMap_CAN_TD[] = {
415415
{PD_1, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_CAN)},
416416
{NC, NC, 0}
417417
};
418+
419+
//*** USBDEVICE ***
420+
421+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
422+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM // Connected to USB_DM
423+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP // Connected to USB_DP
424+
{NC, NC, 0}
425+
};

0 commit comments

Comments
 (0)