Skip to content

Commit b2bae03

Browse files
committed
STM32L0 USB pins addition
1 parent 613635f commit b2bae03

File tree

10 files changed

+58
-4
lines changed

10 files changed

+58
-4
lines changed

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ typedef enum {
7171
PWM_22 = (int)TIM22_BASE
7272
} PWMName;
7373

74+
typedef enum {
75+
USB_FS = (int)USB_BASE,
76+
} USBName;
77+
7478
#ifdef __cplusplus
7579
}
7680
#endif

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/PeripheralPins.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,13 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
246246
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)},
247247
{NC, NC, 0}
248248
};
249+
250+
//*** USBDEVICE ***
251+
252+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
253+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
254+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
255+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to TMS
256+
// {PC_9, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
257+
{NC, NC, 0}
258+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/PinNames.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ typedef enum {
183183
/**** USB pins ****/
184184
USB_DM = PA_11,
185185
USB_DP = PA_12,
186-
USB_NOE = PC_9,
187-
USB_NOE_ALT0 = PA_13,
186+
USB_NOE = PA_13,
187+
USB_NOE_ALT0 = PC_9,
188188

189189
/**** OSCILLATOR pins ****/
190190
RCC_OSC32_IN = PC_14,

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_DISCO_L053C8/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ typedef enum {
6767
PWM_22 = (int)TIM22_BASE
6868
} PWMName;
6969

70+
typedef enum {
71+
USB_FS = (int)USB_BASE,
72+
} USBName;
73+
7074
#ifdef __cplusplus
7175
}
7276
#endif

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_DISCO_L053C8/PeripheralPins.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,12 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
192192
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)}, // Connected to NFC_NSS
193193
{NC, NC, 0}
194194
};
195+
196+
//*** USBDEVICE ***
197+
198+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
199+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM // Connected to USB1_DM
200+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP // Connected to USB1_DP
201+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to SWDIO
202+
{NC, NC, 0}
203+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ typedef enum {
6767
PWM_22 = (int)TIM22_BASE
6868
} PWMName;
6969

70+
typedef enum {
71+
USB_FS = (int)USB_BASE,
72+
} USBName;
73+
7074
#ifdef __cplusplus
7175
}
7276
#endif

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/PeripheralPins.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,13 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
207207
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)},
208208
{NC, NC, 0}
209209
};
210+
211+
//*** USBDEVICE ***
212+
213+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
214+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
215+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
216+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to TMS
217+
// {PC_9, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
218+
{NC, NC, 0}
219+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/PinNames.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ typedef enum {
159159
/**** USB pins ****/
160160
USB_DM = PA_11,
161161
USB_DP = PA_12,
162-
USB_NOE = PC_9,
163-
USB_NOE_ALT0 = PA_13,
162+
USB_NOE = PA_13,
163+
USB_NOE_ALT0 = PC_9,
164164

165165
/**** OSCILLATOR pins ****/
166166
RCC_OSC32_IN = PC_14,

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ typedef enum {
7171
PWM_22 = (int)TIM22_BASE
7272
} PWMName;
7373

74+
typedef enum {
75+
USB_FS = (int)USB_BASE,
76+
} USBName;
77+
7478
#ifdef __cplusplus
7579
}
7680
#endif

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/PeripheralPins.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,12 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
225225
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)}, // Connected to SPI2_NSS
226226
{NC, NC, 0}
227227
};
228+
229+
//*** USBDEVICE ***
230+
231+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
232+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
233+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP // Connected to RESERVED_RADIO
234+
// {PA_13, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
235+
{NC, NC, 0}
236+
};

0 commit comments

Comments
 (0)